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>
159 tempPars->
eta = 0.25;
160 tempPars->
ieta = 1.L;
205 cells[0].
t0 = tempPars->
t0;
206 cells[0].
t3 = tempPars->
t3;
210 A0 = 5. / pow(piFl, 8./3.) / 256.;
211 A3 =
LAL_PI / pow(piFl, 5./3.)/8.;
219 &gridParam, &cellEvolution,
226 INT4 *new_list = NULL;
252 for ( k = 0; k < length; k++)
254 new_list[k] = ptr->
id;
258 for (kk = 0; kk < length; kk++)
264 k, tempPars, &gridParam, &cellEvolution, &cellList);
281 INT4 edge1=0, edge2=0;
287 if (cells[
i].position ==
Edge){
296 if (cells[
i].position ==
Edge){
306 if (cells[edge1].
t0 > cells[edge2].
t0){
308 edge1, tempPars, &gridParam, &cellEvolution, &cellList, 0);
311 edge2, tempPars, &gridParam, &cellEvolution, &cellList, 1);
317 edge1, tempPars, &gridParam, &cellEvolution, &cellList, 1);
320 edge2, tempPars, &gridParam, &cellEvolution, &cellList, 0);
330 if (cellList != NULL)
342 for ( k = 0; k < length; k++)
353 tempA3 = pow(A3, -5./2.)/pow(0.25,-1.5);
354 tempPars->
t0 = cells[k].
t0;
355 tempPars->
t3 = cells[k].
t3;
357 if(cells[k].RectPosition[0] ==
Below )
365 a = tan(cells[k].metric.theta);
366 b = cells[k].
t3 -
a * cells[k].
t0;
373 prin.
ct =
a * A0 * tempA3;
377 &x0, &input, (
void *)&prin);
380 tempPars->
t3 = x0 + 1
e-3;
381 tempPars->
t0 = (tempPars->
t3 - b)/
a;
382 if (tempPars->
t0 > 0)
389 LALWarning(
status,
"HybridHexagonal placement: nothing to be done since t0<=0\n");
392 cells[k].
t0 = tempPars->
t0;
393 cells[k].
t3 = tempPars->
t3;
404 switch (cells[k].RectPosition[1]){
405 case Above: above +=1;
break;
411 switch (cells[k].RectPosition[2]){
412 case Above: above +=1;
break;
418 switch (cells[k].RectPosition[3]){
419 case Above: above +=1;
break;
425 switch (cells[k].RectPosition[4]){
426 case Above: above +=1;
break;
435 if (above == 2 && cells[k].position ==
In)
437 if (cells[k].child[0] >=0 )
460 if (cells[
i].position ==
In ) {
480 if ((cells[
i].position ==
In) && (cells[
i].
t0 > 0))
482 tempPars->
t0 = cells[
i].
t0;
483 tempPars->
t3 = cells[
i].
t3;
489 (*list)[*nlist].ID = *nlist;
490 (*list)[*nlist].params = *tempPars;
491 (*list)[*nlist].metric = cells[
i].
metric;
514 REAL8 tau3_a, tau3_b,
M, eta, massSep;
521 eta = (mMin*mMax)/pow(
M, 2.0);
525 if (tau0 >= massSep )
528 eta = mMin*(
M-mMin)/ pow(
M,2.0);
533 eta = mMax*(
M-mMax)/ pow(
M,2.0);
538 return (0.5 * (tau3_a + tau3_b));
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;
565 while ( (*cell)[headId].t0 < gridParam->x0Max && (*cell)[headId].
t0 > gridParam->
x0Min) {
567 dx0 = (*cell)[headId].dx0/sqrt(2.);
568 dx1 = (*cell)[headId].dx1/sqrt(2.);
569 theta = (*cell)[headId].metric.theta;
583 theta_min = 0.+.1 +
LAL_PI/2.;
592 t0 = (*cell)[headId].t0;
593 t3 = (*cell)[headId].t3;
601 while (fabs(theta_max-theta_min)>(.1/180.*
LAL_PI) && iteration<20)
604 theta_int = (theta_max + theta_min)/2.;
606 xr_int =
a*cos(theta_int);
607 yr_int = b*sin(theta_int);
611 x_int = xr_int *
c - yr_int *
s +
t0;
612 y_int = xr_int *
s + yr_int *
c +t3;
619 theta_max = theta_int;
621 theta_min = theta_int;
625 theta_min = theta_int;
627 theta_max = theta_int;
634 (*cell)[next].t0 = x_int;
635 (*cell)[next].t3 = y_int;
638 if ( (*cell)[next].
t0 > gridParam->
x0Max ){
639 (*cell)[next].t0 = gridParam->
x0Max;
643 if ( (*cell)[next].t3 > gridParam->
x1Max ){
644 (*cell)[next].t0 = gridParam->
x0Max;
648 if ( (*cell)[next].t0 < gridParam->x0Min ){
649 (*cell)[next].t0 = gridParam->
x0Min;
655 moments, paramsIn, gridParam, cellEvolution, cellList);
660 (*cell)[next].status =
Sterile;
669 (*cell)[headId].status =
Sterile;
void LALInspiralParameterCalc(LALStatus *status, InspiralTemplate *params)
#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)
void LALSBisectionFindRoot(LALStatus *status, REAL4 *root, SFindRootIn *input, void *params)
int LALWarning(LALStatus *status, const char *warning)
@ t03
chirptimes and , and
@ m1Andm2
component masses
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)
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)
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
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.
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
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.
INT4 ieta
parameter that tells whether the symmetric mass ratio should be set to zero in the PN expansions of ...
REAL8 eta
symmetric mass ratio (input/output)
REAL8 totalMass
total mass of the binary in solar mass (input/output)
REAL8 mass1
Mass of the primary in solar mass (input/output)
REAL8 t3
1.5 post-Newtonian chirp time in seconds (input/output)
REAL8 t0
Newtonain chirp time in seconds (input/output)
REAL8 mass2
Mass of the secondary in solar mass (mass1 need not be larger than mass2 (input/output)
InputMasses massChoice
The pair of (mass) parameters given (see structure defining this member for more details) (input)
REAL8 fLower
lower frequency cutoff of the detector in Hz (input)
A grid of inspiral templates (ie a template list).
void(* function)(LALStatus *s, REAL4 *y, REAL4 x, void *p)