84 typedef struct tagFitData {
96 typedef struct tagVectorFitData {
110 typedef struct tagDynamicsNodeFitData {
125 typedef struct tagWaveformDataPiece {
140 typedef struct tagWaveformFixedEllModeData {
153 typedef struct tagPrecessingNRSurData {
179 static double ipow(
double base,
int exponent);
190 const double q,
const double chi1z,
const double chi2z);
228 double *Omega_coorb_xy,
267 double *dynamics_data,
272 double init_orbphase,
280 double *dynamics_data,
293 double *dynamics_data,
307 double *dynamics_data,
321 double *dynamics_data,
326 double init_orbphase,
329 UINT4 PrecessingNRSurVersion
349 double init_orbphase,
struct tagLALH5File LALH5File
static PrecessingNRSurData * PrecessingNRSur_LoadData(Approximant approximant)
static void NRSur7dq2_eval_vector_fit(double *res, VectorFitData *data, double *x)
static const double NRSUR7DQ4_Q_MAX
static const double NRSUR7DQ4_Q_FIT_OFFSET
static const char NRSUR7DQ4_DATAFILE[]
static bool NRSur7dq4_IsSetup(void)
static double cubic_interp(double xout, double *x, double *y)
static int PrecessingNRSur_Init(PrecessingNRSurData *data, LALH5File *file, UINT4 PrecessingNRSurVersion)
static void NRSur7dq2_Init_LALDATA(void)
static void PrecessingNRSur_ds_fit_x(double *x, double q, double *y)
static void PrecessingNRSur_initialize_RK4_with_half_nodes(double *dynamics_data, double *time_steps, double *dydt0, double *dydt1, double *dydt2, double *dydt3, double normA, double normB, double q, PrecessingNRSurData *__sur_data)
static const double NRSUR7DQ4_START_TIME
static const double NRSUR7DQ4_Q_FIT_SLOPE
static PrecessingNRSurData * PrecessingNRSur_core(MultiModalWaveform **h, double q, double *chiA0, double *chiB0, double omega_ref, double init_orbphase, double *init_quat, LALValue *ModeArray, LALDict *LALparams, Approximant approximant)
static void PrecessingNRSur_LoadWaveformDataPiece(LALH5File *sub, WaveformDataPiece **data, bool invert_sign)
static const double NRSUR7DQ2_Q_FIT_SLOPE
static void PrecessingNRSur_normalize_results(double normA, double normB, gsl_vector **quat, gsl_vector **chiA, gsl_vector **chiB)
static void PrecessingNRSur_rotate_spins(gsl_vector **chiA, gsl_vector **chiB, gsl_vector *phi)
static bool NRSur7dq2_IsSetup(void)
static void PrecessingNRSur_normalize_y(double chiANorm, double chiBNorm, double *y)
static int PrecessingNRSur_initialize_at_dynamics_node(double *dynamics_data, double t_ref, double q, double *chiA0, double *chiB0, double init_orbphase, double *init_quat, double normA, double normB, PrecessingNRSurData *__sur_data)
static const double NRSUR7DQ2_Q_MAX
static void PrecessingNRSur_LoadCoorbitalEllModes(WaveformFixedEllModeData **coorbital_mode_data, LALH5File *file, int i)
static void PrecessingNRSur_get_time_deriv(double *dtdy, double t, double q, double *y, PrecessingNRSurData *__sur_data)
static void NRSur7dq4_Init_LALDATA(void)
static void PrecessingNRSur_get_time_deriv_from_index(double *dydt, int i0, double q, double *y, PrecessingNRSurData *__sur_data)
static int PrecessingNRSur_IntegrateDynamics(double *dynamics_data, double q, double *chiA0, double *chiB0, double omega_ref, double init_orbphase, double *init_quat, LALDict *LALparams, UINT4 PrecessingNRSurVersion)
static void NRSur7dq4_eval_vector_fit(double *res, VectorFitData *data, double *x)
static const double NRSUR7DQ4_Q_MAX_WARN
static void PrecessingNRSur_LoadFitData(FitData **fit_data, LALH5File *sub, const char *name)
static const double NRSUR7DQ2_CHI_MAX_WARN
static const int NRSUR_LMAX
static const double NRSUR7DQ2_CHI_MAX
static const double NRSUR7DQ2_Q_MAX_WARN
static const double NRSUR7DQ4_CHI_MAX_WARN
static const double NRSUR7DQ2_Q_FIT_OFFSET
static void PrecessingNRSur_integrate_AB4(double *dynamics_data, double *time_steps, double *dydt0, double *dydt1, double *dydt2, double *dydt3, double normA, double normB, double q, int i_start, PrecessingNRSurData *__sur_data)
static bool PrecessingNRSur_switch_labels_if_needed(REAL8 *m1, REAL8 *m2, REAL8 *s1x, REAL8 *s1y, REAL8 *s1z, REAL8 *s2x, REAL8 *s2y, REAL8 *s2z)
static void PrecessingNRSur_LoadDynamicsNode(DynamicsNodeFitData **ds_node_data, LALH5File *sub, int i, UINT4 PrecessingNRSurVersion)
static const double NRSUR7DQ4_CHI_MAX
static void PrecessingNRSur_eval_data_piece(gsl_vector *result, double q, gsl_vector **chiA, gsl_vector **chiB, WaveformDataPiece *data, PrecessingNRSurData *__sur_data)
static int PrecessingNRSur_initialize_RK4(double *dynamics_data, double *time_steps, double *dydt0, double *dydt1, double *dydt2, double *dydt3, double normA, double normB, double q, int i0, PrecessingNRSurData *__sur_data)
static void PrecessingNRSur_eval_vector_fit(double *res, VectorFitData *data, double *x, PrecessingNRSurData *__sur_data)
static gsl_vector * spline_array_interp(gsl_vector *xout, gsl_vector *x, gsl_vector *y)
static REAL8 PrecessingNRSur_get_t_ref(REAL8 omega_ref, REAL8 q, REAL8 *chiA0, REAL8 *chiB0, REAL8 *init_quat, REAL8 init_orbphase, PrecessingNRSurData *__sur_data)
static double PrecessingNRSur_get_omega(size_t node_index, double q, double *y0, PrecessingNRSurData *__sur_data)
static const double NRSUR7DQ2_START_TIME
static const char NRSUR7DQ2_DATAFILE[]
static void PrecessingNRSur_assemble_dydt(double *dydt, double *y, double *Omega_coorb_xy, double omega, double *chiA_dot, double *chiB_dot)
static int NRSur7dq4_effective_spins(REAL8 *chiHat, REAL8 *chi_a, const double q, const double chi1z, const double chi2z)
static void NRSur7dq4_LoadVectorFitData(VectorFitData **vector_fit_data, LALH5File *sub, const char *name, const size_t size)
Approximant
Enum that specifies the PN approximant to be used in computing the waveform.
static double NRSur7dq4_eval_fit(FitData *data, double *x)
static double ipow(double base, int exponent)
Helper function for integer powers.
double PrecessingNRSur_eval_fit(FitData *data, double *x, PrecessingNRSurData *__sur_data)
static double 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 usi...
static double NRSur7dq2_eval_fit(FitData *data, double *x)
Data for a single dynamics node.
FitData * omega_data
A fit to the orbital angular frequency.
VectorFitData * chiB_dot_data
A 3d vector fit for the coorbital components of the time derivative of chiB taken in the coprecessing...
VectorFitData * chiA_dot_data
A 3d vector fit for the coorbital components of the time derivative of chiA taken in the coprecessing...
VectorFitData * omega_copr_data
A 2d vector fit for the x and y components of Omega^{coorb}(t) in arxiv 1705.07089.
Data used in a single scalar fit.
int n_coefs
Number of coefficients in the fit.
gsl_matrix_long * basisFunctionOrders
matrix of (n_coefs x 7) basis function orders giving the polynomial order in f(q),...
gsl_vector * coefs
coefficient vector of length n_coefs
All data needed by the full surrogate model.
gsl_vector * t_coorb
Vector of the coorbital surrogate output times.
UINT4 PrecessingNRSurVersion
One for each 2 <= ell <= LMax.
WaveformFixedEllModeData ** coorbital_mode_data
A DynamicsNodeFitData for each time in t_ds_half_times.
gsl_vector * t_ds_half_times
Vector of the dynamics surrogate node times, not including half times.
DynamicsNodeFitData ** ds_half_node_data
A DynamicsNodeFitData for each time in t_ds.
UINT4 setup
Indicates if this has been initialized.
DynamicsNodeFitData ** ds_node_data
int LMax
Maximum ell mode that will ever be evaluated.
Data used in a single vector fit NOTE: basisFunctionOrders, coefs, componentIndices,...
int n_coefs
Number of coefficients in the fit.
FitData ** fit_data
Vector of FitData.
gsl_matrix_long * basisFunctionOrders
matrix of (n_coefs x 7) basis function orders giving the polynomial order in f(q),...
int vec_dim
Dimension of the vector.
gsl_vector_long * componentIndices
Each fit coefficient applies to a single component of the vector; this gives the component indices.
gsl_vector * coefs
coefficient vector of length n_coefs