48#include <lal/LALInspiralBank.h>
49#include <lal/AVFactories.h>
50#include <lal/SeqFactories.h>
68 UINT4 numPSDpts=262144;
71 REAL8 samplingRate, dx0, dx1;
83 fpr = fopen(
"PNTemplates.out",
"w");
101 params.signalAmplitude=1.0;
116 coarseIn.
iflso = 0.0L;
118 coarseIn.
mMax = 20.0;
127 samplingRate =
params.tSampling;
138 dx0 = sqrt(2.L * (1.L-coarseIn.
mmCoarse)/metric.
g00);
139 dx1 = sqrt(2.L * (1.L-coarseIn.
mmCoarse)/metric.
g11);
143 fprintf(fpr,
"dp0=%e dp1=%e\n", dx0, dx1);
145 bankParams.
metric = &metric;
147 bankParams.
x0Min = 3.0;
148 bankParams.
x0Max = 10.00;
149 bankParams.
x1Min = 0.15;
150 bankParams.
x1Max = 1.25;
160 fprintf(fpr,
"Number of templates=%d dx0=%e dx1=%e\n", nlist, bankParams.
dx0, bankParams.
dx1);
167 for (j=0; j<nlist; j++)
175 if (valid)
fprintf(fpr,
"%10.4f %10.4f\n",
176 bankParams.
x0, bankParams.
x1);
187 RectIn.
dx = sqrt(2.0 * (1. - coarseIn.
mmCoarse)/metric.
g00 );
188 RectIn.
dy = sqrt(2.0 * (1. - coarseIn.
mmCoarse)/metric.
g11 );
193 for (j=0; j<nlist; j++)
205 fprintf(fpr,
"%e %e\n%e %e\n%e %e\n%e %e\n%e %e\n",
206 RectOut.
x1, RectOut.
y1,
207 RectOut.
x2, RectOut.
y2,
208 RectOut.
x3, RectOut.
y3,
209 RectOut.
x4, RectOut.
y4,
210 RectOut.
x5, RectOut.
y5);
243 moments->
a01 = 3.L/5.L;
246 moments->
a31 = -3.L/2.L;
248 moments->
a42 = 5429.L/5376.L * pow ( 25.L *
LAL_PI/2.L, 1.L/3.L);
249 moments->
a43 = 1.5293365L/1.0838016L * pow(5.L/(4.L*pow(
LAL_PI,4.L)), 1.L/3.L);
265 in.
norm = moments->
j[7];
269 fprintf (stderr,
"a01=%e a21=%e a22=%e a31=%e a41=%e a42=%e a43=%e \n",
271 moments->
a41, moments->
a42, moments->
a43);
273 fprintf(stderr,
"j7=%e\n", moments->
j[7]);
278 for (k=1; k<=17; k++)
void LALInspiralParameterCalc(LALStatus *status, InspiralTemplate *params)
void LALCheckMemoryLeaks(void)
#define CHECKSTATUSPTR(statusptr)
#define ATTATCHSTATUSPTR(statusptr)
#define ASSERT(assertion, statusptr, code, mesg)
#define DETATCHSTATUSPTR(statusptr)
#define INITSTATUS(statusptr)
#define RETURN(statusptr)
static void GetInspiralMoments(LALStatus *status, InspiralMomentsEtc *moments, REAL8FrequencySeries *psd, InspiralTemplate *params)
void XLALDestroyREAL4VectorSequence(REAL4VectorSequence *vecseq)
void LALSCreateVectorSequence(LALStatus *status, REAL4VectorSequence **vectorSequence, CreateVectorSequenceIn *vSeqParams)
@ t03
chirptimes and , and
@ m1Andm2
component masses
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...
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.
#define LALINSPIRALBANKH_ENULL
Null pointer.
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 LALInspiralMoments(LALStatus *status, REAL8 *moment, InspiralMomentsIn pars)
void LALInspiralComputeMetric(LALStatus *status, InspiralMetric *metric, InspiralTemplate *params, InspiralMomentsEtc *moments)
@ Tau0Tau3
space of chirptimes
void LALNoiseSpectralDensity(LALStatus *status, REAL8Vector *psd, void(*NoisePsd)(LALStatus *status, REAL8 *shf, REAL8 f), REAL8 df)
void LALLIGOIPsd(LALStatus UNUSED *status, REAL8 *psd, REAL8 f)
void LALDCreateVector(LALStatus *, REAL8Vector **, UINT4)
void LALDDestroyVector(LALStatus *, REAL8Vector **)
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
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.
Input for choosing a template bank.
REAL8 mmFine
Fine grid minimal match.
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.
LALPNOrder order
Post-Newtonian order of the waveform.
INT4 iflso
iflso is an integer that tells whether to compute the moments using an upper limit defined by flso; t...
REAL8 MMax
alternatively, maximum total mass of binary to search for
REAL8 etamin
minimum value of eta in our search
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.
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...
REAL8 j[18]
The required moments are all computed once and stored in this array; The required moments are from J(...
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.
Input structure to function LALRectangleVertices()
Output structure to function LALRectangleVertices().