171#include <lal/LALInspiralBank.h>
172#include <lal/AVFactories.h>
173#include <lal/SeqFactories.h>
174#include <lal/LALStdio.h>
175#include <lal/FindRoot.h>
274 for (
i = 0;
i < *nlist - 1 ; ++
i )
277 (*list)[
i].params.next = &((*list)[
i+1].params);
278 (*list)[
i].params.fine = NULL;
281 (*list)[
i].params.next = NULL;
282 (*list)[
i].params.fine = NULL;
332 tempPars->
eta = 0.25;
333 tempPars->
ieta = 1.L;
352 for (
i=0;
i < nlist;
i++)
357 if ( (*list)[
i].params.totalMass > coarseIn.
MMax )
360 C = (*list)[
i].params.t3 - ms*((*list)[
i].params.t0);
363 (*list)[
i].params.t3 = C / ( 1. - (ms*P/(
M*
Q)) );
364 (*list)[
i].params.t0 = P*(*list)[
i].params.t3/(
M*
Q);
373 if ( (*list)[
i].
params.eta > 0.25L )
375 InputMasses originalMassChoice = (*list)[
i].params.massChoice;
377 (*list)[
i].params.totalMass = coarseIn.
MMax ;
378 (*list)[
i].params.eta = 0.25L;
385 (*list)[
i].params.massChoice = originalMassChoice;
390 &((*list)[
i].params), &moments );
419 REAL8 x01, x02, x11, x12, dist1, dist2, ndx1, ndx2, a25;
455 tempPars->
eta = 0.25;
456 tempPars->
ieta = 1.L;
485 (*list)[*nlist].ID = *nlist;
486 (*list)[*nlist].params = *tempPars;
487 (*list)[*nlist].metric = metric;
494 switch ( coarseIn.
space )
499 a25 = pow(64.L/5.L, ndx1)*(2435.L/8064.L)/pow(
LAL_PI*coarseIn.
fLower,.4L);
515 bankParsOld = bankPars;
517 while ( bankPars.
x0 < bankPars.
x0Max )
519 x01 = bankPars.
x0 + bankPars.
dx0;
520 x11 = a25 * pow(x01,ndx1);
521 x12 = bankPars.
x1 + bankPars.
dx1;
522 x02 = pow(x12/a25,ndx2);
523 dist1 = pow(bankPars.
x0 - x01,2.L) + pow(bankPars.
x1 - x11, 2.L);
524 dist2 = pow(bankPars.
x0 - x02,2.L) + pow(bankPars.
x1 - x12, 2.L);
538 &validPars, bankPars, coarseIn );
544 tempPars, bankPars, coarseIn);
547 &metric, tempPars, &moments );
550 &bankPars, metric, coarseIn.
mmCoarse );
562 (*list)[*nlist].ID = *nlist;
563 (*list)[*nlist].params = *tempPars;
564 (*list)[*nlist].metric = metric;
570 bankPars = bankParsOld;
573 while ( bankPars.
x1 <= bankPars.
x1Max )
576 while ( bankPars.
x0 <= bankPars.
x0Max )
580 &validPars, bankPars, coarseIn );
586 tempPars, bankPars, coarseIn );
589 &metric, tempPars, &moments );
592 &bankPars, metric, coarseIn.
mmCoarse );
604 (*list)[*nlist].ID = *nlist;
605 (*list)[*nlist].params = *tempPars;
606 (*list)[*nlist].metric = metric;
610 bankPars.
x0 += bankPars.
dx0;
612 bankPars = bankParsOld;
613 bankPars.
x1 += bankPars.
dx1;
621 &validPars, bankPars, coarseIn );
623 while ( validPars == 0 && bankPars.
x0 < bankPars.
x0Max )
625 bankPars.
x0 += bankPars.
dx0;
627 &validPars, bankPars, coarseIn );
630 bankParsOld = bankPars;
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)
int LALWarning(LALStatus *status, const char *warning)
InputMasses
This structure is one of the members of the InspiralTemplate structure.
@ totalMassAndEta
total mass and symmetric mass ratio
void LALInspiralUpdateParams(LALStatus *status, InspiralBankParams *bankParams, InspiralMetric metric, REAL8 minimalMatch)
Function to update the parameters used in creating a coarse bank based on a square lattice.
void LALInspiralNextTemplate(LALStatus *status, InspiralBankParams *bankPars, InspiralMetric metric)
Routine to compute the parameters of the template next to the current template, but in the positive ...
#define LALINSPIRALBANKH_EGRIDSPACING
Inappropriate grid spacing parameter [SquareNotOriented or Hexagonal].
void LALInspiralCreateBCVBank(LALStatus *status, InspiralTemplateList **list, INT4 *nlist, InspiralCoarseBankIn coarseIn)
Lay a flat grid of BCV templates in the user specified range of the parameters in coarseIn structure...
#define LALINSPIRALBANKH_ECHOICE
Invalid choice for an input parameter.
#define LALINSPIRALBANKH_ENULL
Null pointer.
void LALInspiralSetParams(LALStatus *status, InspiralTemplate *tempPars, InspiralCoarseBankIn coarseIn)
A routine that fills an InspiralTemplate structure based on the values in the InspiralCoarseBankIn st...
void LALInspiralSetSearchLimits(LALStatus *status, InspiralBankParams *bankParams, InspiralCoarseBankIn coarseIn)
Function which calculates the minimum and maximum values of and .
void LALInspiralCreatePNCoarseBankHexa(LALStatus *status, InspiralTemplateList **list, INT4 *nlist, InspiralCoarseBankIn coarseIn)
void LALInspiralValidTemplate(LALStatus *status, INT4 *valid, InspiralBankParams bankParams, InspiralCoarseBankIn coarseIn)
Function which checks whether or not a given template should be kept in the template list.
void LALInspiralComputeParams(LALStatus *status, InspiralTemplate *pars, InspiralBankParams bankParams, InspiralCoarseBankIn coarseIn)
This function takes as input , and (the lower frequency of the detectors sensitivity),...
void LALInspiralCreatePNCoarseBankHybridHexa(LALStatus *status, InspiralTemplateList **list, INT4 *nlist, InspiralCoarseBankIn coarseIn)
void LALGetInspiralMoments(LALStatus *status, InspiralMomentsEtc *moments, REAL8FrequencySeries *psd, InspiralTemplate *params)
#define LALINSPIRALBANKH_ESIZE
Invalid input range.
#define LALINSPIRALBANKH_EMEM
Memory allocation failure.
void LALInspiralComputeMetric(LALStatus *status, InspiralMetric *metric, InspiralTemplate *params, InspiralMomentsEtc *moments)
@ MinMaxComponentTotalMass
@ MinComponentMassMaxTotalMass
@ SquareNotOriented
UNDOCUMENTED.
@ HybridHexagonal
UNDOCUMENTED.
@ PTFFull
PTF metric in the full parameter space (intrinsic and extrinsic parameters).
@ Tau0Tau2
space of chirptimes
@ Psi0Psi3
for BCV templates
@ Tau0Tau3
space of chirptimes
@ PTFIntrinsic
a PTF metric in only the intrinsic parameters (a matrix)
void LALInspiralCreatePNCoarseBank(LALStatus *status, InspiralTemplateList **list, INT4 *nlist, InspiralCoarseBankIn coarseIn)
void LALNudgeTemplatesToConstantTotalMassLine(LALStatus *status, InspiralTemplateList **list, INT4 nlist, InspiralCoarseBankIn coarseIn)
Anand: 26 October 2006 This function nudges the templates in the list to the (max-total-mass = consta...
void LALInspiralCreateCoarseBank(LALStatus *status, InspiralTemplateList **list, INT4 *nlist, InspiralCoarseBankIn coarseIn)
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 x1
the second coordinate, chosen to be either or
REAL8 dx0
increment in the x0-direction
REAL8 dx1
increment in the x1-direction
REAL8 x0Max
maximum value of the first coordinate as defined by the search region
REAL8 x0
the first coordinate, chosen to be always
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...
REAL8 tSampling
Sampling rate.
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 fUpper
Upper frequency cutoff.
REAL8 fLower
Lower frequency cutoff.
Approximant approximant
Approximant of the waveform.
REAL8 mmCoarse
Coarse grid minimal match.
CoordinateSpace space
enum that decides whether to use or in constructing the template bank
Structure to store metric at various points the signal manifold.
CoordinateSpace space
The enum describing the coordinate space in which the metric is computed.
REAL8 theta
Angle from tau0 to semi-major axis of the ellipse.
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)
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).