20 #ifndef _LALSIMIMRSPINALIGNEDEOBGSLOPTIMIZEDINTERPOLATION_C
21 #define _LALSIMIMRSPINALIGNEDEOBGSLOPTIMIZEDINTERPOLATION_C
27 #include <lal/LALSimInspiral.h>
28 #include <lal/LALSimIMR.h>
63 gsl_spline *interp = NULL;
64 gsl_interp_accel *accel = NULL;
72 interp = gsl_spline_alloc (gsl_interp_cspline, num_input_times);
73 accel = gsl_interp_accel_alloc ();
75 outputlen = (int) (yin->
data[num_input_times - 1] / deltat) + 1;
78 if (!interp || !accel || !
output)
89 for (
int j = 0; j < outputlen; j++)
90 times[j] = tinit + deltat * j;
93 for (
unsigned int i = 1;
i <= dim;
i++)
96 gsl_spline_init (interp, &yin->
data[0], &yin->
data[num_input_times *
i],
100 unsigned int index_old = 0;
101 double x_lo_old = 0, y_lo_old = 0, b_i_old = 0, c_i_old = 0, d_i_old =
103 for (
int j = 0; j < outputlen; j++)
106 &index_old, &x_lo_old, &y_lo_old,
107 &b_i_old, &c_i_old, &d_i_old);
136 UINT4 num_input_times,
145 gsl_spline *interp = NULL;
146 gsl_interp_accel *accel = NULL;
152 interp = gsl_spline_alloc (gsl_interp_cspline, num_input_times);
153 accel = gsl_interp_accel_alloc ();
156 outputlen = (int) (yin->
data[num_input_times - 1] / deltat) + 1;
159 if (!interp || !accel || !
output)
170 for (
int j = 0; j < outputlen; j++)
171 times[j] = tinit + deltat * j;
174 for (
unsigned int i = dim + 1;
i <= dim + 2;
i++)
177 gsl_spline_init (interp, &yin->
data[0], &yin->
data[num_input_times *
i],
180 unsigned int index_old = 0;
181 double x_lo_old = 0, y_lo_old = 0, b_i_old = 0, c_i_old = 0, d_i_old =
183 for (
int j = 0; j < outputlen; j++)
186 &index_old, &x_lo_old, &y_lo_old,
187 &b_i_old, &c_i_old, &d_i_old);
static UNUSED int SEOBNRv2OptimizedInterpolatorOnlyAmpPhase(REAL8Array *yin, REAL8 tinit, REAL8 deltat, UINT4 num_input_times, REAL8Array **yout)
This function applies the same routines as SEOBNRv2OptimizedInterpolatorNoAmpPhase() above to interpo...
static UNUSED int SEOBNRv2OptimizedInterpolatorNoAmpPhase(REAL8Array *yin, REAL8 tinit, REAL8 deltat, UINT4 num_input_times, REAL8Array **yout)
This function is largely based on/copied from XLALAdaptiveRungeKutta4(), which exists inside the lal/...
static int optimized_gsl_spline_eval_e(const gsl_spline *spline, double interptime, gsl_interp_accel *accel, double *output, unsigned int *index_old, double *x_lo_old, double *y_lo_old, double *b_i_old, double *c_i_old, double *d_i_old)
Perform cubic spline interpolation to achieve evenly-sampled data from that input data.
#define XLAL_CALLGSL(statement)
REAL8Array * XLALCreateREAL8ArrayL(UINT4,...)
void XLALDestroyREAL8Array(REAL8Array *)
char output[FILENAME_MAX]