LALSimulation  5.4.0.1-fe68b98
LALSimIMRPrecessingNRSur.h
Go to the documentation of this file.
1 /* * Copyright (C) 2017 Jonathan Blackman, Vijay Varma
2  * NRSur7dq2 and NRSur7dq4 NR surrogate models.
3  * Papers: https://arxiv.org/abs/1705.07089, https://arxiv.org/abs/1905.09300.
4  * Based on the python implementation found at:
5  * https://www.black-holes.org/data/surrogates/index.html
6  * which uses the same hdf5 data file.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with with program; see the file COPYING. If not, write to the
20  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21  * MA 02110-1301 USA
22  */
23 
25 
26 
27 /****************************** Constants ***********************************/
28 
29 ///// NRSur7dq2 constants
30 
31 // These are to rescale the mass ratio fit range from [0.99, 2.01] to [-1, 1].
32 static const double NRSUR7DQ2_Q_FIT_OFFSET = -2.9411764705882355; // = (0.5*(2.01 - 0.99)) * (2 / (2.01 - 0.99))
33 static const double NRSUR7DQ2_Q_FIT_SLOPE = 1.9607843137254901; // = 2 / (2.01 - 0.99)
34 
35 // Allow extrapolation in mass ratio and spin beyond these values but throw
36 // a warning
37 static const double NRSUR7DQ2_Q_MAX_WARN = 2.01;
38 static const double NRSUR7DQ2_CHI_MAX_WARN = 0.81;
39 
40 // Do not allow extrapolation beyond these, unless unlimited_extrapolation=1
41 static const double NRSUR7DQ2_Q_MAX = 3.01;
42 static const double NRSUR7DQ2_CHI_MAX = 1;
43 
44 static const double NRSUR7DQ2_START_TIME = -4499.99999999; // The first time node is ever so slightly larger than -4500; this avoids out-of-range issues;
45 
46 
47 ///// NRSur7dq4 constants
48 
49 // These are to rescale log(q) fit range from [-0.01, np.log(4.01)] to [-1, 1].
50 // slope = 2./(np.log(4.01) + 0.01)
51 static const double NRSUR7DQ4_Q_FIT_SLOPE = 1.4298059216576398 ;
52 // offset = np.log(4.01)*1.4298059216576398 - 1
53 static const double NRSUR7DQ4_Q_FIT_OFFSET = -0.9857019407834238;
54 
55 // Allow extrapolation in mass ratio and spin beyond these values but throw
56 // a warning
57 static const double NRSUR7DQ4_Q_MAX_WARN = 4.01;
58 static const double NRSUR7DQ4_CHI_MAX_WARN = 0.81;
59 
60 // Do not allow extrapolation beyond these, unless unlimited_extrapolation=1
61 static const double NRSUR7DQ4_Q_MAX = 6.01;
62 static const double NRSUR7DQ4_CHI_MAX = 1;
63 
64 static const double NRSUR7DQ4_START_TIME = -4299.99999999; // The first time node is ever so slightly larger than -4300; this avoids out-of-range issues;
65 
66 
67 
68 
69 
70 static const int NRSUR_LMAX = 4;
71 
72 // Surrogate model data, in LAL_DATA_PATH. File available in lalsuite-extra or at
73 // https://www.black-holes.org/surrogates
74 static const char NRSUR7DQ2_DATAFILE[] = "NRSur7dq2.h5";
75 static const char NRSUR7DQ4_DATAFILE[] = "NRSur7dq4.h5";
76 
77 /***********************************************************************************/
78 /****************************** Type definitions ***********************************/
79 /***********************************************************************************/
80 
81 /**
82  * Data used in a single scalar fit
83  */
84 typedef struct tagFitData {
85  gsl_matrix_long *basisFunctionOrders; /**< matrix of (n_coefs x 7) basis function orders
86  giving the polynomial order in f(q), chiA components, and chiB components. */
87  gsl_vector *coefs; /**< coefficient vector of length n_coefs */
88  int n_coefs; /**< Number of coefficients in the fit */
89 } FitData;
90 
91 /**
92  * Data used in a single vector fit
93  * NOTE: basisFunctionOrders, coefs, componentIndices, and n_coefs are only
94  * used by NRSur7dq2. While fit_data is only used by NRSur7dq4.
95  */
96 typedef struct tagVectorFitData {
97  gsl_matrix_long *basisFunctionOrders; /**< matrix of (n_coefs x 7) basis function orders
98  giving the polynomial order in f(q), chiA components, and chiB components. */
99  gsl_vector *coefs; /**< coefficient vector of length n_coefs */
100  gsl_vector_long *componentIndices; /**< Each fit coefficient applies to a single component
101  of the vector; this gives the component indices. */
102  int n_coefs; /**< Number of coefficients in the fit */
103  int vec_dim; /**< Dimension of the vector */
104  FitData **fit_data; /**< Vector of FitData */
105 } VectorFitData;
106 
107 /**
108  * Data for a single dynamics node
109  */
110 typedef struct tagDynamicsNodeFitData {
111  FitData *omega_data; /**< A fit to the orbital angular frequency */
112  VectorFitData *omega_copr_data; /**< A 2d vector fit for the x and y components of
113  Omega^{coorb}(t) in arxiv 1705.07089 */
114  VectorFitData *chiA_dot_data; /**< A 3d vector fit for the coorbital components of the
115  time derivative of chiA taken in the coprecessing frame */
116  VectorFitData *chiB_dot_data; /**< A 3d vector fit for the coorbital components of the
117  time derivative of chiB taken in the coprecessing frame */
119 
120 /**
121  * Data for a single waveform data piece.
122  * Waveform data pieces are real time-dependent components of the waveform in the coorbital frame.
123  * See the beginning of section IV of https://arxiv.org/abs/1705.07089
124  */
125 typedef struct tagWaveformDataPiece {
126  int n_nodes; /**< Number of empirical nodes */
127  FitData **fit_data; /**< FitData at each empirical node */
128  gsl_matrix *empirical_interpolant_basis; /**< The empirical interpolation matrix */
129  gsl_vector_long *empirical_node_indices; /**< The empirical node indices */
131 
132 /**
133  * All WaveformDataPieces needed to evaluate all modes with a fixed value of ell.
134  * For m=0 modes we model the real and imaginary parts separately.
135  * For m>0, we model the real and imaginary parts of
136  * X_pm^{ell, m} = frac{1}{2}( h^{ell, m} pm h^{ell, -m} )
137  * where this h is in the coorbital frame.
138  * (see https://arxiv.org/abs/1705.07089)
139  */
140 typedef struct tagWaveformFixedEllModeData {
141  int ell; /**< The fixed value of ell */
142  WaveformDataPiece *m0_real_data; /**< The real (ell, 0) mode data piece */
143  WaveformDataPiece *m0_imag_data; /**< The imag (ell, 0) mode data piece */
144  WaveformDataPiece **X_real_plus_data; /**< One Re[X_+] for each 1 <= m <= ell */
145  WaveformDataPiece **X_real_minus_data; /**< One Re[X_-] for each 1 <= m <= ell */
146  WaveformDataPiece **X_imag_plus_data; /**< One Im[X_+] for each 1 <= m <= ell */
147  WaveformDataPiece **X_imag_minus_data; /**< One Im[X_-] for each 1 <= m <= ell */
149 
150 /**
151  * All data needed by the full surrogate model
152  */
153 typedef struct tagPrecessingNRSurData {
154  UINT4 setup; /**< Indicates if this has been initialized */
155  int LMax; /**< Maximum ell mode that will ever be evaluated */
156  gsl_vector *t_ds; /** Vector of the dynamics surrogate node times, not including half times */
157  gsl_vector *t_ds_half_times; /**< t_1/2, t_3/2, and t_5/2 used to start up integration*/
158  gsl_vector *t_coorb; /**< Vector of the coorbital surrogate output times. */
159  DynamicsNodeFitData **ds_node_data; /** A DynamicsNodeFitData for each time in t_ds.*/
160  DynamicsNodeFitData **ds_half_node_data; /** A DynamicsNodeFitData for each time in t_ds_half_times. */
161  WaveformFixedEllModeData **coorbital_mode_data; /** One for each 2 <= ell <= LMax */
162  UINT4 PrecessingNRSurVersion; /**< 0 for NRSur7dq2, 1 for NRSur7dq4 */
164 
165 
166 /***********************************************************************************/
167 /****************************** Function declarations*******************************/
168 /***********************************************************************************/
169 static void NRSur7dq2_Init_LALDATA(void);
170 static void NRSur7dq4_Init_LALDATA(void);
171 static int PrecessingNRSur_Init(PrecessingNRSurData *data, LALH5File *file, UINT4 PrecessingNRSurVersion);
172 static void PrecessingNRSur_LoadFitData(FitData **fit_data, LALH5File *sub, const char *name);
173 static void NRSur7dq4_LoadVectorFitData(VectorFitData **vector_fit_data, LALH5File *sub, const char *name, const size_t size);
174 static void PrecessingNRSur_LoadDynamicsNode(DynamicsNodeFitData **ds_node_data, LALH5File *sub, int i, UINT4 PrecessingNRSurVersion);
177 static bool NRSur7dq2_IsSetup(void);
178 static bool NRSur7dq4_IsSetup(void);
179 static double ipow(double base, int exponent); // integer powers
180 
181 static double NRSur7dq2_eval_fit(FitData *data, double *x);
182 
184  double *res, // Result
185  VectorFitData *data, // Data for fit
186  double *x // size 7, giving mass ratio q, and dimensionless spin components
187 );
188 
189 static int NRSur7dq4_effective_spins(REAL8 *chiHat, REAL8 *chi_a,
190  const double q, const double chi1z, const double chi2z);
191 static double NRSur7dq4_eval_fit(FitData *data, double *x);
192 
194  double *res, // Result
195  VectorFitData *data, // Data for fit
196  double *x // size 7, giving mass ratio q, and dimensionless spin components
197 );
198 
199 double PrecessingNRSur_eval_fit(FitData *data, double *x, PrecessingNRSurData *__sur_data);
200 
201 static void PrecessingNRSur_eval_vector_fit(double *res, VectorFitData *data, double *x, PrecessingNRSurData *__sur_data);
202 
204  double chiANorm,
205  double chiBNorm,
206  double *y
207 ); // Helper to keep spin magnitude constant
208 
210  double normA,
211  double normB,
212  gsl_vector **quat,
213  gsl_vector **chiA,
214  gsl_vector **chiB
215 );
216 
217 static void PrecessingNRSur_rotate_spins(gsl_vector **chiA, gsl_vector **chiB, gsl_vector *phi);
218 
220  double *x, //Result, length 7
221  double q, // Mass ratio
222  double *y // [q0, qx, qy, qz, phi, chiAx, chiAy, chiAz, chiBx, chiBy, chiBz]
223 );
224 
226  double *dydt, // Result, length 11
227  double *y, // ODE solution at the current time step
228  double *Omega_coorb_xy, // a form of time derivative of the coprecessing frame
229  double omega, // orbital angular frequency in the coprecessing frame
230  double *chiA_dot, // chiA time derivative
231  double *chiB_dot // chiB time derivative
232 );
233 
234 
235 static double cubic_interp(double xout, double *x, double *y);
236 static gsl_vector *spline_array_interp(gsl_vector *xout, gsl_vector *x, gsl_vector *y);
237 
238 static double PrecessingNRSur_get_omega(size_t node_index, double q, double *y0, PrecessingNRSurData *__sur_data);
239 
241  REAL8 omega_ref,
242  REAL8 q,
243  REAL8 *chiA0,
244  REAL8 *chiB0,
245  REAL8 *init_quat,
246  REAL8 init_orbphase,
247  PrecessingNRSurData *__sur_data
248 );
249 
251  double *dydt, // Output: dy/dt evaluated at the ODE time node with index i0. Must have space for 11 entries.
252  int i0, // Time node index. i0=-1, -2, and -3 are used for time nodes 1/2, 3/2, and 5/2 respectively.
253  double q, // Mass ratio
254  double *y, // Current ODE state: [q0, qx, qy, qz, orbphase, chiAx, chiAy, chiAz, chiBx, chiBy, chiBz]
255  PrecessingNRSurData *__sur_data
256 );
257 
259  double *dtdy, // Output: dy/dt evaluated at time t. Must have space for 11 entries.
260  double t, // Time at which the ODE should be evaluated.
261  double q, // Mass ratio
262  double *y, // Current ODE state
263  PrecessingNRSurData *__sur_data
264 );
265 
267  double *dynamics_data, // ODE output
268  double t_ref, // reference time. t_ds[i0] will be close to t_ref.
269  double q, // mass ratio
270  double *chiA0, // chiA at t_ref.
271  double *chiB0, // chiB at t_ref.
272  double init_orbphase, // orbital phase at t_ref.
273  double *init_quat, // quaternion at t_ref.
274  double normA, // |chiA|
275  double normB, // |chiB|
276  PrecessingNRSurData *__sur_data
277 );
278 
280  double *dynamics_data, // ODE output
281  double *time_steps, // Output: first three time steps. Should have size 3.
282  double *dydt0, // Output: dydt at node 0. Should have size 11.
283  double *dydt1, // Output: dydt at node 1. Should have size 11.
284  double *dydt2, // Output: dydt at node 2. Should have size 11.
285  double *dydt3, // Output: dydt at node 3. Should have size 11.
286  double normA, // |chiA|
287  double normB, // |chiB|
288  double q, // mass ratio
289  PrecessingNRSurData *__sur_data
290 );
291 
293  double *dynamics_data, // ODE output
294  double *time_steps, // Output: first three time steps. Should have size 3.
295  double *dydt0, // Output: dydt at node i0 + 0. Should have size 11.
296  double *dydt1, // Output: dydt at node i0 + 1. Should have size 11.
297  double *dydt2, // Output: dydt at node i0 + 2. Should have size 11.
298  double *dydt3, // Output: dydt at node i0 + 3. Should have size 11.
299  double normA, // |chiA|
300  double normB, // |chiB|
301  double q, // mass ratio
302  int i0, // the node that is already initialized
303  PrecessingNRSurData *__sur_data
304 );
305 
307  double *dynamics_data, // ODE output
308  double *time_steps, // The first three time steps beginning at i_start.
309  double *dydt0, // dydt at node i_start
310  double *dydt1, // dydt at node i_start + 1
311  double *dydt2, // dydt at node i_start + 2
312  double *dydt3, // dydt at node i_start + 3
313  double normA, // |chiA|
314  double normB, // |chiB|
315  double q, // mass ratio
316  int i_start, // nodes i_start through i_start+3 are already initialized
317  PrecessingNRSurData *__sur_data
318 );
319 
321  double *dynamics_data,
322  double q,
323  double *chiA0,
324  double *chiB0,
325  double omega_ref,
326  double init_orbphase,
327  double *init_quat,
328  LALDict* LALparams,
329  UINT4 PrecessingNRSurVersion
330 );
331 
333  gsl_vector *result,
334  double q,
335  gsl_vector **chiA,
336  gsl_vector **chiB,
338  PrecessingNRSurData *__sur_data
339 );
340 
342 
344  MultiModalWaveform **h,
345  double q,
346  double *chiA0,
347  double *chiB0,
348  double omega_ref,
349  double init_orbphase,
350  double *init_quat,
351  LALValue* ModeArray,
352  LALDict* LALparams,
354 );
355 
356 static double PrecessingNRSur_StartFrequency(
357  REAL8 m1, /**< mass of companion 1 (kg) */
358  REAL8 m2, /**< mass of companion 2 (kg) */
359  REAL8 s1x, /**< initial value of S1x */
360  REAL8 s1y, /**< initial value of S1y */
361  REAL8 s1z, /**< initial value of S1z */
362  REAL8 s2x, /**< initial value of S2x */
363  REAL8 s2y, /**< initial value of S2y */
364  REAL8 s2z, /**< initial value of S2z */
365  PrecessingNRSurData *__sur_data /**< 0 for NRSur7dq2, 1 for NRSur7dq4 */
366 );
367 
368 
370  REAL8 *m1, /**< mass of companion 1 (kg) */
371  REAL8 *m2, /**< mass of companion 2 (kg) */
372  REAL8 *s1x, /**< initial value of S1x */
373  REAL8 *s1y, /**< initial value of S1y */
374  REAL8 *s1z, /**< initial value of S1z */
375  REAL8 *s2x, /**< initial value of S2x */
376  REAL8 *s2y, /**< initial value of S2y */
377  REAL8 *s2z /**< initial value of S2z */
378 );
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)
const char * name
double i
Definition: bh_ringdown.c:118
sigmaKerr data[0]
double REAL8
uint32_t UINT4
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)
static const INT4 q
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
Structure for a multi-modal waveform.
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
Data for a single waveform data piece.
gsl_matrix * empirical_interpolant_basis
The empirical interpolation matrix.
gsl_vector_long * empirical_node_indices
The empirical node indices.
int n_nodes
Number of empirical nodes.
FitData ** fit_data
FitData at each empirical node.
All WaveformDataPieces needed to evaluate all modes with a fixed value of ell.
WaveformDataPiece * m0_real_data
The real (ell, 0) mode data piece.
WaveformDataPiece ** X_real_minus_data
One Re[X_-] for each 1 <= m <= ell.
WaveformDataPiece ** X_imag_plus_data
One Im[X_+] for each 1 <= m <= ell.
WaveformDataPiece ** X_imag_minus_data
One Im[X_-] for each 1 <= m <= ell.
int ell
The fixed value of ell.
WaveformDataPiece * m0_imag_data
The imag (ell, 0) mode data piece.
WaveformDataPiece ** X_real_plus_data
One Re[X_+] for each 1 <= m <= ell.