LALSimulation  5.4.0.1-b72065a
LALSimInspiralWaveformFlags.h
Go to the documentation of this file.
1 /* Copyright (C) 2012 Evan Ochsner
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with with program; see the file COPYING. If not, write to the
15  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
16  * MA 02110-1301 USA
17  */
18 
19 #ifndef _LALSIMINSPIRALWAVEFORMFLAGS_H
20 #define _LALSIMINSPIRALWAVEFORMFLAGS_H
21 
22 #include <stdbool.h>
23 #include <lal/LALMalloc.h>
24 #include <lal/LALError.h>
25 #include <lal/LALDict.h>
26 #include <lal/Sequence.h>
27 
28 #if defined(__cplusplus)
29 extern "C" {
30 #elif 0
31 } /* so that editors will match preceding brace */
32 #endif
33 
34 /**
35  * @addtogroup LALSimInspiral_h
36  * @{
37  */
38 
39 /** Default values for all enumerated flags */
40 #define LAL_SIM_INSPIRAL_SPIN_ORDER_DEFAULT LAL_SIM_INSPIRAL_SPIN_ORDER_ALL
41 #define LAL_SIM_INSPIRAL_TIDAL_ORDER_DEFAULT LAL_SIM_INSPIRAL_TIDAL_ORDER_ALL
42 #define LAL_SIM_INSPIRAL_GMTIDES_DEFAULT LAL_SIM_INSPIRAL_GMTIDES_OFF
43 #define LAL_SIM_INSPIRAL_FRAME_AXIS_DEFAULT LAL_SIM_INSPIRAL_FRAME_AXIS_ORBITAL_L
44 #define LAL_SIM_INSPIRAL_MODES_CHOICE_DEFAULT LAL_SIM_INSPIRAL_MODES_CHOICE_RESTRICTED
45 
46 /** Maximum L spherical harmonic mode that is supported in Mode Array*/
47 #define LAL_SIM_L_MAX_MODE_ARRAY 8
48 
49 
50 /**
51  * Enumeration of allowed PN orders of spin effects. All effects up to and
52  * including the given order will be included in waveforms.
53  * They can be specified by integers equal to twice the PN order,
54  * so e.g. LAL_SIM_INSPIRAL_SPIN_ORDER_25PN = 5
55  * In addition, LAL_SIM_INSPIRAL_SPIN_ORDER_ALL = -1
56  * is a flag to include all available spin effects
57  */
58 typedef enum tagLALSimInspiralSpinOrder {
69 
70 /**
71  * Enumeration of allowed PN orders of tidal effects. All effects up to and
72  * including the given order will be included in waveforms.
73  * Numerically, they are equal to twice the PN order, so e.g.
74  * LAL_SIM_INSPIRAL_TIDAL_ORDER_5PN = 10
75  * In addition, LAL_SIM_INSPIRAL_TIDAL_ORDER_ALL = -1
76  * is a flag to include all tidal PN orders up to the default
77  * value (which currently is 7PN for TaylorF2, 6PN for all
78  * other approximants).
79  */
80 typedef enum tagLALSimInspiralTidalOrder {
89 
90 typedef enum tagLALSimInspiralGETides {
97 
98 typedef enum tagLALSimInspiralGMTides {
104 
105 
106 /**
107  * Enumerator for choosing the reference frame associated with
108  * PSpinInspiralRD waveforms.
109  */
110 typedef enum tagLALSimInspiralFrameAxis {
111  LAL_SIM_INSPIRAL_FRAME_AXIS_VIEW, /**< Set z-axis along direction of GW propagation (line of sight) */
112  LAL_SIM_INSPIRAL_FRAME_AXIS_TOTAL_J, /**< Set z-axis along the initial total angular momentum */
113  LAL_SIM_INSPIRAL_FRAME_AXIS_ORBITAL_L, /**< Set z-axis along the initial orbital angular momentum */
115 
116 /**
117  * Enumerator for choosing which modes to include in IMR models.
118  *
119  * 'ALL' means to use all modes available to that model.
120  *
121  * 'RESTRICTED' means only the (2,2) mode for non-precessing models
122  * or only the set of l=2 modes for precessing models.
123  */
124 typedef enum tagLALSimInspiralModesChoice {
125  LAL_SIM_INSPIRAL_MODES_CHOICE_DEFAULT = 1, /**< Include only (2,2) or l=2 modes */
126  LAL_SIM_INSPIRAL_MODES_CHOICE_3L = 1<<1, /**< Inlude only l=3 modes */
127  LAL_SIM_INSPIRAL_MODES_CHOICE_2AND3L = (1<<2) - 1, /**< Inlude l=2,3 modes */
128  LAL_SIM_INSPIRAL_MODES_CHOICE_4L = 1<<2, /**< Inlude only l=4 modes */
129  LAL_SIM_INSPIRAL_MODES_CHOICE_2AND3AND4L = (1<<3) - 1, /**< Include l=2,3,4 modes */
130  LAL_SIM_INSPIRAL_MODES_CHOICE_2AND4L = (1<<3) - 1 - (1<<1), /**< Include l=2,4 modes */
131  LAL_SIM_INSPIRAL_MODES_CHOICE_3AND4L = (1<<3) - (1<<1), /**< Include l=3,4 modes */
132  LAL_SIM_INSPIRAL_MODES_CHOICE_5L = 1<<3, /**< Inlude only l=5 modes */
133  LAL_SIM_INSPIRAL_MODES_CHOICE_2AND5L = (1<<3) + 1, /**< Inlude l=2,5 modes */
134  LAL_SIM_INSPIRAL_MODES_CHOICE_3AND5L = (1<<3) + (1<<1), /**< Inlude l=3,5 modes */
135  LAL_SIM_INSPIRAL_MODES_CHOICE_4AND5L = (1<<3) + (1<<2), /**< Inlude l=4,5 modes */
136  LAL_SIM_INSPIRAL_MODES_CHOICE_2AND3AND5L = (1<<4) - 1 -(1<<2), /**< Inlude l=2,3,5 modes */
137  LAL_SIM_INSPIRAL_MODES_CHOICE_2AND4AND5L = (1<<4) - 1 -(1<<1), /**< Inlude l=2,4,5 modes */
138  LAL_SIM_INSPIRAL_MODES_CHOICE_3AND4AND5L = (1<<4) - (1<<1), /**< Inlude l=3,4,5 modes */
139  LAL_SIM_INSPIRAL_MODES_CHOICE_2AND3AND4AND5L = (1<<4) - 1, /**< Include l=2,3,4,5 modes */
140  LAL_SIM_INSPIRAL_MODES_CHOICE_ALL = - 1, /**< Include all available modes */
142 
143 /**
144  * Struct containing several enumerated flags that control specialized behavior
145  * for some waveform approximants.
146  *
147  * Users: Access this struct only through the Create/Destroy/Set/Get/IsDefault
148  * functions declared in this file.
149  *
150  * Developers: Do not add anything but enumerated flags to this struct. Avoid
151  * adding extra flags whenever possible.
152  */
153 typedef struct tagLALSimInspiralWaveformFlags LALSimInspiralWaveformFlags;
154 
155 /** @} */
156 
157 LALSimInspiralWaveformFlags *XLALSimInspiralCreateWaveformFlags(void);
158 void XLALSimInspiralDestroyWaveformFlags(LALSimInspiralWaveformFlags *waveFlags);
160 bool XLALSimInspiralWaveformFlagsIsDefaultOLD(LALSimInspiralWaveformFlags *waveFlags);
161 bool XLALSimInspiralWaveformFlagsEqualOLD(LALSimInspiralWaveformFlags *waveFlags1, LALSimInspiralWaveformFlags *waveFlags2);
162 bool XLALSimInspiralWaveformFlagsEqual(LALDict *LALpars1, LALDict *LALpars2);
163 void XLALSimInspiralSetSpinOrder(LALSimInspiralWaveformFlags *waveFlags, LALSimInspiralSpinOrder spinO);
164 LALSimInspiralSpinOrder XLALSimInspiralGetSpinOrder(LALSimInspiralWaveformFlags *waveFlags);
166 void XLALSimInspiralSetTidalOrder(LALSimInspiralWaveformFlags *waveFlags, LALSimInspiralTidalOrder tideO);
167 LALSimInspiralTidalOrder XLALSimInspiralGetTidalOrder(LALSimInspiralWaveformFlags *waveFlags);
169 void XLALSimInspiralSetFrameAxis(LALSimInspiralWaveformFlags *waveFlags, LALSimInspiralFrameAxis axisChoice);
170 LALSimInspiralFrameAxis XLALSimInspiralGetFrameAxis(LALSimInspiralWaveformFlags *waveFlags);
172 void XLALSimInspiralSetModesChoice(LALSimInspiralWaveformFlags *waveFlags, LALSimInspiralModesChoice modesChoice);
173 LALSimInspiralModesChoice XLALSimInspiralGetModesChoice(LALSimInspiralWaveformFlags *waveFlags);
175 void XLALSimInspiralSetNumrelDataOLD(LALSimInspiralWaveformFlags *waveFlags, const char* numreldata);
176 char* XLALSimInspiralGetNumrelDataOLD(LALSimInspiralWaveformFlags *waveFlags);
177 
178 LALValue * XLALSimInspiralCreateModeArray(void);
179 LALValue * XLALSimInspiralModeArrayActivateMode(LALValue *modes, unsigned l, int m);
180 LALValue * XLALSimInspiralModeArrayDeactivateMode(LALValue *modes, unsigned l, int m);
181 LALValue * XLALSimInspiralModeArrayActivateAllModes(LALValue *modes);
182 LALValue * XLALSimInspiralModeArrayDeactivateAllModes(LALValue *modes);
183 int XLALSimInspiralModeArrayIsModeActive(LALValue *modes, unsigned l, int m);
184 LALValue * XLALSimInspiralModeArrayActivateAllModesAtL(LALValue *modes, unsigned l);
185 LALValue * XLALSimInspiralModeArrayDeactivateAllModesAtL(LALValue *modes, unsigned l);
186 int XLALSimInspiralModeArrayPrintModes(LALValue *modes);
188 char * XLALSimInspiralModeArrayToModeString(LALValue *modes);
189 LALValue * XLALSimInspiralModeArrayFromModeString(const char *modestr);
190 
191 
192 #if 0
193 { /* so that editors will match succeeding brace */
194 #elif defined(__cplusplus)
195 }
196 #endif
197 
198 #endif /* _LALSIMINSPIRALWAVEFORMFLAGS_H */
int l
Definition: bh_qnmode.c:135
LALSimInspiralModesChoice
Enumerator for choosing which modes to include in IMR models.
#define LAL_SIM_INSPIRAL_MODES_CHOICE_DEFAULT
LALSimInspiralSpinOrder
Enumeration of allowed PN orders of spin effects.
LALSimInspiralFrameAxis
Enumerator for choosing the reference frame associated with PSpinInspiralRD waveforms.
LALSimInspiralTidalOrder
Enumeration of allowed PN orders of tidal effects.
@ LAL_SIM_INSPIRAL_MODES_CHOICE_3L
Inlude only l=3 modes.
@ LAL_SIM_INSPIRAL_MODES_CHOICE_4AND5L
Inlude l=4,5 modes.
@ LAL_SIM_INSPIRAL_MODES_CHOICE_4L
Inlude only l=4 modes.
@ LAL_SIM_INSPIRAL_MODES_CHOICE_ALL
Include all available modes.
@ LAL_SIM_INSPIRAL_MODES_CHOICE_2AND3L
Inlude l=2,3 modes.
@ LAL_SIM_INSPIRAL_MODES_CHOICE_2AND3AND5L
Inlude l=2,3,5 modes.
@ LAL_SIM_INSPIRAL_MODES_CHOICE_3AND4L
Include l=3,4 modes.
@ LAL_SIM_INSPIRAL_MODES_CHOICE_2AND5L
Inlude l=2,5 modes.
@ LAL_SIM_INSPIRAL_MODES_CHOICE_3AND5L
Inlude l=3,5 modes.
@ LAL_SIM_INSPIRAL_MODES_CHOICE_5L
Inlude only l=5 modes.
@ LAL_SIM_INSPIRAL_MODES_CHOICE_2AND4AND5L
Inlude l=2,4,5 modes.
@ LAL_SIM_INSPIRAL_MODES_CHOICE_2AND3AND4L
Include l=2,3,4 modes.
@ LAL_SIM_INSPIRAL_MODES_CHOICE_3AND4AND5L
Inlude l=3,4,5 modes.
@ LAL_SIM_INSPIRAL_MODES_CHOICE_2AND3AND4AND5L
Include l=2,3,4,5 modes.
@ LAL_SIM_INSPIRAL_MODES_CHOICE_2AND4L
Include l=2,4 modes.
@ LAL_SIM_INSPIRAL_GETIDES_NOPT
@ LAL_SIM_INSPIRAL_GETIDES_GSF23
@ LAL_SIM_INSPIRAL_GETIDES_OFF
@ LAL_SIM_INSPIRAL_GETIDES_NNLO
@ LAL_SIM_INSPIRAL_GETIDES_GSF2
@ LAL_SIM_INSPIRAL_SPIN_ORDER_0PN
@ LAL_SIM_INSPIRAL_SPIN_ORDER_25PN
@ LAL_SIM_INSPIRAL_SPIN_ORDER_35PN
@ LAL_SIM_INSPIRAL_SPIN_ORDER_ALL
@ LAL_SIM_INSPIRAL_SPIN_ORDER_2PN
@ LAL_SIM_INSPIRAL_SPIN_ORDER_15PN
@ LAL_SIM_INSPIRAL_SPIN_ORDER_1PN
@ LAL_SIM_INSPIRAL_SPIN_ORDER_05PN
@ LAL_SIM_INSPIRAL_SPIN_ORDER_3PN
@ LAL_SIM_INSPIRAL_FRAME_AXIS_VIEW
Set z-axis along direction of GW propagation (line of sight)
@ LAL_SIM_INSPIRAL_FRAME_AXIS_TOTAL_J
Set z-axis along the initial total angular momentum.
@ LAL_SIM_INSPIRAL_FRAME_AXIS_ORBITAL_L
Set z-axis along the initial orbital angular momentum.
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_5PN
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_6PN
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_ALL
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_75PN
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_7PN
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_0PN
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_65PN
@ LAL_SIM_INSPIRAL_GMTIDES_NOPT
@ LAL_SIM_INSPIRAL_GMTIDES_GSF
@ LAL_SIM_INSPIRAL_GMTIDES_OFF
@ LAL_SIM_INSPIRAL_GMTIDES_PN
char * XLALSimInspiralModeArrayToModeString(LALValue *modes)
void XLALSimInspiralSetFrameAxis(LALSimInspiralWaveformFlags *waveFlags, LALSimInspiralFrameAxis axisChoice)
Set the LALSimInspiralFrameAxis within a LALSimInspiralWaveformFlags struct.
bool XLALSimInspiralWaveformParamsFlagsAreDefault(LALDict *params)
Returns true if waveFlags is non-NULL and all of its fields have default value; returns false otherwi...
LALValue * XLALSimInspiralModeArrayDeactivateMode(LALValue *modes, unsigned l, int m)
LALValue * XLALSimInspiralCreateModeArray(void)
Create a LALValue pointer to store the mode array.
LALSimInspiralSpinOrder XLALSimInspiralGetSpinOrder(LALSimInspiralWaveformFlags *waveFlags)
Get the LALSimInspiralSpinOrder within a LALSimInspiralWaveformFlags struct, or LAL_SIM_INSPIRAL_SPIN...
LALSimInspiralWaveformFlags * XLALSimInspiralCreateWaveformFlags(void)
Create a new LALSimInspiralWaveformFlags struct with all flags set to their default values.
LALValue * XLALSimInspiralModeArrayFromModeString(const char *modestr)
LALValue * XLALSimInspiralModeArrayActivateAllModes(LALValue *modes)
LALSimInspiralModesChoice XLALSimInspiralGetModesChoice(LALSimInspiralWaveformFlags *waveFlags)
Get the LALSimInspiralModesChoice within a LALSimInspiralWaveformFlags struct, or LAL_SIM_INSPIRAL_MO...
int XLALSimInspiralModeArrayIsModeActive(LALValue *modes, unsigned l, int m)
bool XLALSimInspiralFrameAxisIsDefault(LALSimInspiralFrameAxis axisChoice)
Returns true if LALSimInspiralFrameAxis has default value returns false otherwise.
LALSimInspiralFrameAxis XLALSimInspiralGetFrameAxis(LALSimInspiralWaveformFlags *waveFlags)
Get the LALSimInspiralFrameAxis within a LALSimInspiralWaveformFlags struct, or LAL_SIM_INSPIRAL_FRAM...
bool XLALSimInspiralModesChoiceIsDefault(LALSimInspiralModesChoice modesChoice)
Returns true if LALSimInspiralModesChoice has default value returns false otherwise.
LALValue * XLALSimInspiralModeArrayDeactivateAllModes(LALValue *modes)
LALValue * XLALSimInspiralModeArrayActivateMode(LALValue *modes, unsigned l, int m)
LALSimInspiralTidalOrder XLALSimInspiralGetTidalOrder(LALSimInspiralWaveformFlags *waveFlags)
Get the LALSimInspiralTidalOrder within a LALSimInspiralWaveformFlags struct, or LAL_SIM_INSPIRAL_TID...
void XLALSimInspiralSetSpinOrder(LALSimInspiralWaveformFlags *waveFlags, LALSimInspiralSpinOrder spinO)
Set the LALSimInspiralSpinOrder within a LALSimInspiralWaveformFlags struct.
int XLALSimInspiralModeArrayPrintModes(LALValue *modes)
bool XLALSimInspiralWaveformFlagsEqual(LALDict *LALpars1, LALDict *LALpars2)
Checks if all flags in two LALSimInspiralWaveformFlags structs are equal.
bool XLALSimInspiralTidalOrderIsDefault(LALSimInspiralTidalOrder tideO)
Returns true if LALSimInspiralTidalOrder has default value returns false otherwise.
bool XLALSimInspiralSpinOrderIsDefault(LALSimInspiralSpinOrder spinO)
Returns true if LALSimInspiralSpinOrder has default value returns false otherwise.
LALValue * XLALSimInspiralModeArrayActivateAllModesAtL(LALValue *modes, unsigned l)
bool XLALSimInspiralWaveformFlagsEqualOLD(LALSimInspiralWaveformFlags *waveFlags1, LALSimInspiralWaveformFlags *waveFlags2)
Checks if all flags in two LALSimInspiralWaveformFlags structs are equal.
void XLALSimInspiralDestroyWaveformFlags(LALSimInspiralWaveformFlags *waveFlags)
Destroy a LALSimInspiralWaveformFlags struct.
void XLALSimInspiralSetNumrelDataOLD(LALSimInspiralWaveformFlags *waveFlags, const char *numreldata)
Set the numreldata string within a LALSimInspiralWaveformFlags struct.
INT2Sequence * XLALSimInspiralModeArrayReadModes(LALValue *modes)
void XLALSimInspiralSetTidalOrder(LALSimInspiralWaveformFlags *waveFlags, LALSimInspiralTidalOrder tideO)
Set the LALSimInspiralTidalOrder within a LALSimInspiralWaveformFlags struct.
bool XLALSimInspiralWaveformFlagsIsDefaultOLD(LALSimInspiralWaveformFlags *waveFlags)
Returns true if waveFlags is non-NULL and all of its fields have default value; returns false otherwi...
LALValue * XLALSimInspiralModeArrayDeactivateAllModesAtL(LALValue *modes, unsigned l)
char * XLALSimInspiralGetNumrelDataOLD(LALSimInspiralWaveformFlags *waveFlags)
Returns a deepcopy of the pointer of the numeraldata attribute of the waveFlags structure.
void XLALSimInspiralSetModesChoice(LALSimInspiralWaveformFlags *waveFlags, LALSimInspiralModesChoice modesChoice)
Set the LALSimInspiralModesChoice within a LALSimInspiralWaveformFlags struct.
static const INT4 m
Definition: burst.c:245
Struct containing several enumerated flags that control specialized behavior for some waveform approx...
LALSimInspiralTidalOrder tideO
PN order of spin effects.
LALSimInspiralModesChoice modesChoice
Flag to control which modes are included in IMR models.
LALSimInspiralFrameAxis axisChoice
Flag to set frame z-axis convention.
LALSimInspiralSpinOrder spinO
PN order of spin effects.
char numreldata[FILENAME_MAX]
Location of NR data file for NR waveforms.