Prototypes | |
Routines for NR surrogate models "NRSur7dq2" and "NRSur7dq4" | |
C code for NRSur7dq2 and NRSur7dq4 NR surrogate waveform models. NRSur7dq2: This is a fully precessing time domain model including all subdominant modes up to ell=4. See Blackman et al [2] for details. Any studies that use this waveform model should include a reference to that paper. Using this model requires the file lalsuite-extra/data/lalsimulation/NRSur7dq2.h5 Make sure your $LAL_DATA_PATH points to lalsuite-extra/data/lalsimulation/. The lalsuite-extra commit hash at the time of review was 77613e7f5f01d5ea11829ded5677783cafc0d298
NRSur7dq4: This is a q=4 extension of NRSur7dq2. See Varma et al. (arxiv:1905.09300) for details. Any studies that use this waveform model should include a reference to that paper. Using this model requires the file lalsuite-extra/data/lalsimulation/NRSur7dq4.h5 Make sure your $LAL_DATA_PATH points to lalsuite-extra/data/lalsimulation/. | |
static void | NRSur7dq2_Init_LALDATA (void) |
This needs to be called once, before __lalsim_NRSur7dq2_data is used. More... | |
static void | NRSur7dq4_Init_LALDATA (void) |
This needs to be called once, before __lalsim_NRSur7dq4_data is used. More... | |
static int | PrecessingNRSur_Init (PrecessingNRSurData *data, LALH5File *file, UINT4 PrecessingNRSurVersion) |
Initialize a PrecessingNRSurData structure from an open hdf5 file. More... | |
static void | PrecessingNRSur_LoadFitData (FitData **fit_data, LALH5File *sub, const char *name) |
Loads a single fit for NRSur7dq2 or NRSur7dq4. More... | |
static void | NRSur7dq4_LoadVectorFitData (VectorFitData **vector_fit_data, LALH5File *sub, const char *name, const size_t size) |
Loads a vector fit for NRSur7dq4. More... | |
static void | PrecessingNRSur_LoadDynamicsNode (DynamicsNodeFitData **ds_node_data, LALH5File *sub, int i, UINT4 PrecessingNRSurVersion) |
Loads the data for a single dynamics node into a DynamicsNodeFitData struct. More... | |
static void | PrecessingNRSur_LoadCoorbitalEllModes (WaveformFixedEllModeData **coorbital_mode_data, LALH5File *file, int i) |
Load the WaveformFixedEllModeData from file for a single value of ell. More... | |
static void | PrecessingNRSur_LoadWaveformDataPiece (LALH5File *sub, WaveformDataPiece **data, bool invert_sign) |
Loads a single NRSur coorbital waveform data piece from file into a WaveformDataPiece. More... | |
static bool | NRSur7dq2_IsSetup (void) |
Helper function which returns whether or not the global NRSur7dq2 surrogate data has been initialized. More... | |
static bool | NRSur7dq4_IsSetup (void) |
Helper function which returns whether or not the global NRSur7dq4 surrogate data has been initialized. More... | |
REAL8 | ipow (REAL8 base, int exponent) |
Helper function for integer powers. More... | |
REAL8 | NRSur7dq2_eval_fit (FitData *data, REAL8 *x) |
static void | NRSur7dq2_eval_vector_fit (REAL8 *res, VectorFitData *data, REAL8 *x) |
static int | NRSur7dq4_effective_spins (REAL8 *chiHat, REAL8 *chi_a, const REAL8 q, const REAL8 chi1z, const REAL8 chi2z) |
REAL8 | NRSur7dq4_eval_fit (FitData *data, REAL8 *x) |
static void | NRSur7dq4_eval_vector_fit (REAL8 *res, VectorFitData *data, REAL8 *x) |
REAL8 | PrecessingNRSur_eval_fit (FitData *data, REAL8 *x, PrecessingNRSurData *__sur_data) |
static void | PrecessingNRSur_eval_vector_fit (REAL8 *res, VectorFitData *data, REAL8 *x, PrecessingNRSurData *__sur_data) |
static void | PrecessingNRSur_normalize_y (REAL8 chiANorm, REAL8 chiBNorm, REAL8 *y) |
static void | PrecessingNRSur_normalize_results (REAL8 normA, REAL8 normB, gsl_vector **quat, gsl_vector **chiA, gsl_vector **chiB) |
static void | PrecessingNRSur_rotate_spins (gsl_vector **chiA, gsl_vector **chiB, gsl_vector *phi_vec) |
Transforms chiA and chiB from the coprecessing frame to the coorbital frame using the orbital phase. More... | |
static void | PrecessingNRSur_ds_fit_x (REAL8 *x, REAL8 q, REAL8 *y) |
static void | PrecessingNRSur_assemble_dydt (REAL8 *dydt, REAL8 *y, REAL8 *Omega_coorb_xy, REAL8 omega, REAL8 *chiA_dot, REAL8 *chiB_dot) |
static REAL8 | cubic_interp (REAL8 xout, REAL8 *x, REAL8 *y) |
Cubic interpolation of 4 data points This gives a much closer result to scipy.interpolate.InterpolatedUnivariateSpline than using gsl_interp_cspline (see comment in spline_array_interp) More... | |
static gsl_vector * | spline_array_interp (gsl_vector *xout, gsl_vector *x, gsl_vector *y) |
Do cubic spline interpolation using a gsl_interp_cspline. More... | |
static REAL8 | PrecessingNRSur_get_omega (size_t node_index, REAL8 q, REAL8 *y0, PrecessingNRSurData *__sur_data) |
Computes the orbital angular frequency at a dynamics node. More... | |
static REAL8 | PrecessingNRSur_get_t_ref (REAL8 omega_ref, REAL8 q, REAL8 *chiA0, REAL8 *chiB0, REAL8 *init_quat, REAL8 init_orbphase, PrecessingNRSurData *__sur_data) |
Computes a reference time from a reference orbital angular frequency. More... | |
static void | PrecessingNRSur_get_time_deriv_from_index (REAL8 *dydt, int i0, REAL8 q, REAL8 *y, PrecessingNRSurData *__sur_data) |
Compute dydt at a given dynamics node, where y is the numerical solution to the dynamics ODE. More... | |
static void | PrecessingNRSur_get_time_deriv (REAL8 *dydt, REAL8 t, REAL8 q, REAL8 *y, PrecessingNRSurData *__sur_data) |
Compute dydt at any time by evaluating dydt at 4 nearby dynamics nodes and using cubic spline interpolation to evaluate at the desired time. More... | |
static int | PrecessingNRSur_initialize_at_dynamics_node (REAL8 *dynamics_data, REAL8 t_ref, REAL8 q, REAL8 *chiA0, REAL8 *chiB0, REAL8 init_orbphase, REAL8 *init_quat, REAL8 normA, REAL8 normB, PrecessingNRSurData *__sur_data) |
Initialize the dynamics ODE at a dynamics node. More... | |
static void | PrecessingNRSur_initialize_RK4_with_half_nodes (REAL8 *dynamics_data, REAL8 *time_steps, REAL8 *dydt0, REAL8 *dydt1, REAL8 *dydt2, REAL8 *dydt3, REAL8 normA, REAL8 normB, REAL8 q, PrecessingNRSurData *__sur_data) |
Initializes the AB4 ODE system from the surrogate start time by taking 3 RK4 steps, making use of the three additional half-time-step nodes for the RK4 substeps. More... | |
static int | PrecessingNRSur_initialize_RK4 (REAL8 *dynamics_data, REAL8 *time_steps, REAL8 *dydt0, REAL8 *dydt1, REAL8 *dydt2, REAL8 *dydt3, REAL8 normA, REAL8 normB, REAL8 q, int i0, PrecessingNRSurData *__sur_data) |
Initializes the AB4 ODE system from a single arbitrary dynamics node by taking 3 RK4 steps. More... | |
static void | PrecessingNRSur_integrate_AB4 (REAL8 *dynamics_data, REAL8 *time_steps, REAL8 *dydt0, REAL8 *dydt1, REAL8 *dydt2, REAL8 *dydt3, REAL8 normA, REAL8 normB, REAL8 q, int i_start, PrecessingNRSurData *__sur_data) |
Integrates the AB4 ODE system in time forwards, and backwards if needed. More... | |
static void | PrecessingNRSur_eval_data_piece (gsl_vector *result, REAL8 q, gsl_vector **chiA, gsl_vector **chiB, WaveformDataPiece *data, PrecessingNRSurData *__sur_data) |
Evaluates a single NRSur coorbital waveoform data piece. More... | |
static int | PrecessingNRSur_IntegrateDynamics (REAL8 *dynamics_data, REAL8 q, REAL8 *chiA0, REAL8 *chiB0, REAL8 omega_ref, REAL8 init_orbphase, REAL8 *init_quat, LALDict *LALparams, UINT4 PrecessingNRSurVersion) |
This is the main NRSur dynamics surrogate integration routine. More... | |
static PrecessingNRSurData * | PrecessingNRSur_LoadData (Approximant approximant) |
Wrapper for Loading NRSur7dq2 and NRSur7dq4 data. More... | |
static PrecessingNRSurData * | PrecessingNRSur_core (MultiModalWaveform **h, REAL8 q, REAL8 *chiA0, REAL8 *chiB0, REAL8 omega_ref, REAL8 init_orbphase, REAL8 *init_quat, LALValue *ModeArray, LALDict *LALparams, Approximant approximant) |
REAL8 | PrecessingNRSur_StartFrequency (REAL8 m1, REAL8 m2, REAL8 s1x, REAL8 s1y, REAL8 s1z, REAL8 s2x, REAL8 s2y, REAL8 s2z, PrecessingNRSurData *__sur_data) |
Computes the starting frequency of the NRSur7dq2 or NRSur7dq4 waveform approximant when evaluated using fRef=0 (which uses the entire surrogate waveform starting 4500M for NRSur7dq2 and 4300M for NRSur7dq4, before the peak amplitude). More... | |
static bool | PrecessingNRSur_switch_labels_if_needed (REAL8 *m1, REAL8 *m2, REAL8 *s1x, REAL8 *s1y, REAL8 *s1z, REAL8 *s2x, REAL8 *s2y, REAL8 *s2z) |
If m1<m2, swaps the labels for the two BHs such that Bh1 is always heavier. More... | |
int | XLALSimInspiralPrecessingNRSurPolarizations (REAL8TimeSeries **hplus, REAL8TimeSeries **hcross, REAL8 phiRef, REAL8 inclination, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 distance, REAL8 fMin, REAL8 fRef, REAL8 s1x, REAL8 s1y, REAL8 s1z, REAL8 s2x, REAL8 s2y, REAL8 s2z, LALDict *LALparams, Approximant approximant) |
This function evaluates the NRSur7dq2 or NRSur7dq4 surrogate model and sums over all ell <= 4 modes to obtain the + and x polarizations. More... | |
SphHarmTimeSeries * | XLALSimInspiralPrecessingNRSurModes (REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 S1x, REAL8 S1y, REAL8 S1z, REAL8 S2x, REAL8 S2y, REAL8 S2z, REAL8 fMin, REAL8 fRef, REAL8 distance, LALDict *LALparams, Approximant approximant) |
This function evaluates the NRSur7dq2 or NRSur7dq4 surrogate model and returns the inertial frame modes in the form of a SphHarmTimeSeries. More... | |
int | XLALPrecessingNRSurDynamics (gsl_vector **t_dynamics, gsl_vector **quat0, gsl_vector **quat1, gsl_vector **quat2, gsl_vector **quat3, gsl_vector **orbphase, gsl_vector **chiAx, gsl_vector **chiAy, gsl_vector **chiAz, gsl_vector **chiBx, gsl_vector **chiBy, gsl_vector **chiBz, REAL8 q, REAL8 chiA0x, REAL8 chiA0y, REAL8 chiA0z, REAL8 chiB0x, REAL8 chiB0y, REAL8 chiB0z, REAL8 omegaRef_dimless, REAL8 init_quat0, REAL8 init_quat1, REAL8 init_quat2, REAL8 init_quat3, REAL8 init_orbphase, LALDict *LALparams, Approximant approximant) |
This function evaluates the NRSur7dq2 or NRSur7dq4 surrogate model and returns the precessing frame dynamics. More... | |
Go to the source code of this file.
Variables | |
static PrecessingNRSurData | __lalsim_NRSur7dq2_data |
Global surrogate data. More... | |
static PrecessingNRSurData | __lalsim_NRSur7dq4_data |
|
static |
Global surrogate data.
This data will be loaded at most once. Any executable which calls NRSur7dq2_Init_LALDATA or NRSur7dq4_Init_LALDATA directly or by calling any XLAL function will have a memory leak according to valgrind, because we never free this memory.
Definition at line 86 of file LALSimIMRPrecessingNRSur.c.
|
static |
Definition at line 87 of file LALSimIMRPrecessingNRSur.c.