20#ifndef _LALINSPIRALBANK_H
21#define _LALINSPIRALBANK_H
26#include <lal/LALStdlib.h>
27#include <lal/LALConstants.h>
28#include <lal/LALInspiral.h>
29#include <lal/RealFFT.h>
30#include <lal/LALNoiseModels.h>
31#include <lal/LIGOMetadataTables.h>
57#define LALINSPIRALBANKH_ENULL 1
58#define LALINSPIRALBANKH_EMEM 2
59#define LALINSPIRALBANKH_ECHOICE 3
60#define LALINSPIRALBANKH_EDIV0 4
61#define LALINSPIRALBANKH_ESIZE 8
62#define LALINSPIRALBANKH_EFRANGE 16
63#define LALINSPIRALBANKH_EORDER 32
64#define LALINSPIRALBANKH_EGRIDSPACING 64
65#define LALINSPIRALBANKH_EHEXAINIT 128
66#define LALINSPIRALBANKH_EFCUT 5
67#define LALINSPIRALBANKH_EFHIGH 6
68#define LALINSPIRALBANKH_ENUMFCUT 7
72#define LALINSPIRALBANKH_MSGENULL "Null pointer"
73#define LALINSPIRALBANKH_MSGEMEM "Memory allocation failure"
74#define LALINSPIRALBANKH_MSGECHOICE "Invalid choice for an input parameter"
75#define LALINSPIRALBANKH_MSGEDIV0 "Division by zero"
76#define LALINSPIRALBANKH_MSGESIZE "Invalid input range"
77#define LALINSPIRALBANKH_MSGEFRANGE "Limits outside range of frequency series"
78#define LALINSPIRALBANKH_MSGEORDER "Inappropriate PN order"
79#define LALINSPIRALBANKH_MSGEGRIDSPACING "Inappropriate grid spacing parameter [SquareNotOriented or Hexagonal]"
80#define LALINSPIRALBANKH_MSGEHEXAINIT "Empty bank. abnormal behaviour in HexaBank generation."
81#define LALINSPIRALBANKH_MSGEFCUT "Inappropriate cutoff frequency [SchwarzISCO, BKLISCO, LightRing, ERD, FRD or LRD]"
82#define LALINSPIRALBANKH_MSGEFHIGH "Final frequency is less than the low frequency cutoff."
83#define LALINSPIRALBANKH_MSGENUMFCUT "Number of fcut must be greater or equal to 1"
196tagInspiralBankMassRange
271tagInspiralTemplateList
277 struct tagInspiralTemplateList *
next;
398tagInspiralCoarseBankIn
537tagInspiralMomentsEtcBCV
752LALInspiralSpinBankBoundary(
820 UINT4 *templateLength,
static void LALInspiralSpinBankMetric(LALStatus *status, REAL4Array *metric, InspiralMomentsEtc *moments, InspiralTemplate *inspiralTemplate, REAL4 *f0)
void LALInspiralCreatePNCoarseBank(LALStatus *status, InspiralTemplateList **list, INT4 *nlist, InspiralCoarseBankIn coarseIn)
void LALInspiralValidParams(LALStatus *status, INT4 *valid, InspiralBankParams bankParams, InspiralCoarseBankIn coarseIn)
Function which checks whether or not a pair of parameter values are consistent with the search space.
void LALInsidePolygon(LALStatus *status, REAL4 *inputx, REAL4 *inputy, INT4 n, REAL4 x, REAL4 y, INT4 *valid)
Module to check whether a point with coordinates (x,y) is inside a polygon defined by the vectors (vx...
void LALExcludeTemplate(LALStatus *status, INT4 *valid, InspiralBankParams *bankParams, REAL4 x, REAL4 y)
void LALInitHexagonalBank(LALStatus *status, InspiralCell **cell, INT4 id, InspiralMomentsEtc *moments, InspiralTemplate *paramsIn, HexaGridParam *gridParam, CellEvolution *cellEvolution, CellList **cellList)
void LALInspiralBCVRegularFcutBank(LALStatus *status, InspiralTemplateList **list, INT4 *NList, InspiralCoarseBankIn coarseIn)
UNDOCUMENTED.
InspiralBankMassRange
An enum that appears in the InspiralCoarseBankIn structure which fixes the way templates are chosen: ...
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 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 LALInspiralCreateFineBank(LALStatus *status, InspiralTemplateList **outlist, INT4 *nlist, InspiralFineBankIn fineIn)
Function to create a fine grid of templates.
UINT4 LALListLength(CellList *head)
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 ...
INT4 XLALInspiralComputePTFIntrinsicMetric(InspiralMetric *metric, REAL8Vector *fullmetric, REAL8FrequencySeries *psd, InspiralTemplate *params)
GridSpacing
This enum is set by the user to specify the type of placement requested.
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...
void LALInspiralBCVBankFcutS3S4(LALStatus *status, InspiralTemplateList **list, INT4 *NList, InspiralCoarseBankIn coarseIn)
UNDOCUMENTED.
void LALInspiralComputeMetricBCV(LALStatus *status, InspiralMetric *metric, REAL8FrequencySeries *psd, InspiralTemplate *params)
UNDOCUMENTED.
void LALRectangleVertices(LALStatus *status, RectangleOut *out, RectangleIn *in)
Function to find the vertices of a rectangle given its centre, half side-lengths and orientation angl...
void LALInspiralCreateFlatBank(LALStatus *status, REAL4VectorSequence *list, InspiralBankParams *bankParams)
The code expects list->vectorLength=2 and allocates just the requisite amount of memory to list and r...
REAL8 XLALInspiralMoments(REAL8 xmin, REAL8 xmax, REAL8 ndx, REAL8 norm, REAL8FrequencySeries *shf)
void LALInspiralSetParams(LALStatus *status, InspiralTemplate *tempPars, InspiralCoarseBankIn coarseIn)
A routine that fills an InspiralTemplate structure based on the values in the InspiralCoarseBankIn st...
InsidePolygonEnum
This enum is set to true or false, it is just a boolean variable for the purpose of BCV placement but...
void GetPositionRectangle(LALStatus *status, InspiralCell **cell, INT4 id, InspiralTemplate *params, HexaGridParam *gridParam, CellEvolution *cellEvolution, CellList **cellList, INT4 *valid)
void LALPSItoMasses(LALStatus *status, InspiralTemplate *params, UINT4 *valid, REAL4 thisfreq)
UNDOCUMENTED.
INT4 XLALInspiralComputePTFWaveform(REAL8Vector *ptfwave, InspiralTemplate *params)
void LALInspiralSetSearchLimits(LALStatus *status, InspiralBankParams *bankParams, InspiralCoarseBankIn coarseIn)
Function which calculates the minimum and maximum values of and .
void LALEmpiricalPSItoMassesConversion(LALStatus *status, InspiralTemplate *params, UINT4 *valid, REAL4 lightring)
UNDOCUMENTED.
void LALInspiralLongestTemplateInBank(LALStatus *status, UINT4 *templateLength, InspiralCoarseBankIn *coarseIn)
Function to find the longest template in a template bank.
void LALInspiralCreateFlatBankS3S4(LALStatus *status, REAL4VectorSequence *list, InspiralBankParams *bankParams, InspiralCoarseBankIn coarseIn)
UNDOCUMENTED.
void LALInspiralCreatePNCoarseBankHexa(LALStatus *status, InspiralTemplateList **list, INT4 *nlist, InspiralCoarseBankIn coarseIn)
int XLALInspiralComputeMetric(InspiralMetric *metric, InspiralMomentsEtc *moments, REAL8 fLower, LALPNOrder order, REAL8 t0, REAL8 t3)
Function to compute the components of the metric which is used to describe distances on the signal ma...
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.
INT4 XLALInspiralComputePTFWDeriv(COMPLEX16Vector *Wderiv, REAL8FrequencySeries *psd, InspiralTemplate *params, INT4 paramid, REAL8 initdelta, REAL8 tolerance)
void LALInspiralSpinBank(LALStatus *status, SnglInspiralTable **tiles, INT4 *ntiles, InspiralCoarseBankIn *coarseIn)
This function creates a bank of BCVSpin templates to search for precessing binaries.
REAL4 XLALInspiralTau3FromTau0AndEqualMassLine(REAL4 tau0, REAL4 fL)
ComputeMoments
UNDOCUMENTED.
void LALInspiralBankGeneration(LALStatus *status, InspiralCoarseBankIn *in, SnglInspiralTable **out, INT4 *count)
void LALInspiralMoments(LALStatus *status, REAL8 *moment, InspiralMomentsIn pars)
void LALHexagonVertices(LALStatus *status, HexagonOut *out, RectangleIn *in)
void LALInspiralCreateCoarseBank(LALStatus *status, InspiralTemplateList **list, INT4 *nlist, InspiralCoarseBankIn bankIn)
int XLALGetInspiralMoments(InspiralMomentsEtc *moments, REAL8 fLower, REAL8 fCutoff, REAL8FrequencySeries *psd)
REAL8 XLALInspiralMFromTau0AndNonEqualMass(REAL8 tau0, REAL8 extremMass, REAL8 fL)
void LALListAppend(CellList **headRef, INT4 id)
Position
This enum can take the following values In, Out, Below, Edge, Above and is used only by the Hexagonal...
void LALPopulateCell(LALStatus *status, InspiralMomentsEtc *moments, InspiralCell **cell, INT4 l, InspiralTemplate *paramsIn, HexaGridParam *gridParam, CellEvolution *cellEvolution, CellList **cellList)
REAL8 XLALInspiralBissectionLine(REAL8 x, REAL8 fL, REAL8 mMin, REAL8 mMax)
void LALFindPosition(LALStatus *status, REAL4 dx0, REAL4 dx1, Position *position, InspiralTemplate *paramsIn, HexaGridParam *gridParam)
void LALInspiralComputeParams(LALStatus *status, InspiralTemplate *pars, InspiralBankParams bankParams, InspiralCoarseBankIn coarseIn)
This function takes as input , and (the lower frequency of the detectors sensitivity),...
void LALSPAValidPosition(LALStatus *status, InspiralCell **cell, INT4 id1, InspiralMomentsEtc *moments, CellEvolution *cellEvolution, CellList **list)
void LALInspiralCreatePNCoarseBankHybridHexa(LALStatus *status, InspiralTemplateList **list, INT4 *nlist, InspiralCoarseBankIn coarseIn)
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)
void LALGetInspiralMomentsBCV(LALStatus *status, InspiralMomentsEtcBCV *moments, REAL8FrequencySeries *psd, InspiralTemplate *params)
Generation
This enum is either fertile,sterile, and is a boolean expression used only by the Hexagonal placement...
FreqCut
An enum that lists all the formulas that can be used to specify an upper frequency cutoff.
CoordinateSpace
Choose templates either in the or space.
REAL4 XLALInspiralTau0FromMEta(REAL4 M, REAL4 eta, REAL4 fL)
void LALInspiralComputeMetric(LALStatus *status, InspiralMetric *metric, InspiralTemplate *params, InspiralMomentsEtc *moments)
REAL4 XLALInspiralTau3FromNonEqualMass(REAL4 m1, REAL4 m2, REAL4 fL)
void LALInspiralBCVFcutBank(LALStatus *status, InspiralTemplateList **list, INT4 *NList, InspiralCoarseBankIn coarseIn)
Given a grid of templates with distinct values of this routine returns a new grid in which every tem...
@ MinMaxComponentTotalMass
@ MinComponentMassMaxTotalMass
@ SquareNotOriented
UNDOCUMENTED.
@ HexagonalNotOriented
UNDOCUMENTED.
@ HybridHexagonal
UNDOCUMENTED.
@ FreqCut_SchwarzISCO
the innermost stable circular orbit (ISCO) for a test particle orbiting a Schwarzschild black hole
@ FreqCut_FRD
the "Fundamental RingDown" frequency which is calculated from the Berti, Cardoso and Will (arXiv:gr-q...
@ FreqCut_LightRing
the unstable circular orbit for photons orbiting a Schwarzschild black hole
@ FreqCut_ERD
an effective ringdown frequency studied in Pan et al (arXiv:0704.1964) that was found to give good fi...
@ FreqCut_BKLISCO
a mass ratio dependent ISCO derived from estimates of the final spin of a merged black found in a pap...
@ FreqCut_LRD
the "Lorentzian RingDown" frequency = 1.2*FRD which captures part of the Lorentzian tail from the dec...
@ 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)
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 x1
the second coordinate, chosen to be either or
REAL8 x0Min
minimum value of the first coordinate as defined by the search region
REAL8 dx0
increment in the x0-direction
InspiralMetric * metric
pointer to the metric at the current location
REAL8 dx1
increment in the x1-direction
INT4 nparams
Number of parameters (currently fixed at 2, so this is as of now unused)
REAL8 x0Max
maximum value of the first coordinate as defined by the search region
REAL8 x0
the first coordinate, chosen to be always
REAL8 minimalMatch
UNDOCUMENTED.
This is a structure needed in the inner workings of the LALInspiralHexagonalBank code.
Input for choosing a template bank.
REAL8 mmFine
Fine grid minimal match.
INT4 nPointsKappa
UNDOCUMENTED.
INT4 nPointsChi
UNDOCUMENTED.
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.
UINT4 iseed
See for random number generation in RandomBank algorithm.
GridSpacing gridSpacing
Type of gridspacing required.
REAL8 kappaMax
UNDOCUMENTED.
ComputeMoments computeMoments
ComputeMoments tells whether to re-compute the moments using an upper limit defined by flso; This is ...
INT4 numFreqCut
Number of different upper frequency cutoffs (spaced evenly between minFreqCut and maxFreqCut) to use ...
REAL8FrequencySeries shf
Frequency series containing the PSD.
REAL8 chiMin
UNDOCUMENTED.
LALPNOrder order
Post-Newtonian order of the waveform.
REAL8 psi3Min
minimum value of the parameter
REAL8 betaMin
UNDOCUMENTED.
INT4 iflso
iflso is an integer that tells whether to compute the moments using an upper limit defined by flso; t...
InsidePolygonEnum insidePolygon
UNDOCUMENTED.
REAL8 MMax
alternatively, maximum total mass of binary to search for
INT4 spinBank
spinBank=0:use Owen+Hanna bank, spinBank=1:use extended bank by AEI/Cardiff/Osaka,...
FreqCut minFreqCut
smallest upper frequency cutoff to use
REAL8 etamin
minimum value of eta in our search
UINT4 ShMaxSz
Maximum size of the power spectral density array for use in the computation of the metric in SBBH; ty...
REAL8 fUpper
Upper frequency cutoff.
REAL8 fLower
Lower frequency cutoff.
REAL4 HighGM
UNDOCUMENTED.
Approximant approximant
Approximant of the waveform.
UINT4 numFcutTemplates
Number of templates required in the fCut (upper cutoff) dimension and the value of upper and lower cu...
REAL8 kappaMin
UNDOCUMENTED.
REAL8 psi3Max
maximum value of the parameter
REAL8 mmCoarse
Coarse grid minimal match.
CoordinateSpace space
enum that decides whether to use or in constructing the template bank
REAL8 alpha
the BCV amplitude correction parameter
REAL8 betaMax
UNDOCUMENTED.
UINT4 nTIni
nTIni is an estimate for the number of templates that might be required; this is used in the random b...
REAL8 psi0Min
minimum value of the parameter
REAL8 psi0Max
maximum value of the parameter
REAL8 chiMax
UNDOCUMENTED.
FreqCut maxFreqCut
largest upper frequency cutoff to use
Structure needed by the function LALInspiralCreateFineBank.
InspiralCoarseBankIn coarseIn
input structure that contains useful necessary parameters to construct a fine-mesh
InspiralTemplateList templateList
A list containing all the fine-mesh templates.
Structure to store metric at various points the signal manifold.
REAL8 g11
11-component of the diagonalised metric
CoordinateSpace space
The enum describing the coordinate space in which the metric is computed.
REAL8 G01
01-component of the metric in coordinates
REAL8 g00
00-component of the diagonalised metric
REAL8 theta
Angle from tau0 to semi-major axis of the ellipse.
REAL8 G00
00-component of the metric in coordinates
REAL8 G11
11-component of the metric in coordinates
Parameter structure that holds the moments of the PSD and other useful constants required in the comp...
Inputs to the function that computes the moments of the PSD.
REAL8FrequencySeries * shf
the frequency series containing the noise psd
REAL8 norm
norm to be used in computing the moment, the returned value is the above integral divided by the norm
REAL8 ndx
index (without the negative sign) in the moment integral as above
REAL8 xmax
upper limit of the integral
REAL8 xmin
lower limit of the integral
The inspiral waveform parameter structure containing information about the waveform to be generated.
A grid of inspiral templates (ie a template list).
UINT4 nLayer
UNDOCUMENTED.
InspiralTemplate params
Value of the parameters at the lattice point.
INT4 ID
An unique integer ID of the template.
struct tagInspiralTemplateList * next
pointer to next lattice point; but this is currently not filled by the bank code
InspiralMetric metric
metric at the lattice point
Input structure to function LALRectangleVertices()
Output structure to function LALRectangleVertices().