30 #define UNUSED __attribute__ ((unused))
35 #include <gsl/gsl_errno.h>
36 #include <gsl/gsl_bspline.h>
37 #include <gsl/gsl_blas.h>
38 #include <gsl/gsl_min.h>
39 #include <gsl/gsl_spline.h>
40 #include <lal/Units.h>
41 #include <lal/SeqFactories.h>
42 #include <lal/LALConstants.h>
43 #include <lal/XLALError.h>
44 #include <lal/FrequencySeries.h>
46 #include <lal/StringInput.h>
47 #include <lal/Sequence.h>
48 #include <lal/LALStdio.h>
49 #include <lal/FileIO.h>
51 #include <lal/LALSimInspiral.h>
52 #include <lal/LALSimIMR.h>
53 #include <lal/LALConfig.h>
54 #include <lal/SphericalHarmonics.h>
55 #include <lal/LALSimInspiralPrecess.h>
57 #include <lal/H5FileIO.h>
66 #ifndef LAL_HDF5_ENABLED
69 gsl_vector *omega_w_vec = NULL;
71 REAL8 min_fref, lowest_arr_fref;
78 ReadHDF5RealVectorDataset(omega_group,
"Y", &omega_w_vec);
80 lowest_arr_fref = gsl_vector_get(omega_w_vec, 0);
82 gsl_vector_free(omega_w_vec);
85 if (fRef < 0.9999 * min_fref)
87 XLAL_ERROR(
XLAL_EINVAL,
"The supplied reference frequency is lower than the start frequency of the waveform. Start frequency (scaled by total mass) is %e and supplied fRef (scaled by total mass) is %e.\n", min_fref, fRef);
91 if (fRef < lowest_arr_fref)
105 #ifndef LAL_HDF5_ENABLED
111 gsl_vector *omega_t_vec = NULL;
112 gsl_vector *omega_w_vec = NULL;
113 gsl_interp_accel *acc;
117 ReadHDF5RealVectorDataset(curr_group,
"X", &omega_t_vec);
118 ReadHDF5RealVectorDataset(curr_group,
"Y", &omega_w_vec);
120 acc = gsl_interp_accel_alloc();
121 spline = gsl_spline_alloc(gsl_interp_cspline, omega_w_vec->size);
122 INT4 status = gsl_spline_init(spline, omega_w_vec->data, omega_t_vec->data,
124 XLAL_CHECK(
status == GSL_SUCCESS,
XLAL_FAILURE,
"Failed gsl_spline_init evaluation. Probably omega_w is not monotonically increasing.\n");
126 if ( isnan(ref_time) ){
129 gsl_vector_free(omega_t_vec);
130 gsl_vector_free(omega_w_vec);
131 gsl_spline_free(spline);
132 gsl_interp_accel_free(acc);
139 UNUSED
const char *groupName,
140 UNUSED
REAL8 ref_point
143 #ifndef LAL_HDF5_ENABLED
147 gsl_vector *curr_t_vec = NULL;
148 gsl_vector *curr_y_vec = NULL;
149 gsl_interp_accel *acc;
153 ReadHDF5RealVectorDataset(curr_group,
"X", &curr_t_vec);
154 ReadHDF5RealVectorDataset(curr_group,
"Y", &curr_y_vec);
156 acc = gsl_interp_accel_alloc();
157 spline = gsl_spline_alloc(gsl_interp_cspline, curr_t_vec->size);
158 INT4 status = gsl_spline_init(spline, curr_t_vec->data, curr_y_vec->data,
160 XLAL_CHECK(
status == GSL_SUCCESS,
XLAL_FAILURE,
"Failed gsl_spline_init evaluation. Probably omega_w is not monotonically increasing.\n");
161 ret_val = gsl_spline_eval(spline, ref_point, acc);
162 if ( isnan(ret_val) ){
163 XLAL_ERROR(
XLAL_FAILURE,
"Interpolation error: gsl_spline_eval returning nan. Group name %s\n", groupName);
165 gsl_vector_free(curr_t_vec);
166 gsl_vector_free(curr_y_vec);
167 gsl_spline_free (spline);
168 gsl_interp_accel_free (acc);
186 #ifndef LAL_HDF5_ENABLED
189 REAL8 nrSpin1x, nrSpin1y, nrSpin1z, nrSpin2x, nrSpin2y, nrSpin2z;
190 REAL8 ln_hat_x, ln_hat_y, ln_hat_z, n_hat_x, n_hat_y, n_hat_z, n_norm;
191 REAL8 pos1x, pos1y, pos1z, pos2x, pos2y, pos2z;
198 if ((nr_file_format < 2) && (fRef > 0))
203 XLAL_ERROR(
XLAL_EINVAL,
"This NR file is format 1. Only formats 2 and above support the use of reference frequency. For formats < 2 give the reference frequency as 0 or -1 to indicate that the start of the waveform should be used as the reference.");
236 XLAL_CHECK( ref_time!=
XLAL_FAILURE,
XLAL_FAILURE,
"Error computing reference time. Try setting fRef equal to the f_low given by the NR simulation (%.16f Hz) or to a value <=0 to deactivate fRef for a non-precessing simulation.\n", fminNR/mTot);
240 (
file,
"spin1x-vs-time", ref_time);
242 (
file,
"spin1y-vs-time", ref_time);
244 (
file,
"spin1z-vs-time", ref_time);
246 (
file,
"spin2x-vs-time", ref_time);
248 (
file,
"spin2y-vs-time", ref_time);
250 (
file,
"spin2z-vs-time", ref_time);
252 (
file,
"LNhatx-vs-time", ref_time);
254 (
file,
"LNhaty-vs-time", ref_time);
256 (
file,
"LNhatz-vs-time", ref_time);
259 (
file,
"position1x-vs-time", ref_time);
261 (
file,
"position1y-vs-time", ref_time);
263 (
file,
"position1z-vs-time", ref_time);
265 (
file,
"position2x-vs-time", ref_time);
267 (
file,
"position2y-vs-time", ref_time);
269 (
file,
"position2z-vs-time", ref_time);
270 n_hat_x = pos1x - pos2x;
271 n_hat_y = pos1y - pos2y;
272 n_hat_z = pos1z - pos2z;
273 n_norm = sqrt(n_hat_x*n_hat_x + n_hat_y*n_hat_y + n_hat_z*n_hat_z);
274 n_hat_x = n_hat_x / n_norm;
275 n_hat_y = n_hat_y / n_norm;
276 n_hat_z = n_hat_z / n_norm;
279 *S1x = nrSpin1x * n_hat_x + nrSpin1y * n_hat_y + nrSpin1z * n_hat_z;
280 *S1y = nrSpin1x * (-ln_hat_z * n_hat_y + ln_hat_y * n_hat_z)
281 + nrSpin1y * (ln_hat_z * n_hat_x - ln_hat_x * n_hat_z)
282 + nrSpin1z * (-ln_hat_y * n_hat_x + ln_hat_x * n_hat_y) ;
283 *S1z = nrSpin1x * ln_hat_x + nrSpin1y * ln_hat_y + nrSpin1z * ln_hat_z;
285 *S2x = nrSpin2x * n_hat_x + nrSpin2y * n_hat_y + nrSpin2z * n_hat_z;
286 *S2y = nrSpin2x * (-ln_hat_z * n_hat_y + ln_hat_y * n_hat_z)
287 + nrSpin2y * (ln_hat_z * n_hat_x - ln_hat_x * n_hat_z)
288 + nrSpin2z * (-ln_hat_y * n_hat_x + ln_hat_x * n_hat_y);
289 *S2z = nrSpin2x * ln_hat_x + nrSpin2y * ln_hat_y + nrSpin2z * ln_hat_z;
298 UNUSED
REAL8 totalMass,
299 UNUSED
REAL8 startTime,
300 UNUSED
size_t length,
302 UNUSED
const char *keyName
305 #ifndef LAL_HDF5_ENABLED
309 size_t comp_data_length;
311 gsl_interp_accel *acc;
313 gsl_vector *knotsVector, *dataVector;
315 knotsVector=dataVector=NULL;
317 ReadHDF5RealVectorDataset(group,
"X", &knotsVector);
318 ReadHDF5RealVectorDataset(group,
"Y", &dataVector);
323 comp_data_length = dataVector->size;
325 acc = gsl_interp_accel_alloc();
326 spline = gsl_spline_alloc(gsl_interp_cspline, comp_data_length);
327 INT4 status = gsl_spline_init(spline, knotsVector->data, dataVector->data,
329 XLAL_CHECK(
status == GSL_SUCCESS,
XLAL_FAILURE,
"Failed gsl_spline_init evaluation. Probably omega_w is not monotonically increasing.\n");
331 for (idx = 0; idx < length; idx++)
340 if ((idx == 0) && (massTime < knotsVector->data[0]))
342 massTime = knotsVector->data[0];
344 (*output)->data[idx] = gsl_spline_eval(spline, massTime, acc);
347 gsl_vector_free(knotsVector);
348 gsl_vector_free(dataVector);
349 gsl_spline_free (spline);
350 gsl_interp_accel_free (acc);
359 UNUSED
REAL8 *calpha,
360 UNUSED
REAL8 *salpha,
362 UNUSED
const REAL8 inclination,
363 UNUSED
const REAL8 phi_ref,
367 #ifndef LAL_HDF5_ENABLED
377 REAL8 orb_phase, ln_hat_x, ln_hat_y, ln_hat_z, ln_hat_norm, ref_time;
378 REAL8 n_hat_x, n_hat_y, n_hat_z, n_hat_norm;
379 REAL8 pos1x, pos1y, pos1z, pos2x, pos2y, pos2z;
380 REAL8 r_x, r_y, r_z, r_norm;
381 REAL8 corb_phase, sorb_phase, sinclination, cinclination;
382 REAL8 ln_cross_n_x, ln_cross_n_y, ln_cross_n_z, ln_cross_n_norm;
383 REAL8 z_wave_x, z_wave_y, z_wave_z, z_wave_norm;
384 REAL8 stheta, ctheta, spsi, cpsi, theta_hat_x, theta_hat_y, theta_hat_z;
385 REAL8 psi_hat_x, psi_hat_y, psi_hat_z;
386 REAL8 n_dot_theta, ln_cross_n_dot_theta, n_dot_psi, ln_cross_n_dot_psi;
406 XLAL_CHECK( ref_time!=
XLAL_FAILURE,
XLAL_FAILURE,
"Error computing reference time. Try setting fRef equal to the f_low given by the NR simulation or to a value <=0 to deactivate fRef for a non-precessing simulation.\n");
408 (filepointer,
"LNhatx-vs-time", ref_time);
410 (filepointer,
"LNhaty-vs-time", ref_time);
412 (filepointer,
"LNhatz-vs-time", ref_time);
415 (filepointer,
"position1x-vs-time", ref_time);
417 (filepointer,
"position1y-vs-time", ref_time);
419 (filepointer,
"position1z-vs-time", ref_time);
421 (filepointer,
"position2x-vs-time", ref_time);
423 (filepointer,
"position2y-vs-time", ref_time);
425 (filepointer,
"position2z-vs-time", ref_time);
429 r_norm=sqrt(r_x*r_x+ r_y*r_y + r_z*r_z);
444 ln_hat_norm = sqrt(ln_hat_x * ln_hat_x + ln_hat_y * ln_hat_y + ln_hat_z * ln_hat_z);
446 if (fabs(ln_hat_norm - 1) > 0.001)
449 XLAL_ERROR(
XLAL_EDOM,
"The size of the LN hat vector in the supplied HDF file is not equal to unity");
452 ln_hat_x = ln_hat_x / ln_hat_norm;
453 ln_hat_y = ln_hat_y / ln_hat_norm;
454 ln_hat_z = ln_hat_z / ln_hat_norm;
456 n_hat_norm = sqrt(n_hat_x * n_hat_x + n_hat_y * n_hat_y + n_hat_z * n_hat_z);
458 if (fabs(n_hat_norm - 1) > 0.001)
461 XLAL_ERROR(
XLAL_EDOM,
"The size of the n hat vector in the supplied HDF file is not equal to unity");
464 n_hat_x = n_hat_x / n_hat_norm;
465 n_hat_y = n_hat_y / n_hat_norm;
466 n_hat_z = n_hat_z / n_hat_norm;
470 corb_phase = cos(orb_phase);
471 sorb_phase = sin(orb_phase);
472 sinclination = sin(inclination);
473 cinclination = cos(inclination);
475 ln_cross_n_x = ln_hat_y * n_hat_z - ln_hat_z * n_hat_y;
476 ln_cross_n_y = ln_hat_z * n_hat_x - ln_hat_x * n_hat_z;
477 ln_cross_n_z = ln_hat_x * n_hat_y - ln_hat_y * n_hat_x;
479 ln_cross_n_norm = sqrt(ln_cross_n_x*ln_cross_n_x + ln_cross_n_y*ln_cross_n_y + ln_cross_n_z*ln_cross_n_z);
480 ln_cross_n_x = ln_cross_n_x / ln_cross_n_norm;
481 ln_cross_n_y = ln_cross_n_y / ln_cross_n_norm;
482 ln_cross_n_z = ln_cross_n_z / ln_cross_n_norm;
484 if (fabs(ln_cross_n_norm - 1) > 0.001)
487 XLAL_ERROR(
XLAL_EDOM,
"The size of the LN x n vector computed here is not equal to unity. This shouldn't be possible, please email lalsimulation developers.");
490 z_wave_x = sinclination * (sorb_phase * n_hat_x + corb_phase * ln_cross_n_x);
491 z_wave_y = sinclination * (sorb_phase * n_hat_y + corb_phase * ln_cross_n_y);
492 z_wave_z = sinclination * (sorb_phase * n_hat_z + corb_phase * ln_cross_n_z);
494 z_wave_x += cinclination * ln_hat_x;
495 z_wave_y += cinclination * ln_hat_y;
496 z_wave_z += cinclination * ln_hat_z;
498 z_wave_norm = sqrt(z_wave_x * z_wave_x + z_wave_y * z_wave_y + z_wave_z * z_wave_z);
500 z_wave_x = z_wave_x / z_wave_norm;
501 z_wave_y = z_wave_y / z_wave_norm;
502 z_wave_z = z_wave_z / z_wave_norm;
504 if (fabs(z_wave_norm - 1) > 0.001)
507 XLAL_ERROR(
XLAL_EDOM,
"The size of the Z vector computed here is not equal to unity. This shouldn't be possible, please email lalsimulation developers.");
514 *
theta = acos(z_wave_z);
520 if(fabs(z_wave_z - 1.0 ) < 0.000001)
528 if(fabs(z_wave_x / sin(*
theta)) > 1.)
530 if(fabs(z_wave_x / sin(*
theta)) < 1.00001)
532 if((z_wave_x * sin(*
theta)) < 0.)
545 XLAL_ERROR(
XLAL_EDOM,
"Z_x cannot be bigger than sin(theta). Please email lalsimulation developers.");
550 *psi = acos(z_wave_x / sin(*
theta));
552 y_val = sin(*psi) * sin(*
theta);
558 y_val = sin(*psi) * sin(*
theta);
560 if( fabs(y_val - z_wave_y) > 0.005)
563 XLAL_PRINT_ERROR(
"y_val = %.16f, z_wave_y = %.16f, fabs(y_val - z_wave_y) = %.16f\n", y_val, z_wave_y, fabs(y_val - z_wave_y));
570 stheta = sin(*
theta);
571 ctheta = cos(*
theta);
575 theta_hat_x = cpsi * ctheta;
576 theta_hat_y = spsi * ctheta;
577 theta_hat_z = - stheta;
585 n_dot_theta = n_hat_x * theta_hat_x + n_hat_y * theta_hat_y + n_hat_z * theta_hat_z;
586 ln_cross_n_dot_theta = ln_cross_n_x * theta_hat_x + ln_cross_n_y * theta_hat_y + ln_cross_n_z * theta_hat_z;
587 n_dot_psi = n_hat_x * psi_hat_x + n_hat_y * psi_hat_y + n_hat_z * psi_hat_z;
588 ln_cross_n_dot_psi = ln_cross_n_x * psi_hat_x + ln_cross_n_y * psi_hat_y + ln_cross_n_z * psi_hat_z;
590 *salpha = corb_phase * n_dot_theta - sorb_phase * ln_cross_n_dot_theta;
591 *calpha = corb_phase * n_dot_psi - sorb_phase * ln_cross_n_dot_psi;
622 UNUSED
const char *NRDataFile
625 #ifndef LAL_HDF5_ENABLED
636 S2y, S2z, fRef, mTot,
649 UNUSED
UINT4 *length,
663 UNUSED LALValue* ModeArray
666 #ifndef LAL_HDF5_ENABLED
670 UINT4 curr_idx, nr_file_format;
674 REAL8 S1x = 0, S1y = 0, S1z = 0, S2x = 0, S2y = 0, S2z = 0;
675 REAL8 Mflower, time_start_M, time_start_s, time_end_M, time_end_s;
676 REAL8 est_start_time;
677 REAL8 distance_scale_fac;
685 gsl_vector *tmpVector=NULL;
694 if (fabs((m1 * m2) / pow((m1 + m2),2.0) - nrEta) > 1E-3)
696 XLAL_ERROR(
XLAL_EDOM,
"MASSES (%e and %e) ARE INCONSISTENT WITH THE MASS RATIO OF THE NR SIMULATION (eta=%e).\n", m1, m2, nrEta);
709 if (fabs(S1x - s1x) > 1E-3)
714 if (fabs(S1y - s1y) > 1E-3)
719 if (fabs(S1z - s1z) > 1E-3)
724 if (fabs(S2x - s2x) > 1E-3)
729 if (fabs(S2y - s2y) > 1E-3)
734 if (fabs(S2z - s2z) > 1E-3)
747 ReadHDF5RealVectorDataset(group,
"X", &tmpVector);
749 time_start_M = (
REAL8)(gsl_vector_get(tmpVector, 0));
750 time_end_M = (
REAL8)(gsl_vector_get(tmpVector, tmpVector->size - 1));
751 gsl_vector_free(tmpVector);
764 if (fStart * (1 + 1E-5) < Mflower / (m1 + m2))
767 fStart = %e, Mflower = %e, Mflower / (m1 + m2)) = %e",
768 fStart, Mflower, Mflower / (m1 + m2));
772 if (nr_file_format > 1)
780 XLAL_CHECK( est_start_time!=
XLAL_FAILURE,
XLAL_FAILURE,
"Error computing starting time. Try setting f_low equal to the f_low given by the NR simulation (%.16f Hz)\n",fminNR/(m1+m2));
781 est_start_time = est_start_time * (m1 + m2) *
LAL_MTSUN_SI;
789 est_start_time = time_start_s;
796 est_start_time = (-est_start_time) * 1.1;
799 if (est_start_time > time_start_s)
802 time_start_s = est_start_time;
803 time_start_M = time_start_s / ((m1 + m2) *
LAL_MTSUN_SI);
806 array_length = (
UINT4)(ceil( (time_end_s - time_start_s) /
deltaT));
807 *length=array_length;
823 INT4 modearray_needs_destroying=0;
824 if ( ModeArray == NULL )
826 modearray_needs_destroying=1;
828 for (
int ell=2; ell<=NRLmax; ell++)
837 for (model=2; model < (NRLmax + 1) ; model++)
839 for (modem=-model; modem < (model+1); modem++)
851 snprintf(amp_key,
sizeof(amp_key),
"amp_l%d_m%d", model, modem);
852 snprintf(phase_key,
sizeof(phase_key),
"phase_l%d_m%d", model, modem);
866 time_start_s, array_length,
deltaT, amp_key);
868 time_start_s, array_length,
deltaT, phase_key);
870 for (curr_idx = 0; curr_idx < array_length; curr_idx++)
872 hlm->
data->
data[curr_idx]= (curr_amp->
data[curr_idx]*cos(curr_phase->
data[curr_idx]) + I*curr_amp->
data[curr_idx]*sin(curr_phase->
data[curr_idx]) ) * distance_scale_fac;
885 if (modearray_needs_destroying)
899 UNUSED
REAL8 inclination,
912 UNUSED
const char *NRDataFile,
913 UNUSED LALValue* ModeArray
916 #ifndef LAL_HDF5_ENABLED
920 UINT4 curr_idx, array_length, nr_file_format;
921 INT4 model, modem, NRLmax;
924 REAL8 fRef_pass=fRef;
949 if (nr_file_format < 2)
951 XLALPrintInfo(
"This NR file is format %d. Only formats 2 and above support the use of reference frequency. For formats < 2 the reference frequency always corresponds to the start of the waveform.", nr_file_format);
955 deltaT, m1, m2,
r, fStart, fRef_pass, \
956 s1x,s1y,s1z,s2x,s2y,s2z, \
963 theta = psi = calpha = salpha = 0.;
965 &salpha,
file, inclination, phiRef, fRef_pass*(m1+m2));
977 for (curr_idx = 0; curr_idx < array_length; curr_idx++)
979 hplus_corr->
data->
data[curr_idx] = 0.0;
980 hcross_corr->
data->
data[curr_idx] = 0.0;
985 for (model=2; model < (NRLmax + 1) ; model++)
987 for (modem=-model; modem < (model+1); modem++)
992 for (curr_idx = 0; curr_idx < array_length; curr_idx++)
994 tmp=curr_hlm->
data->
data[curr_idx]*curr_ylm;
995 hplus_corr->
data->
data[curr_idx] += creal(tmp);
996 hcross_corr->
data->
data[curr_idx] -= cimag(tmp);
1009 for (curr_idx = 0; curr_idx < array_length; curr_idx++)
1011 (*hplus)->data->data[curr_idx] =
1012 (calpha*calpha - salpha*salpha) * hplus_corr->
data->
data[curr_idx]
1013 - 2.0*calpha*salpha * hcross_corr->
data->
data[curr_idx];
1015 (*hcross)->data->data[curr_idx] =
1016 + 2.0*calpha*salpha * hplus_corr->
data->
data[curr_idx]
1017 + (calpha*calpha - salpha*salpha) * hcross_corr->
data->
data[curr_idx];
1033 UNUSED
REAL8 fStart,
1041 UNUSED
const char *NRDataFile,
1042 UNUSED LALValue* ModeArray
1045 #ifndef LAL_HDF5_ENABLED
1049 UINT4 curr_idx, array_length, nr_file_format;
1050 INT4 model, modem, NRLmax;
1053 REAL8 fRef_pass=fRef;
1072 if (nr_file_format < 2)
1074 XLALPrintInfo(
"This NR file is format %d. Only formats 2 and above support the use of reference frequency. For formats < 2 the reference frequency always corresponds to the start of the waveform.", nr_file_format);
1079 deltaT, m1, m2,
r, fStart, fRef_pass, \
1080 s1x,s1y,s1z,s2x,s2y,s2z, \
1087 psi = calpha = salpha = 0.;
1089 &salpha,
file, 0., 0., fRef_pass*(m1+m2));
1094 for (model=2; model < (NRLmax + 1) ; model++)
1096 for (modem=-model; modem < (model+1); modem++)
1100 for (curr_idx = 0; curr_idx < array_length; curr_idx++)
1101 tmp_hlm->
data->
data[curr_idx]*=facm;
1119 for (curr_idx = 0; curr_idx < array_length; curr_idx++) {
struct tagLALH5File LALH5File
int XLALSimIMRSEOBNRv4ROMTimeOfFrequency(REAL8 *t, REAL8 frequency, REAL8 m1SI, REAL8 m2SI, REAL8 chi1, REAL8 chi2)
Compute the 'time' elapsed in the ROM waveform from a given starting frequency until the ringdown.
Auxiliary functions for SEOBNRv1/v2 reduced order modeling codes in LALSimIMRSEOBNRv2ROMDoubleSpin....
void XLALDestroyValue(LALValue *value)
void XLALH5FileClose(LALH5File UNUSED *file)
LALH5File * XLALH5GroupOpen(LALH5File UNUSED *file, const char UNUSED *name)
int XLALH5FileQueryScalarAttributeValue(void UNUSED *value, LALH5File UNUSED *file, const char UNUSED *key)
LALH5File * XLALH5FileOpen(const char UNUSED *path, const char UNUSED *mode)
int XLALH5FileCheckGroupExists(const LALH5File UNUSED *file, const char UNUSED *name)
int XLALSimInspiralPrecessionRotateModes(SphHarmTimeSeries *h_lm, REAL8TimeSeries *alpha, REAL8TimeSeries *beta, REAL8TimeSeries *gam)
Takes in the h_lm spherical harmonic decomposed modes and rotates the modes by Euler angles alpha,...
SphHarmTimeSeries * XLALSphHarmTimeSeriesAddMode(SphHarmTimeSeries *appended, const COMPLEX16TimeSeries *inmode, UINT4 l, INT4 m)
Prepend a node to a linked list of SphHarmTimeSeries, or create a new head.
COMPLEX16TimeSeries * XLALSphHarmTimeSeriesGetMode(SphHarmTimeSeries *ts, UINT4 l, INT4 m)
Get the time series of a waveform's (l,m) spherical harmonic mode from a SphHarmTimeSeries linked lis...
UINT4 XLALSphHarmTimeSeriesGetMaxL(SphHarmTimeSeries *ts)
Get the largest l index of any mode in the SphHarmTimeSeries linked list.
void XLALDestroySphHarmTimeSeries(SphHarmTimeSeries *ts)
Delete list from current pointer to the end of the list.
COMPLEX16 XLALSpinWeightedSphericalHarmonic(REAL8 theta, REAL8 phi, int s, int l, int m)
REAL8TimeSeries * XLALCreateREAL8TimeSeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaT, const LALUnit *sampleUnits, size_t length)
void XLALDestroyCOMPLEX16TimeSeries(COMPLEX16TimeSeries *series)
void XLALDestroyREAL8TimeSeries(REAL8TimeSeries *series)
COMPLEX16TimeSeries * XLALCreateCOMPLEX16TimeSeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaT, const LALUnit *sampleUnits, size_t length)
const LALUnit lalStrainUnit
const LALUnit lalDimensionlessUnit
REAL8Vector * XLALCreateREAL8Vector(UINT4 length)
void XLALDestroyREAL8Vector(REAL8Vector *vector)
#define XLAL_PRINT_INFO(...)
int int int XLALPrintInfo(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
#define XLAL_CHECK(assertion,...)
#define XLAL_PRINT_ERROR(...)
LIGOTimeGPS * XLALGPSAdd(LIGOTimeGPS *epoch, REAL8 dt)
Structure to carry a collection of spherical harmonic modes in COMPLEX16 time series.
char output[FILENAME_MAX]