Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALInspiral 5.0.3.1-6c6b863
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
LALInspiralHybridHexagonalBank.c
Go to the documentation of this file.
1/*
2* Copyright (C) 2007 Thomas Cokelaer
3*
4* This program is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License as published by
6* the Free Software Foundation; either version 2 of the License, or
7* (at your option) any later version.
8*
9* This program is distributed in the hope that it will be useful,
10* but WITHOUT ANY WARRANTY; without even the implied warranty of
11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12* GNU General Public License for more details.
13*
14* You should have received a copy of the GNU General Public License
15* along with with program; see the file COPYING. If not, write to the
16* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17* MA 02110-1301 USA
18*/
19
20/**
21 * \defgroup LALInspiralHybridHexagonalBank_c Module LALInspiralHybridHexagonalBank.c
22 * \ingroup LALInspiralBank_h
23 * \author Cokelaer Thomas
24 * \brief Hybrid hexagonal template bank.
25 *
26 * ### Description ###
27 *
28 * This code does almost the same as the standard Hexagonal Bank code. However,
29 * once the templates cover both the equal line and an other line (\f$m_1=\textrm{mMin}\f$
30 * or \f$m_2 =\textrm{mMax}\f$), then there is no need to carry on any square/hexagonal
31 * placement. One can simply populate templates along a bissectrice.
32 *
33 * ### Algorithm ###
34 *
35 * The algorithm is identical to the hexagonal placement. However, once a template covers
36 * both the equal mass line and the upper boundary, then the hexagonal placement stops.
37 * So, an additional placement is needed to finalise the bank. In principle the placement
38 * needs to be completed on bothe side of the template bank, at low mass and high mass. So,
39 * we should start from the two templates which covers the two boundaries and populate the
40 * parameter space along a bissectrice.
41 *
42 * The coordinates of the bissectrice at a given \f$tau_0\f$ coordinate is estimated by tracing a vertical
43 * line in the \f$\tau_0/tau_3\f$ plane, estimate the vlue of \f$tau_3\f$ on the upper boundary and low
44 * boundary (\f$\eta=1/4\f$ line), and finally take the mean of the two values. Although, is is an approximation
45 * since we should also take into account the orientation of the ellipse, we
46 * think this is good enough. The vertical line crosses the parameter space on the
47 * \f$\eta=1/4\f$ line and the other parameter space boundary which is define either by (1)
48 * \f$m_1=variable\f$ and \f$m_2=mMin\f$ or (2) \f$m_1=variable\f$ and \f$m_2=mMax\f$. Concerning (1),
49 * \f$\eta=1/4\f$, this is a trivial computation, since
50 * \f{equation}{
51 * \tau_3 = \frac{ A3}{\eta} \left( \frac{\eta \tau_0}{A0} \right)^{2/5},
52 * \f}
53 * which in the case of \f$\eta=1/4\f$ simply becomes :
54 * \f{equation}{
55 * \tau_3 = 4 A3 \left( \frac{\tau_0}{4 A0} \right)^{2/5}.
56 * \f}
57 * In the case (2), if \f$\tau_0\f$ is provided, if we can extract the total mass and \f$\eta\f$ parameter,
58 * then \f$tau_3\f$ is given by
59 * \f{equation}{
60 * \tau_3 = \frac{ A3}{\eta} M^{-2/3}.
61 * \f}
62 * So, we need \f$M\f$ and \f$\eta\f$. Starting from
63 * \f{equation}{
64 * \tau_0 = \frac{ A0}{\eta} \left( M \right)^{-5/3},
65 * \f}
66 * we can extract a cubic equation
67 * \f{equation}{
68 * x^3 - px+q=0
69 * \f}
70 * where \f$x = M^{1/3}\f$, \f$p = -\frac{A0}{\tau_0/m_\textrm{Extreme}}\f$ and \f$q= - m_\textrm{Extreme}=0\f$. \f$ m_\textrm{Extreme}\f$
71 * is either set to mMin or mMax depending on which side of the parameter space we are.
72 *
73 * The solution for \f$x\f$ is standard and takes the expression :
74 * \f{equation}{
75 * x = \left(-\frac{q}{2}-\frac{1}{2}*\sqrt{\frac{27 q^2 + 4 p^3}{27}}\right)^{\frac{1}{3}}
76 * + \left(-\frac{q}{2}+\frac{1}{2}*\sqrt{\frac{27 q^2 + 4 p^3}{27}}\right)^{\frac{1}{3}};
77 * \f}
78 *
79 * \anchor LALInspiralHybridHexa2
80 * \image html LALInspiralHybridHexa2.png "Example of hybrid hexagonal placement. Once an ellipse covers the upper and lower boundary\, then the hexagonal placement stops. This occurs neccesseraly at low and high mass range."
81 *
82 * \anchor LALInspiralHybridHexa1
83 * \image html LALInspiralHybridHexa1.png "Example of hybrid hexagonal placement. Once the ellipses covers the upper and lower part of the parameter space (at tau0=3.6 and tau0=0.4)\, then the placement is switched from the hexagonal to a placement along the bissectric of the upper/lower boundaries as described in the text."
84 */
85/** @{ */
86
87#include <stdio.h>
88#include <lal/LALInspiralBank.h>
89#include <lal/AVFactories.h>
90#include <lal/SeqFactories.h>
91#include <lal/LALStdio.h>
92#include <lal/FindRoot.h>
93
94
95void
97 InspiralMomentsEtc *moments,
98 InspiralCell **cell,
99 INT4 headId,
100 InspiralTemplate *paramsIn,
101 HexaGridParam *gridParam,
102 CellEvolution *cellEvolution,
103 CellList **cellList,
104 INT4 flag
105 );
106
107
108/** \see See \ref LALInspiralHybridHexagonalBank_c for documentation */
109void
113 INT4 *nlist,
114 InspiralCoarseBankIn coarseIn
115 )
116{
117 INT4 i;
118 INT4 firstId = 0;
119 REAL4 A0, A3;
120 REAL4 piFl;
121 InspiralBankParams bankPars;
122 InspiralTemplate *tempPars;
123 InspiralMomentsEtc moments;
124 InspiralCell *cells = 0;
125 HexaGridParam gridParam;
126 CellEvolution cellEvolution;
127 CellList *cellList = NULL;
128
131
132 ASSERT( coarseIn.mMin > 0., status,
133 LALINSPIRALBANKH_ESIZE, LALINSPIRALBANKH_MSGESIZE );
134 ASSERT( coarseIn.mMax > 0., status,
135 LALINSPIRALBANKH_ESIZE, LALINSPIRALBANKH_MSGESIZE );
136 ASSERT( coarseIn.MMax >= 2.*coarseIn.mMin, status,
137 LALINSPIRALBANKH_ESIZE, LALINSPIRALBANKH_MSGESIZE );
138
139 /* Set the elements of the metric and tempPars structures in */
140 /* conformity with the coarseIn structure */
141 if ( !(tempPars = (InspiralTemplate *)
142 LALCalloc( 1, sizeof(InspiralTemplate))))
143 {
144 LALFree(tempPars);
145 LALFree(cells);
146 ABORT( status, LALINSPIRALBANKH_EMEM, LALINSPIRALBANKH_MSGEMEM );
147 }
148
149
150 LALInspiralSetParams( status->statusPtr, tempPars, coarseIn );
152
153 /* Identify the boundary of search and parameters for the */
154 /* first lattice point */
155 LALInspiralSetSearchLimits( status->statusPtr, &bankPars, coarseIn );
157
158 tempPars->totalMass = coarseIn.MMax;
159 tempPars->eta = 0.25;
160 tempPars->ieta = 1.L;
161 tempPars->fLower = coarseIn.fLower;
162 tempPars->massChoice = m1Andm2;
163 tempPars->mass1 = coarseIn.mMin;
164 tempPars->mass2 = coarseIn.mMax;
165
166 LALInspiralParameterCalc( status->statusPtr, tempPars );
168
169 /* Get the moments of the PSD integrand and other parameters */
170 /* required in the computation of the metric once for all. */
172 status->statusPtr,
173 &moments,
174 &coarseIn.shf,
175 tempPars );
177
178 /* Allocate memory for one cell */
179 cells = (InspiralCell*)
180 LALCalloc(1, sizeof(InspiralCell) );
181
182 /*define gridParam*/
183 gridParam.mm = coarseIn.mmCoarse;
184 gridParam.x0Min = bankPars.x0Min;
185 gridParam.x0Max = bankPars.x0Max;
186 gridParam.x1Min = bankPars.x1Min;
187 gridParam.x1Max = bankPars.x1Max;
188 gridParam.mMin = coarseIn.mMin;
189 gridParam.mMax = coarseIn.mMax;
190 gridParam.MMin = coarseIn.MMin;
191 gridParam.MMax = coarseIn.MMax;
192 gridParam.etaMin = coarseIn.etamin;
193 gridParam.space = coarseIn.space;
194 gridParam.massRange = coarseIn.massRange;
195 gridParam.gridSpacing = coarseIn.gridSpacing;
196 gridParam.fLower = coarseIn.fLower;
197
198
199 cellEvolution.nTemplate = 1;
200 cellEvolution.nTemplateMax = 1;
201 cellEvolution.fertile = 0;
202
203 /* initialise that first cell */
204 tempPars->massChoice = t03;
205 cells[0].t0 = tempPars->t0;
206 cells[0].t3 = tempPars->t3;
207
208 /* some aliases */
209 piFl = LAL_PI * tempPars->fLower;
210 A0 = 5. / pow(piFl, 8./3.) / 256.;
211 A3 = LAL_PI / pow(piFl, 5./3.)/8.;
212
213
214 /* Initialise the first template */
216 status->statusPtr,
217 &cells, firstId,
218 &moments, tempPars,
219 &gridParam, &cellEvolution,
220 &cellList);
222
223
224 {
225 INT4 k, kk; /*some indexes*/
226 INT4 *new_list = NULL;
227 CellList *ptr = NULL;
228 INT4 length = 1; /* default size of the bank when we
229 start the bank generation. */
230
231 /* we re-allocate an array which size equals the
232 * template bank size. */
233 if (! (new_list = LALMalloc(length*sizeof(INT4))))
234 {
235 ABORT( status, LALINSPIRALBANKH_EMEM, LALINSPIRALBANKH_MSGEMEM );
236 }
237
238 /* while there are cells/template which can propagate, we carry on the loop.*/
239 while (cellEvolution.fertile)
240 {
241 length = LALListLength(cellList);
242 /*realloc some memory for the next template*/
243 if (! (new_list = LALRealloc(new_list, length*sizeof(INT4))))
244 {
245 ABORT( status, LALINSPIRALBANKH_EMEM, LALINSPIRALBANKH_MSGEMEM );
246 /* freeing memory here ? */
247 }
248 ptr = cellList;
249 /* we extract the ids which might change within the LALPopulateCell
250 * function. Indeed the bank might grow and then we will lost track
251 * of ids/bank size and so on. */
252 for ( k = 0; k < length; k++)
253 {
254 new_list[k] = ptr->id;
255 ptr = ptr->next;
256 }
257 /* look at all the template/ids in the current bank to search for fertile cells */
258 for (kk = 0; kk < length; kk++)
259 {
260 k = new_list[kk];
261 if ( cells[k].status == Fertile)
262 {
263 LALPopulateCell(status->statusPtr, &moments, &cells,
264 k, tempPars, &gridParam, &cellEvolution, &cellList);
266 /* now the bank might have grown, but we only look at the
267 * template created before this for loop, when we entered
268 * in the while loop
269 * */
270 }
271 }
272 }
273 LALFree(new_list);
274 }
275
276#if 1
277 {
278
279
280
281 INT4 edge1=0, edge2=0;
282
283 gridParam.gridSpacing = Hexagonal;
284
285 i=0;
286 while (i<cellEvolution.nTemplate){
287 if (cells[i].position == Edge){
288 edge1 = i;
289 cells[i].position = In;
290 i=cellEvolution.nTemplate;
291 }
292 i++;
293 }
294 i=0;
295 while (i<cellEvolution.nTemplate){
296 if (cells[i].position == Edge){
297 edge2=i;
298 cells[i].position = In;
299 i=cellEvolution.nTemplate;
300 }
301 i++;
302 }
303
304
305
306 if (cells[edge1].t0 > cells[edge2].t0){
307 LALPopulateNarrowEdge(status->statusPtr, &moments, &cells,
308 edge1, tempPars, &gridParam, &cellEvolution, &cellList, 0);
310 LALPopulateNarrowEdge(status->statusPtr, &moments, &cells,
311 edge2, tempPars, &gridParam, &cellEvolution, &cellList, 1);
313 }
314 else
315 {
316 LALPopulateNarrowEdge(status->statusPtr, &moments, &cells,
317 edge1, tempPars, &gridParam, &cellEvolution, &cellList, 1);
319 LALPopulateNarrowEdge(status->statusPtr, &moments, &cells,
320 edge2, tempPars, &gridParam, &cellEvolution, &cellList, 0);
322 }
323 }
324
325
326#endif
327
328
329
330 if (cellList != NULL)
331 ABORT(status, LALINSPIRALBANKH_EHEXAINIT,LALINSPIRALBANKH_MSGEHEXAINIT);
332 /* Here is the current number of template generated. Now, we need
333 * to clean some of them which might be redundant.
334 * */
335 *nlist = cellEvolution.nTemplate;
336
337 {
338 INT4 k ;
339 INT4 length;
340 length = cellEvolution.nTemplate;
341
342 for ( k = 0; k < length; k++)
343 {
344 REAL4 a;
345 REAL4 b;
346 REAL4 x0;
347 REAL4 tempA3;
348 SFindRootIn input;
349 INT4 valid;
350
351 PRIN prin;
352
353 tempA3 = pow(A3, -5./2.)/pow(0.25,-1.5);
354 tempPars->t0 = cells[k].t0;
355 tempPars->t3 = cells[k].t3;
356 /* if non physical parameter i.e below eta=0.25*/
357 if(cells[k].RectPosition[0] == Below )
358 {
359 INT4 above=0;
360
361 /*first, we define the line which is along the long semi-axis of the
362 * ambiguity function, defined by the angle theta and the position of
363 * the template.
364 * */
365 a = tan(cells[k].metric.theta);
366 b = cells[k].t3 - a * cells[k].t0;
367 /* and call a function to search for a solution along eta=1/4 */
368 input.function = LALSPAF;
369 input.xmin = cells[k].t3-1e-3;
370 input.xmax = 1000;
371 input.xacc = 1e-6;
372
373 prin.ct = a * A0 * tempA3;
374 prin.b = b;
375
376 LALSBisectionFindRoot(status->statusPtr,
377 &x0, &input, (void *)&prin);
379
380 tempPars->t3 = x0 + 1e-3; /* to be sure it is physical */
381 tempPars->t0 = (tempPars->t3 - b)/a;
382 if (tempPars->t0 > 0)
383 {
384 LALInspiralParameterCalc(status->statusPtr, tempPars);
386 }
387 else
388 {
389 LALWarning(status,"HybridHexagonal placement: nothing to be done since t0<=0\n");
390 }
391
392 cells[k].t0 = tempPars->t0;
393 cells[k].t3 = tempPars->t3;
394
395 /* update its position values */
396 valid = 1;
397 GetPositionRectangle(status->statusPtr, &cells, k, tempPars ,
398 &gridParam,
399 &cellEvolution,
400 &cellList,
401 &valid);
402 {
403
404 switch (cells[k].RectPosition[1]){
405 case Above: above +=1; break;
406 case In:
407 case Below:
408 case Out:
409 case Edge: break;
410 }
411 switch (cells[k].RectPosition[2]){
412 case Above: above +=1; break;
413 case In:
414 case Below:
415 case Out:
416 case Edge: break;
417 }
418 switch (cells[k].RectPosition[3]){
419 case Above: above +=1; break;
420 case In:
421 case Below:
422 case Out:
423 case Edge: break;
424 }
425 switch (cells[k].RectPosition[4]){
426 case Above: above +=1; break;
427 case In:
428 case Below:
429 case Out:
430 case Edge: break;
431 }
432 }
433
434
435 if (above == 2 && cells[k].position == In)
436 {
437 if (cells[k].child[0] >=0 )
438 {
439 cells[cells[k].child[0]].position = Out;
440 }
441 else
442 {
443 /* nothing to be done, the child is not valid anyway*/
444 }
445
446 }
447 else
448 {
449
450 }
451 }
452 else
453 {
454
455 }
456 }
457 }
458
459 for (i=0; i<cellEvolution.nTemplate; i++) {
460 if (cells[i].position == In ) {
461 *nlist = *nlist +1;
462 }
463 }
464
465
466
467 /* allocate appropriate memory and fill the output bank */
468 *list = (InspiralTemplateList*)
469 LALRealloc( *list, sizeof(InspiralTemplateList) * (*nlist+1) );
470 if ( ! *list )
471 {
472 LALFree( tempPars );
473 ABORT( status, LALINSPIRALBANKH_EMEM, LALINSPIRALBANKH_MSGEMEM );
474 }
475 memset( *list + *nlist, 0, sizeof(InspiralTemplateList) );
476 {
477 *nlist = 0 ;
478 for (i=0; i<cellEvolution.nTemplate; i++)
479 {
480 if ((cells[i].position == In) && (cells[i].t0 > 0))
481 {
482 tempPars->t0 = cells[i].t0;
483 tempPars->t3 = cells[i].t3;
484 tempPars->massChoice = t03;
485 tempPars->fLower = coarseIn.fLower;
486 LALInspiralParameterCalc( status->statusPtr, tempPars );
488
489 (*list)[*nlist].ID = *nlist;
490 (*list)[*nlist].params = *tempPars;
491 (*list)[*nlist].metric = cells[i].metric;
492 ++(*nlist);
493 }
494 }
495 }
496
497
498 LALFree( cells );
499 LALFree( tempPars );
500
502 RETURN ( status );
503}
504
505/** \see See \ref LALInspiralHybridHexagonalBank_c for documentation */
506REAL8
508 REAL8 tau0,
509 REAL8 fL,
510 REAL8 mMin,
511 REAL8 mMax)
512{
513 /*REAL8 piFa;*/
514 REAL8 tau3_a, tau3_b, M, eta, massSep;
515
516 /* First we solve for the lower (equal mass) limit */
518
519 /* Figure out the boundary between m1 = mMin and m1 = mMax */
520 M = mMin + mMax;
521 eta = (mMin*mMax)/pow(M, 2.0);
522 massSep = XLALInspiralTau0FromMEta(M, eta, fL);
523
524 /* Next we solve for the upper part */
525 if (tau0 >= massSep )
526 {
527 M = XLALInspiralMFromTau0AndNonEqualMass (tau0, mMin, fL);
528 eta = mMin*(M-mMin)/ pow(M,2.0);
529 }
530 else
531 {
532 M = XLALInspiralMFromTau0AndNonEqualMass (tau0, mMax, fL);
533 eta = mMax*(M-mMax)/ pow(M,2.0);
534 }
535
536 tau3_b = XLALInspiralTau3FromNonEqualMass(M,eta,fL);
537
538 return (0.5 * (tau3_a + tau3_b));
539}
540
541/** \see See \ref LALInspiralHybridHexagonalBank_c for documentation */
542void
544 InspiralMomentsEtc *moments,
545 InspiralCell **cell,
546 INT4 headId,
547 InspiralTemplate *paramsIn,
548 HexaGridParam *gridParam,
549 CellEvolution *cellEvolution,
550 CellList **cellList,
551 INT4 flag
552 )
553{
554 REAL4 dx0, dx1;
555 REAL4 theta;
556 INT4 next, iteration;
557 REAL4 x_int=0, y_int=0, xr_int, yr_int, c,s, dy,theta_min, theta_max, theta_int, a, b, t0, t3;
558
561
562 /* aliases to get the characteristics of the parent template, that we refer
563 * to its ID (headId) */
564
565 while ( (*cell)[headId].t0 < gridParam->x0Max && (*cell)[headId].t0 > gridParam->x0Min) {
566
567 dx0 = (*cell)[headId].dx0/sqrt(2.);
568 dx1 = (*cell)[headId].dx1/sqrt(2.);
569 theta = (*cell)[headId].metric.theta;
570
571 /* reallocate memory by set of 1000 cells if needed*/
572 if ( cellEvolution->nTemplate >= cellEvolution->nTemplateMax){
573 *cell = (InspiralCell*)
574 LALRealloc( *cell, sizeof(InspiralCell) * (cellEvolution->nTemplateMax + 1000) );
575 if ( ! cell ) {
576 ABORT( status, LALINSPIRALBANKH_EMEM, LALINSPIRALBANKH_MSGEMEM );
577 }
578 cellEvolution->nTemplateMax += 1000;
579 }
580
581 next = cellEvolution->nTemplate;
582
583 theta_min = 0.+.1 +LAL_PI/2.;
584 theta_max = 2*LAL_PI-.1+LAL_PI/2.;
585
586 theta_min = 0.+.1 ;
587 theta_max = 2*LAL_PI-.1;
588
589 /* we will search the intersection between the bissectrice of the parameter space and
590 the ellipse which crosses the center of the ellipses next to this point. Such an ellipse
591 has semi axes scaled by sqrt(3).*/
592 t0 = (*cell)[headId].t0;
593 t3 = (*cell)[headId].t3;
594 a = dx0 * sqrt(3.);
595 b = dx1 * sqrt(3.);
596 c = cos(theta);
597 s = sin(theta);
598
599
600 iteration = 1;
601 while (fabs(theta_max-theta_min)>(.1/180.*LAL_PI) && iteration<20)
602 {
603 /*for a given angle, what is the ellipse point whivh is the closest to the bissectrice?*/
604 theta_int = (theta_max + theta_min)/2.;
605
606 xr_int = a*cos(theta_int);
607 yr_int = b*sin(theta_int);
608
609 /*here are the coordinates of the point we are looking at, which stans on an ellipse of semi axis scaled by sqrt(3)
610 (suppose to cross all relevant template center)*/
611 x_int = xr_int *c - yr_int * s +t0;
612 y_int = xr_int *s + yr_int * c +t3;
613
614 /* how far this point is far away of the bissectrice ? */
615 dy = y_int - XLALInspiralBissectionLine(x_int, gridParam->fLower, gridParam->mMin,gridParam->mMax);
616 /* which direction shall we go for the dichotomy ? */
617 if (flag==0){
618 if (dy>0 )
619 theta_max = theta_int;
620 else
621 theta_min = theta_int;
622 }
623 else{
624 if (dy>0 )
625 theta_min = theta_int;
626 else
627 theta_max = theta_int;
628 }
629 iteration++;
630 }
631
632 /* let us save this new cell coordinate */
633
634 (*cell)[next].t0 = x_int;
635 (*cell)[next].t3 = y_int;
636
637 /*special case when the new position is outside the parameter space requested. */
638 if ( (*cell)[next].t0 > gridParam->x0Max ){
639 (*cell)[next].t0 = gridParam->x0Max;
640 (*cell)[next].t3 = XLALInspiralBissectionLine(gridParam->x0Max, gridParam->fLower, gridParam->mMin,gridParam->mMax);
641 }
642
643 if ( (*cell)[next].t3 > gridParam->x1Max ){
644 (*cell)[next].t0 = gridParam->x0Max;
645 (*cell)[next].t3 = XLALInspiralBissectionLine(gridParam->x0Max, gridParam->fLower, gridParam->mMin,gridParam->mMax);
646 }
647
648 if ( (*cell)[next].t0 < gridParam->x0Min ){
649 (*cell)[next].t0 = gridParam->x0Min;
650 (*cell)[next].t3 = XLALInspiralBissectionLine(gridParam->x0Min, gridParam->fLower, gridParam->mMin,gridParam->mMax);
651 }
652
653 /*Finally, we initialise the cell properly*/
654 LALInitHexagonalBank(status->statusPtr, cell, next,
655 moments, paramsIn, gridParam, cellEvolution, cellList);
656 /* and change the size of the population accordingly*/
657 cellEvolution->nTemplate++;
658
659 /* the parent celle can not populate anymore*/
660 (*cell)[next].status = Sterile;
661 (cellEvolution->fertile)=cellEvolution->fertile-1;
662 LALListDelete(cellList, next);
663 headId=next;
664
665
666 }
667
668 /*Similarly fot the first parent. */
669 (*cell)[headId].status = Sterile;
670 (cellEvolution->fertile)=cellEvolution->fertile-1;
671 LALListDelete(cellList, headId);
673 RETURN ( status );
674
675}
676/** @} */
void LALInspiralParameterCalc(LALStatus *status, InspiralTemplate *params)
#define LALRealloc(p, n)
#define LALCalloc(m, n)
#define LALMalloc(n)
#define LALFree(p)
#define ABORT(statusptr, code, mesg)
#define CHECKSTATUSPTR(statusptr)
#define ATTATCHSTATUSPTR(statusptr)
#define ASSERT(assertion, statusptr, code, mesg)
#define DETATCHSTATUSPTR(statusptr)
#define INITSTATUS(statusptr)
#define RETURN(statusptr)
int s
double i
double e
double theta
void LALSBisectionFindRoot(LALStatus *status, REAL4 *root, SFindRootIn *input, void *params)
#define LAL_PI
double REAL8
int32_t INT4
float REAL4
int LALWarning(LALStatus *status, const char *warning)
@ t03
chirptimes and , and
Definition: LALInspiral.h:185
@ m1Andm2
component masses
Definition: LALInspiral.h:179
void LALInitHexagonalBank(LALStatus *status, InspiralCell **cell, INT4 id, InspiralMomentsEtc *moments, InspiralTemplate *paramsIn, HexaGridParam *gridParam, CellEvolution *cellEvolution, CellList **cellList)
UINT4 LALListLength(CellList *head)
#define LALINSPIRALBANKH_EHEXAINIT
Empty bank.
void LALInspiralSetParams(LALStatus *status, InspiralTemplate *tempPars, InspiralCoarseBankIn coarseIn)
A routine that fills an InspiralTemplate structure based on the values in the InspiralCoarseBankIn st...
void GetPositionRectangle(LALStatus *status, InspiralCell **cell, INT4 id, InspiralTemplate *params, HexaGridParam *gridParam, CellEvolution *cellEvolution, CellList **cellList, INT4 *valid)
void LALInspiralSetSearchLimits(LALStatus *status, InspiralBankParams *bankParams, InspiralCoarseBankIn coarseIn)
Function which calculates the minimum and maximum values of and .
REAL4 XLALInspiralTau3FromTau0AndEqualMassLine(REAL4 tau0, REAL4 fL)
REAL8 XLALInspiralMFromTau0AndNonEqualMass(REAL8 tau0, REAL8 extremMass, REAL8 fL)
void LALPopulateCell(LALStatus *status, InspiralMomentsEtc *moments, InspiralCell **cell, INT4 l, InspiralTemplate *paramsIn, HexaGridParam *gridParam, CellEvolution *cellEvolution, CellList **cellList)
void LALGetInspiralMoments(LALStatus *status, InspiralMomentsEtc *moments, REAL8FrequencySeries *psd, InspiralTemplate *params)
void LALListDelete(CellList **headRef, INT4 id)
void LALSPAF(LALStatus *status, REAL4 *result, REAL4 x, void *t3)
#define LALINSPIRALBANKH_ESIZE
Invalid input range.
REAL4 XLALInspiralTau0FromMEta(REAL4 M, REAL4 eta, REAL4 fL)
#define LALINSPIRALBANKH_EMEM
Memory allocation failure.
REAL4 XLALInspiralTau3FromNonEqualMass(REAL4 m1, REAL4 m2, REAL4 fL)
@ Hexagonal
UNDOCUMENTED.
@ Edge
UNDOCUMENTED.
@ Above
UNDOCUMENTED.
@ Out
UNDOCUMENTED.
@ In
UNDOCUMENTED.
@ Below
UNDOCUMENTED.
@ Sterile
@ Fertile
void LALPopulateNarrowEdge(LALStatus *status, InspiralMomentsEtc *moments, InspiralCell **cell, INT4 headId, InspiralTemplate *paramsIn, HexaGridParam *gridParam, CellEvolution *cellEvolution, CellList **cellList, INT4 flag)
void LALInspiralCreatePNCoarseBankHybridHexa(LALStatus *status, InspiralTemplateList **list, INT4 *nlist, InspiralCoarseBankIn coarseIn)
REAL8 XLALInspiralBissectionLine(REAL8 tau0, REAL8 fL, REAL8 mMin, REAL8 mMax)
static const INT4 a
M
c
double t0
This is a structure needed in the inner workings of the LALInspiralHexagonalBank code.
This is a structure needed in the inner workings of the LALInspiralHexagonalBank code.
struct tagCellList * next
This is a structure needed in the inner workings of the LALInspiralHexagonalBank code.
InspiralBankMassRange massRange
GridSpacing gridSpacing
CoordinateSpace space
This is a structure needed in the inner workings of the LALInspiralCreateCoarseBank code.
REAL8 x1Max
maximum value of the second coordinate as defined by the search region
REAL8 x1Min
minimum value of the second coordinate as defined by the search region
REAL8 x0Min
minimum value of the first coordinate as defined by the search region
REAL8 x0Max
maximum value of the first coordinate as defined by the search region
This is a structure needed in the inner workings of the LALInspiralHexagonalBank code.
Position position
InspiralMetric metric
Input for choosing a template bank.
REAL8 mMin
minimum mass of components to search for
REAL8 mMax
maximum mass of components to search for
InspiralBankMassRange massRange
enum that determines whether templates should be chosen using fixed ranges for component masses or to...
GridSpacing gridSpacing
Type of gridspacing required.
REAL8FrequencySeries shf
Frequency series containing the PSD.
REAL8 MMax
alternatively, maximum total mass of binary to search for
REAL8 etamin
minimum value of eta in our search
REAL8 fLower
Lower frequency cutoff.
REAL8 mmCoarse
Coarse grid minimal match.
CoordinateSpace space
enum that decides whether to use or in constructing the template bank
REAL8 MMin
UNDOCUMENTED.
Parameter structure that holds the moments of the PSD and other useful constants required in the comp...
The inspiral waveform parameter structure containing information about the waveform to be generated.
Definition: LALInspiral.h:205
INT4 ieta
parameter that tells whether the symmetric mass ratio should be set to zero in the PN expansions of ...
Definition: LALInspiral.h:226
REAL8 eta
symmetric mass ratio (input/output)
Definition: LALInspiral.h:291
REAL8 totalMass
total mass of the binary in solar mass (input/output)
Definition: LALInspiral.h:292
REAL8 mass1
Mass of the primary in solar mass (input/output)
Definition: LALInspiral.h:211
REAL8 t3
1.5 post-Newtonian chirp time in seconds (input/output)
Definition: LALInspiral.h:296
REAL8 t0
Newtonain chirp time in seconds (input/output)
Definition: LALInspiral.h:294
REAL8 mass2
Mass of the secondary in solar mass (mass1 need not be larger than mass2 (input/output)
Definition: LALInspiral.h:212
InputMasses massChoice
The pair of (mass) parameters given (see structure defining this member for more details) (input)
Definition: LALInspiral.h:323
REAL8 fLower
lower frequency cutoff of the detector in Hz (input)
Definition: LALInspiral.h:217
A grid of inspiral templates (ie a template list).
UNDOCUMENTED.
REAL4 b
REAL4 ct
void(* function)(LALStatus *s, REAL4 *y, REAL4 x, void *p)