Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALInspiral 5.0.3.1-5e288d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
LALInspiralBank.h
Go to the documentation of this file.
1/*
2* Copyright (C) 2007 Chad Hanna, David Churches, Duncan Brown, Jolien Creighton, Benjamin Owen, B.S. Sathyaprakash, Anand Sengupta, Craig Robinson , Thomas Cokelaer, Evan Ochsner
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#ifndef _LALINSPIRALBANK_H
21#define _LALINSPIRALBANK_H
22
23#include <math.h>
24#include <stdio.h>
25#include <stdlib.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>
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37/**
38 * \defgroup LALInspiralBank_h Header LALInspiralBank.h
39 * \ingroup lalinspiral_bank
40 * \author Churches, D.K. and Sathyaprakash, B.S., Cokelaer, T.
41 *
42 * \brief %Header file for the template placement codes.
43 *
44 * ### Synopsis ###
45 *
46 * \code
47 * #include <lal/LALInspiralBank.h>
48 * \endcode
49 *
50 * This header file covers routines that are used in template placement.
51 *
52 */
53/** @{ */
54
55/**\name Error Codes */
56/** @{ */
57#define LALINSPIRALBANKH_ENULL 1 /**< Null pointer */
58#define LALINSPIRALBANKH_EMEM 2 /**< Memory allocation failure */
59#define LALINSPIRALBANKH_ECHOICE 3 /**< Invalid choice for an input parameter */
60#define LALINSPIRALBANKH_EDIV0 4 /**< Division by zero */
61#define LALINSPIRALBANKH_ESIZE 8 /**< Invalid input range */
62#define LALINSPIRALBANKH_EFRANGE 16 /**< Limits outside range of frequency series */
63#define LALINSPIRALBANKH_EORDER 32 /**< Inappropriate PN order */
64#define LALINSPIRALBANKH_EGRIDSPACING 64 /**< Inappropriate grid spacing parameter [SquareNotOriented or Hexagonal] */
65#define LALINSPIRALBANKH_EHEXAINIT 128 /**< Empty bank. abnormal behaviour in HexaBank generation. */
66#define LALINSPIRALBANKH_EFCUT 5 /**< Inappropriate cutoff frequency [SchwarzISCO, BKLISCO, LightRing, ERD, FRD or LRD] */
67#define LALINSPIRALBANKH_EFHIGH 6 /**< Final frequency is less than the low frequency cutoff. */
68#define LALINSPIRALBANKH_ENUMFCUT 7 /**< Number of fcut must be greater or equal to 1 */
69/** @} */
70
71/** \cond DONT_DOXYGEN */
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"
84/** \endcond */
85
86/** UNDOCUMENTED */
87typedef enum
88tagComputeMoments
89{
91 enable
94
95
96/**
97 * Choose templates either in the \f$(\tau_0,\tau_2)\f$ or \f$(\tau_0,\tau_3)\f$
98 * space. This is one of the members of the InspiralCoarseBankIn structure.
99 *
100 * This enum allows users to choose template bank either in the \f$(\tau_0, \tau_2)\f$
101 * space of chirptimes (the choice made by #Tau0Tau2) or in the
102 * \f$(\tau_0, \tau_3)\f$ space of chirptimes (the choice made by #Tau0Tau3).
103 * This was implemented in releases before May 25, 2002. On May 25 we migrated to a
104 * new, slightly faster, computation of the metric in which, at present, only the
105 * choice \c Tau0Tau3 can be made. Since October 2003 a new choice \c Psi0Psi3
106 * was added to handle BCV templates. In November 2007 two new choices were addded:
107 * \c PTFIntrinctic is a PTF metric in only the intrinsic parameters (a \f$4
108 * \times 4\f$ matrix), and \c PTFFull is the PTF metric in the full parameter
109 * space (intrinsic and extrinsic parameters).
110 */
111typedef enum
112tagCoordinateSpace
113{
114 Tau0Tau2, /**< \f$(\tau_0, \tau_2)\f$ space of chirptimes */
115 Tau0Tau3, /**< \f$(\tau_0, \tau_3)\f$ space of chirptimes */
116 Psi0Psi3, /**< for BCV templates */
117 PTFIntrinsic, /**< a PTF metric in only the intrinsic parameters (a \f$4\times 4\f$ matrix) */
118 PTFFull /**< PTF metric in the full parameter space (intrinsic and extrinsic parameters). */
121
122/**
123 * This enum is set by the user to specify the type of placement requested. It can be
124 * <tt>Square, Hexagonal, SquareNotOriented, HexagonalNotOriented, S2BCV</tt>. The two first
125 * align the ellipse along the eigen-vectors whereas the two next do not. The last is a
126 * square placement which was being used during S2 and is therefore obsolete and should
127 * not be used (feel free to remove it). Historically, we used the \c SquareNotOriented
128 * placement until S4. Then, in S5, we switched to the \c Hexagonal placement,
129 * which should be used for future searches.
130 */
131typedef enum
132tagGridSpacing
133{
134 SquareNotOriented, /**< UNDOCUMENTED */
135 Square, /**< UNDOCUMENTED */
136 HexagonalNotOriented, /**< UNDOCUMENTED */
137 Hexagonal, /**< UNDOCUMENTED */
138 HybridHexagonal, /**< UNDOCUMENTED */
139 S2BCV /**< UNDOCUMENTED */
142
143/**
144 * This enum can take the following values <tt>In, Out, Below, Edge, Above</tt> and is used
145 * \e only by the Hexagonal placement. It simply specifies
146 * the place of a point with respect to the parameter space. Edge, means that the ellipse
147 * covers two boundaries(upper and lower).
148 */
149typedef enum
150tagPosition
151{
152 In, /**< UNDOCUMENTED */
153 Above, /**< UNDOCUMENTED */
154 Below, /**< UNDOCUMENTED */
155 Out, /**< UNDOCUMENTED */
156 Edge /**< UNDOCUMENTED */
159
160/**
161 * This enum is set to true or false, it is just a boolean variable for the
162 * purpose of BCV placement but can be used in an other context.
163 */
164typedef enum
165tagInsidePolygonEnum
166{
168 True
171
172/**
173 * This enum is either <tt>fertile,sterile</tt>, and is a boolean expression used \e only
174 * by the Hexagonal placement.
175 */
176typedef enum
177tagGeneration
178{
180 Fertile
183
184/**
185 * An enum that appears in the \c InspiralCoarseBankIn structure
186 * which fixes the way templates are chosen: The choice
187 * \c MinComponentMassMaxTotalMass means the minimum of the
188 * component masses will be given by \c mMin and maximum total
189 * mass is given by \c MMax of the \c InspiralBankCoarseIn structure.
190 * The choice \c MinMaxComponentMass means the minimum of the
191 * components masses will be again fixed by \c mMin and the
192 * maximum of the component masses is fixed by \c mMax of the
193 * \c InspiralCoarseIn structure below.
194 */
195typedef enum
196tagInspiralBankMassRange
197{
203
204
205/**
206 * An enum that lists all the formulas that can be used to specify an upper
207 * frequency cutoff.
208 */
209typedef enum
210tagFreqCut
211{
212 FreqCut_SchwarzISCO, /**< the innermost stable circular orbit (ISCO) for a test particle orbiting a Schwarzschild black hole */
213 FreqCut_BKLISCO, /**< a mass ratio dependent ISCO derived from estimates of the final spin of a merged black found in a
214 * paper by Buonanno, Kidder, and Lehner (arXiv:0709.3839)
215 */
216 FreqCut_LightRing, /**< the unstable circular orbit for photons orbiting a Schwarzschild black hole */
217 FreqCut_ERD, /**< an effective ringdown frequency studied in Pan et al (arXiv:0704.1964) that was found to give good
218 * fit between stationary-phase templates and numerical relativity waveforms
219 */
220 FreqCut_FRD, /**< the "Fundamental RingDown" frequency which is calculated from the Berti, Cardoso and Will (arXiv:gr-qc/0512160)
221 * value for the \f$\omega_{220}\f$ QNM frequency using mass ratio dependent fits to the final BH mass and spin from Buonanno et al (arXiv:0706.3732)
222 */
223 FreqCut_LRD /**< the "Lorentzian RingDown" frequency = 1.2*FRD which captures part of the Lorentzian tail from the decay of the QNMs */
225FreqCut;
226
227
228/**
229 * Structure to store metric at various points the signal manifold.
230 * We store the diagonalized metric together with the angle theta
231 * between the \f$\tau_0\f$-axis and the semi-major axis of the ambiguity ellipse.
232 */
233typedef struct
234tagInspiralMetric
235{
236 REAL8 G00; /**< 00-component of the metric in \f$(\tau_0,\tau_{2(3)})\f$ coordinates */
237 REAL8 G11; /**< 11-component of the metric in \f$(\tau_0,\tau_{2(3)})\f$ coordinates */
238 REAL8 G01; /**< 01-component of the metric in \f$(\tau_0,\tau_{2(3)})\f$ coordinates */
239
240 REAL8 g00; /**< 00-component of the diagonalised metric */
241 REAL8 g11; /**< 11-component of the diagonalised metric */
242 REAL8 theta; /**< Angle from tau0 to semi-major axis of the ellipse */
243
244 REAL4 Gamma[10]; /**< 3d metric co-efficients in \f$(t_C, \tau_0,\tau_{2(3)})\f$ coordinates;
245 * Gamma[6] is a vector that stores the upper triangular part of the metric in
246 * the space of parameters; For time domain searches, Gamma[0,...,5] stores
247 * the following information :<br>
248 * Gamma[0] -> (tc,tc) metric component<br>
249 * Gamma[1] -> (tc,t0) metric component<br>
250 * Gamma[2] -> (tc,t3) metric component<br>
251 * Gamma[3] -> (t0,t0) metric component<br>
252 * Gamma[4] -> (t0,t3) metric component<br>
253 * Gamma[5] -> (t3,t3) metric component<br>
254 * For spinBCV searches, (in 4 dimensions) Gamma[0,...,9] would be required
255 */
256 CoordinateSpace space; /**< The enum describing the coordinate space in which the metric is computed */
257}
259
260
261/**
262 * A grid of inspiral templates (ie a template list).
263 * Structure returned by the coarse and fine bank generation routines.
264 * Currently we generate an array of type \c InspiralTemplateList
265 * which contains the coordinate markers (the parameter structure
266 * \c InspiralTemplate defined in the \c inspiral package)
267 * and the metric at each of those points. There is a desire to make this
268 * a truly linked list at some time in the future.
269 */
270typedef struct
271tagInspiralTemplateList
272{
273 INT4 ID; /**< An unique integer ID of the template */
274 InspiralTemplate params; /**< Value of the parameters at the lattice point */
275 InspiralMetric metric; /**< metric at the lattice point */
276 UINT4 nLayer; /**< UNDOCUMENTED */
277 struct tagInspiralTemplateList *next; /**< pointer to next lattice point; but this is currently not filled by the bank code */
278}
280
281/**
282 * This is a structure needed in the inner workings of the \c LALInspiralHexagonalBank code.
283 * It contains some part of CoarseBankIn and some other standard parameters. It provides the
284 * parameter space boundaries with the minimum and maximum values of mass parameters, the
285 * minimal match, the space, massRange and gridSpacing parameter.
286 */
287typedef struct
288tagHexaGridParam
289{
304}
306
307/**
308 * This is a structure needed in the inner workings of the \c LALInspiralHexagonalBank code.
309 *
310 * This structure checks the status of the placement. \c fertile tells if the
311 * placement is still evolving or not. \c nTemplateMax is the number of maximum templates allowed,
312 * which can be resized. And \c nTemplate is the number of template set. nTemplate can not
313 * be higher than nTemplateMax.
314 */
315typedef struct
316tagCellEvolution
317{
321}
323
324
325/**
326 * This is a structure needed in the inner workings of the \c LALInspiralHexagonalBank code.
327 *
328 * Similarly to the square placement, which uses InspiralList, we used a
329 * linked list for the hexagonal placement. A different structure has been
330 * implemented so as to simplify the complexity of the algorithm. It also set
331 * an id to each cell which has been created. This id is unique to each
332 * cell/template.
333 */
334typedef struct
335tagCellList
336{
338 struct tagCellList *next;
339}
341
342/**
343 * This is a structure needed in the inner workings of the \c LALInspiralHexagonalBank code.
344 *
345 * Each cell is defined by this structure, which contains the position of
346 * each cell in the tau0/tau3 parameter space, the metric at that point, and various
347 * information such as the status of the cell. Is it still fertile ? what is its position
348 * with respect to the parameter space and so on. child is a 6-length array with a link
349 * to the 6 templates (hexagonal) around the current template that we are dealing with.
350 */
351typedef struct
352tagInspiralCell
353{
356 INT4 child[6];
363 Position RectPosition[5];
365}
367
368
369/**
370 * This is a structure needed in the inner workings
371 * of the \c LALInspiralCreateCoarseBank code.
372 */
373typedef struct
374tagInspiralBankParams
375{
376 INT4 nparams; /**< Number of parameters (currently fixed at 2, so this is as of now unused) */
377 REAL8 minimalMatch; /**< UNDOCUMENTED */
378 REAL8 x0; /**< the first coordinate, chosen to be always \f$\tau_0\f$ */
379 REAL8 x1; /**< the second coordinate, chosen to be either \f$\tau_2\f$ or \f$\tau_3\f$ */
380 REAL8 dx0; /**< increment in the x0-direction */
381 REAL8 dx1; /**< increment in the x1-direction */
382 REAL8 x0Min; /**< minimum value of the first coordinate as defined by the search region */
383 REAL8 x0Max; /**< maximum value of the first coordinate as defined by the search region */
384 REAL8 x1Min; /**< minimum value of the second coordinate as defined by the search region */
385 REAL8 x1Max; /**< maximum value of the second coordinate as defined by the search region */
386 InspiralMetric *metric; /**< pointer to the metric at the current location */
387}
389
390
391/**
392 * Input for choosing a template bank. This is the structure that must
393 * be filled by a routine calling the code \c InspiralCreateCoarseBank() or \c InspiralCreateBCVBank().
394 * Unless BCV template bank is needed (that is, \c InspiralCreateBCVBank()) then one can ignore the
395 * parameters <tt>psi0Min, psi0Max, psi3Min, psi3Max, alpha, numFcutTemplates.</tt>
396 */
397typedef struct
398tagInspiralCoarseBankIn
399{
400 InspiralBankMassRange massRange; /**< enum that determines whether templates should be chosen using fixed ranges for component masses or
401 * to use minimum component mass and maximum totalmass
402 */
403 CoordinateSpace space; /**< enum that decides whether to use \f$(\tau_0,\tau_2)\f$ or \f$(\tau_0,\tau_3)\f$ in constructing the template bank */
404 REAL8 mMin; /**< minimum mass of components to search for */
405 REAL8 mMax; /**< maximum mass of components to search for */
406 REAL8 MMax; /**< alternatively, maximum total mass of binary to search for */
407 REAL8 MMin; /**< UNDOCUMENTED */
408 REAL8 alpha; /**< the BCV amplitude correction parameter */
409 REAL8 psi0Min; /**< minimum value of the parameter \f$\psi_0\f$ */
410 REAL8 psi0Max; /**< maximum value of the parameter \f$\psi_0\f$ */
411 REAL8 psi3Min; /**< minimum value of the parameter \f$\psi_3\f$ */
412 REAL8 psi3Max; /**< maximum value of the parameter \f$\psi_3\f$ */
413 REAL8 mmCoarse; /**< Coarse grid minimal match */
414 REAL8 mmFine; /**< Fine grid minimal match */
415 REAL8 fLower; /**< Lower frequency cutoff */
416 REAL8 fUpper; /**< Upper frequency cutoff */
417 REAL8 tSampling; /**< Sampling rate */
418 REAL8 etamin; /**< minimum value of eta in our search */
419 REAL8 betaMin; /**< UNDOCUMENTED */
420 REAL8 betaMax; /**< UNDOCUMENTED */
421 REAL8 chiMin; /**< UNDOCUMENTED */
422 REAL8 chiMax; /**< UNDOCUMENTED */
423 REAL8 kappaMin; /**< UNDOCUMENTED */
424 REAL8 kappaMax; /**< UNDOCUMENTED */
425 INT4 nPointsChi; /**< UNDOCUMENTED */
426 INT4 nPointsKappa; /**< UNDOCUMENTED */
427 REAL8FrequencySeries shf; /**< Frequency series containing the PSD */
428 UINT4 ShMaxSz; /**< Maximum size of the power spectral density array for use in
429 * the computation of the metric in SBBH; typical values that
430 * assures that the code runs quickly are 1024-8192
431 */
432 UINT4 iseed; /**< See for random number generation in RandomBank algorithm */
433 UINT4 nTIni; /**< nTIni is an estimate for the number of templates that might
434 * be required; this is used in the random bank generation
435 * routine with a seed number of templates = nTIni*sqrt(nTIni)
436 */
437 INT4 iflso; /**< iflso is an integer that tells whether to compute the moments
438 * using an upper limit defined by flso; this is not used anywhere
439 * at the moment
440 */
441
442 INT4 spinBank; /**< spinBank=0:use Owen+Hanna bank,
443 * spinBank=1:use extended bank by AEI/Cardiff/Osaka,
444 * spinBank=2:use random bank algorithm
445 */
446 UINT4 numFcutTemplates; /**< Number of templates required in the fCut (upper cutoff)
447 * dimension and the value of upper and lower cutoffs
448 */
449 REAL4 HighGM; /**< UNDOCUMENTED */
450 REAL4 LowGM; /**< UNDOCUMENTED */
451 GridSpacing gridSpacing; /**< Type of gridspacing required */
452
453 /* post-Newtonian order( phase), approximant, and amplitude PN order */
454 LALPNOrder order; /**< Post-Newtonian order of the waveform */
455 Approximant approximant; /**< Approximant of the waveform */
457
458 /* parameters for different/multiple freq cutoffs */
459 INT4 numFreqCut; /**< Number of different upper frequency cutoffs (spaced evenly between minFreqCut and maxFreqCut) to use when creating a template bank */
460 FreqCut maxFreqCut; /**< largest upper frequency cutoff to use */
461 FreqCut minFreqCut; /**< smallest upper frequency cutoff to use */
462
463 InsidePolygonEnum insidePolygon; /**< UNDOCUMENTED */
464 ComputeMoments computeMoments; /**< ComputeMoments tells whether to re-compute the moments
465 * using an upper limit defined by flso; This is done after
466 * the template bank is gnerated
467 */
468}
470
471/**
472 * Inputs to the function that computes the moments of the PSD.
473 * The moment is defined as:
474 * \f[I(p) \equiv \int_{x_\textrm{min}}^{x_\textrm{max}}
475 * \frac{x^{-p}}{S_h(x)} dx,\f]
476 * where \f$x=f/f_0\f$ is a scaled frequency, \f$f_0\f$
477 * being a fiducial frequency, taken in these routines
478 * as the user supplied lower cutoff of the detector
479 * response.
480 */
481typedef struct
482tagInspiralMomentsIn
483{
484 REAL8 xmin; /**< lower limit of the integral \f$x_\textrm{min}\f$ */
485 REAL8 xmax; /**< upper limit of the integral \f$x_\textrm{max}\f$ */
486 REAL8 ndx; /**< index \f$p\f$ (without the negative sign) in the moment integral as above */
487 REAL8 norm; /**< norm to be used in computing the moment, the returned value is the above integral divided by the norm */
488 REAL8FrequencySeries *shf; /**< the frequency series containing the noise psd */
489}
491
492
493/**
494 * Structure needed by the function \c LALInspiralCreateFineBank.
495 * which computes a finer mesh around a given lattice point
496 * using the value of the fine-mesh minimal match, coarse-mesh
497 * minimal match and the metric at the current lattice point.
498 */
499typedef struct
500tagInspiralFineBankIn
501{
502 InspiralTemplateList templateList; /**< A list containing all the fine-mesh templates */
503 InspiralCoarseBankIn coarseIn; /**< input structure that contains useful necessary parameters to construct a fine-mesh */
504}
506
507
508/**
509 * Parameter structure that holds the moments of the PSD and other useful
510 * constants required in the computation of the metric.
511 */
512typedef struct
513tagInspiralMomentsEtc
514{
515/**
516 * \name Expansion coefficients
517 * Coefficients in the expansion of the phase of the Fourier transform of an inspiral waveform computed
518 * in the stationary phase approximation. See documentation under the function \c LALInspiralComputeMetric() in this
519 * Section for a description of these coefficients
520 */
521 /** @{ */
522 REAL8 a01, a21, a22, a31, a41, a42, a43;
523 /** @} */
524 REAL8 j[18]; /**< The required moments are all computed once and
525 * stored in this array; The required moments are from J(1) to J(17)
526 * (except J(2), J(3) and J(16) that are not required at 2PN order,
527 * however, they are computed since future extensions, planned in the
528 * near future, will require them); However, in C we need an array size
529 * 18 to use an array that has an index 18; To ease the notation we have
530 * therefore defined an over sized (by one element) array
531 */
532}
534
535/** UNDOCUMENTED */
536typedef struct
537tagInspiralMomentsEtcBCV
538{
539 REAL8 n0, n15;
540 REAL8 j[9];
541 REAL8 i[23];
544
545 REAL8 M1[2][2];
546 REAL8 M2[2][2];
547 REAL8 M3[2][2];
548}
550
551
552/**
553 * Input structure to function LALRectangleVertices()
554 */
555typedef struct
556tagRectangleIn
557{
558 REAL8 x0, y0, dx, dy, theta;
559}
561
562/**
563 * Output structure to function LALRectangleVertices().
564 */
565typedef struct
566tagRectangleOut
567{
578}
580
581/** UNDOCUMENTED */
582typedef struct
583tagHexagonOut
584{
599}
601
602/** UNDOCUMENTED */
603typedef struct
604tagPRIN
605{
608}
609PRIN;
610
611/* ---------- Function prototypes ---------- */
612
613void
617 INT4 *nlist,
619 );
620
621void
625 INT4 *nlist,
626 InspiralCoarseBankIn coarseIn
627 );
628
629
630
631
632void
636 INT4 *nlist,
637 InspiralCoarseBankIn coarseIn
638 );
639
640void
644 InspiralBankParams *bankParams,
645 InspiralCoarseBankIn coarseIn
646 );
647
648void
651 INT4 *valid,
652 InspiralBankParams *bankParams,
653 REAL4 x,
654 REAL4 y
655 );
656
657void
661 INT4 *NList,
662 InspiralCoarseBankIn coarseIn
663 );
664
665void
669 INT4 *NList,
670 InspiralCoarseBankIn coarseIn
671 );
672
673
674void
678 UINT4 *valid,
679 REAL4 lightring
680);
681
682void
686 UINT4 *valid,
687 REAL4 thisfreq
688);
689
690void
694 INT4 *NList,
695 InspiralCoarseBankIn coarseIn);
696
697void
701 INT4 nlist,
702 InspiralCoarseBankIn coarseIn
703 );
704
705
706
707
708REAL4
710 REAL4 tau0,
711 REAL4 fL
712 );
713
714REAL4
716 REAL4 m1,
717 REAL4 m2,
718 REAL4 fL
719);
720
721REAL4
723 REAL4 M,
724 REAL4 eta,
725 REAL4 fL
726);
727
728
729REAL8
731 REAL8 x,
732 REAL8 fL,
733 REAL8 mMin,
734 REAL8 mMax);
735
736REAL8
738 REAL8 tau0,
739 REAL8 extremMass,
740 REAL8 fL);
741
742void
745 SnglInspiralTable **tiles,
746 INT4 *ntiles,
747 InspiralCoarseBankIn *coarseIn
748 );
749
750#if 0
751void
752LALInspiralSpinBankBoundary(
754 NDTemplateBankInput *input,
755 NDTemplateBankOutput *output,
756 INT2 *flag
757 );
758
759void
762 NDTemplateBankInput *input,
763 REAL4Array *metric
764 );
765#endif
766
767void
771 SnglInspiralTable **out,
772 INT4 *count
773 );
774
775void
779 InspiralBankParams *bankParams
780 );
781
782void
785 InspiralTemplateList **outlist,
786 INT4 *nlist,
787 InspiralFineBankIn fineIn
788 );
789
790void
793 InspiralMetric *metric,
795 InspiralMomentsEtc *moments
796 );
797
798int
800 InspiralMetric *metric,
801 InspiralMomentsEtc *moments,
802 REAL8 fLower,
803 LALPNOrder order,
804 REAL8 t0,
805 REAL8 t3
806 );
807
808void
810(
812 InspiralMetric *metric,
815);
816
817void
820 UINT4 *templateLength,
821 InspiralCoarseBankIn *coarseIn
822 );
823
824void
827 InspiralMomentsEtc *moments,
830 );
831
832int
834 InspiralMomentsEtc *moments,
835 REAL8 fLower,
836 REAL8 fCutoff,
838 );
839
840void
843 InspiralMomentsEtcBCV *moments,
846 );
847
848void
851 REAL8 *moment,
853 );
854
855REAL8
857 REAL8 xmin,
858 REAL8 xmax,
859 REAL8 ndx,
860 REAL8 norm,
862 );
863
864void
867 InspiralBankParams *bankParams,
868 InspiralCoarseBankIn coarseIn
869 );
870
871void
874 InspiralBankParams *bankPars,
875 InspiralMetric metric
876 );
877
878void
881 InspiralTemplate *pars,
882 InspiralBankParams bankParams,
883 InspiralCoarseBankIn coarseIn
884 );
885
886void
889 INT4 *valid,
890 InspiralBankParams bankParams,
891 InspiralCoarseBankIn coarseIn
892 );
893
894void
897 INT4 *valid,
898 InspiralBankParams bankParams,
899 InspiralCoarseBankIn coarseIn
900 );
901
902void
905 InspiralBankParams *bankParams,
906 InspiralMetric metric,
907 REAL8 minimalMatch
908 );
909
910void
913 InspiralTemplate *tempPars,
914 InspiralCoarseBankIn coarseIn
915 );
916
917void
920 RectangleOut *out,
921 RectangleIn *in
922 );
923
924void
927 HexagonOut *out,
928 RectangleIn *in
929 );
930
931
932
933
934
935void
938 REAL4 *inputx,
939 REAL4 *inputy,
940 INT4 n,
941 REAL4 x,
942 REAL4 y,
943 INT4 *valid
944 );
945
946void
950 INT4 *nlist,
951 InspiralCoarseBankIn coarseIn
952 );
953
954void
958 INT4 *nlist,
959 InspiralCoarseBankIn coarseIn
960 );
961
962void
965 InspiralCell **cell,
966 INT4 id,
967 InspiralMomentsEtc *moments,
968 InspiralTemplate *paramsIn,
969 HexaGridParam *gridParam,
970 CellEvolution *cellEvolution,
971 CellList **cellList
972 );
973
974
975void
978 InspiralMomentsEtc *moments,
979 InspiralCell **cell,
980 INT4 l,
981 InspiralTemplate *paramsIn,
982 HexaGridParam *gridParam,
983 CellEvolution *cellEvolution,
984 CellList **cellList
985 );
986
987void
990 REAL4 dx0,
991 REAL4 dx1,
992 Position *position,
993 InspiralTemplate *paramsIn,
994 HexaGridParam *gridParam
995 );
996
997
998void
1001 InspiralCell **cell,
1002 INT4 id1,
1003 InspiralMomentsEtc *moments,
1004 CellEvolution *cellEvolution,
1005 CellList **list
1006 );
1007
1008void
1011 InspiralCell **cell,
1012 INT4 id,
1014 HexaGridParam *gridParam,
1015 CellEvolution *cellEvolution,
1016 CellList **cellList,
1017 INT4 *valid
1018 );
1019
1020
1021
1022void
1024 CellList ** headRef,
1025 INT4 id
1026 );
1027
1028void
1030 CellList ** headRef,
1031 INT4 id
1032 );
1033
1034UINT4
1036 CellList *head
1037 );
1038
1039void
1040LALSPAF(
1042 REAL4 *result,
1043 REAL4 x,
1044 void *t3
1045);
1046
1048 InspiralMetric *metric,
1049 REAL8Vector *fullmetric,
1052 );
1053
1055 REAL8Vector *ptfwave,
1057 );
1058
1060 COMPLEX16Vector *Wderiv,
1063 INT4 paramid,
1064 REAL8 initdelta,
1065 REAL8 tolerance
1066 );
1067
1068/** @} */
1069
1070#ifdef __cplusplus
1071}
1072#endif
1073
1074#endif /* _LALINSPIRALBANK_H */
static void LALInspiralSpinBankMetric(LALStatus *status, REAL4Array *metric, InspiralMomentsEtc *moments, InspiralTemplate *inspiralTemplate, REAL4 *f0)
double i
double theta
double REAL8
int16_t INT2
uint32_t UINT4
int32_t INT4
float REAL4
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
@ MinMaxComponentMass
@ MinComponentMassMaxTotalMass
@ SquareNotOriented
UNDOCUMENTED.
@ Square
UNDOCUMENTED.
@ S2BCV
UNDOCUMENTED.
@ HexagonalNotOriented
UNDOCUMENTED.
@ HybridHexagonal
UNDOCUMENTED.
@ Hexagonal
UNDOCUMENTED.
@ True
@ False
@ enable
@ disable
@ Edge
UNDOCUMENTED.
@ Above
UNDOCUMENTED.
@ Out
UNDOCUMENTED.
@ In
UNDOCUMENTED.
@ Below
UNDOCUMENTED.
@ Sterile
@ Fertile
@ 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)
Approximant
LALPNOrder
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
UNDOCUMENTED.
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.
Position position
Generation status
InspiralMetric metric
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
REAL4 LowGM
UNDOCUMENTED.
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
REAL8 MMin
UNDOCUMENTED.
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.
Definition: LALInspiral.h:205
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
UNDOCUMENTED.
REAL4 b
REAL4 ct
Input structure to function LALRectangleVertices()
Output structure to function LALRectangleVertices().