LALSimulation  5.4.0.1-fe68b98
LALSimIMRNRSur4d2s.c File Reference

Prototypes

static void err_handler (const char *reason, const char *file, int line, int gsl_errno)
 
static void NRSurrogate_Init_LALDATA (void)
 
static int NRSurrogate_Init (const char dir[])
 Setup NRSurrogate model using data files installed in dir. More...
 
static bool NRSurrogate_IsSetup (void)
 Helper function to check if the NRSurrogate model has been initialised. More...
 
static int NRSurrogateData_Init (NRSurrogateData *data, const char dir[])
 
static void NRSurrogateData_Cleanup (NRSurrogateData *data)
 
static int TP_Spline_interpolation_5d (REAL8 x0, REAL8 x1, REAL8 x2, REAL8 x3, REAL8 x4, int n_nodes, int *nc, gsl_vector *cvec_re, gsl_vector *cvec_im, SplineData5d *splinedata, gsl_vector *nodes_re, gsl_vector *nodes_im)
 
static int NRSurrogateData_Init_submodel (NRSurrogateData_submodel **submodel, LALH5File *file, const int i_mode, int n_nodes, int n_freqs, int *nc)
 
static void NRSurrogateData_Cleanup_submodel (NRSurrogateData_submodel *submodel)
 
static void AddModeContribution (double q, double chi1mag, double chi1theta, double chi1phi, double chi2z, double spheretheta, double spherephi, int swsh_L, int swsh_m, int n_nodes, int *nc, gsl_vector *h_re, gsl_vector *h_im, NRSurrogateData_submodel *modeData, SplineData5d *splinedata, gsl_vector *nodes_re, gsl_vector *nodes_im, gsl_vector *mode_re, gsl_vector *mode_im)
 Evaluates one mode of the surrogate model and adds it to the waveform Real and imaginary parts used due to lack of gsl_vector_complex_conjugate() function Note that here the output waveform is a single complex function containing positive and negative frequency content, from which we may obtain hplus and hcross. More...
 
static int NRSurrogateCore (COMPLEX16FrequencySeries **hptilde, COMPLEX16FrequencySeries **hctilde, double phiRef, double distance, double inclination, double Mtot_sec, double q, double chi1mag, double chi1theta, double chi1phi, double chi2z, const REAL8Sequence *freqs)
 Core function for computing the ROM waveform. More...
 
static void SplineData5d_Destroy (SplineData5d *splinedata)
 
static void SplineData5d_Init (SplineData5d **splinedata, int *nc, double *x1, double *x2, double *x3, double *x4, double *x5)
 
static int load_data_sub (const int i_mode, LALH5File *file, gsl_vector *cvec_re, gsl_vector *cvec_im, gsl_matrix *EI_re, gsl_matrix *EI_im)
 
static REAL8 Interpolate_Coefficent_Tensor_5d (gsl_vector *v, gsl_vector *B0, gsl_vector *B1, gsl_vector *B2, gsl_vector *B3, gsl_vector *B4, size_t is0, size_t is1, size_t is2, size_t is3, size_t is4, int *nc)
 
int XLALSimNRSur4d2sFrequencySequence (struct tagCOMPLEX16FrequencySeries **hptilde, struct tagCOMPLEX16FrequencySeries **hctilde, const REAL8Sequence *freqs, REAL8 phiRef, REAL8 distance, REAL8 inclination, REAL8 m1SI, REAL8 m2SI, REAL8 S1x, REAL8 S1y, REAL8 S1z, REAL8 S2x, REAL8 S2y, REAL8 S2z)
 
int XLALSimNRSur4d2s (struct tagCOMPLEX16FrequencySeries **hptilde, struct tagCOMPLEX16FrequencySeries **hctilde, REAL8 phiRef, REAL8 deltaF, REAL8 fLow, REAL8 fHigh, REAL8 distance, REAL8 inclination, REAL8 m1SI, REAL8 m2SI, REAL8 S1x, REAL8 S1y, REAL8 S1z, REAL8 S2x, REAL8 S2y, REAL8 S2z)
 Compute waveform in LAL format for the NRSur4d2s_FDROM NR surrogate model. More...
 

Go to the source code of this file.

Data Structures

struct  NRSurrogateData_submodel
 
struct  SplineData5d
 
struct  NRSurrogateData
 

Variables

static const double Q_MIN = 1.
 
static const double Q_MAX = 2.
 
static const double CHI1_MAG_MAX = 0.8
 
static const double CHI2_MIN = -0.8
 
static const double CHI2_MAX = 0.8
 
static const char NRSUR4D2S_DATAFILE [] = "NRSur4d2s_FDROM.hdf5"
 
static NRSurrogateData __lalsim_NRSurrogate_data
 

Function Documentation

◆ err_handler()

static void err_handler ( const char reason,
const char file,
int  line,
int  gsl_errno 
)
static

Definition at line 255 of file LALSimIMRNRSur4d2s.c.

◆ NRSurrogate_Init_LALDATA()

static void NRSurrogate_Init_LALDATA ( void  )
static

Definition at line 1113 of file LALSimIMRNRSur4d2s.c.

◆ NRSurrogate_Init()

static int NRSurrogate_Init ( const char  dir[])
static

Setup NRSurrogate model using data files installed in dir.

Definition at line 303 of file LALSimIMRNRSur4d2s.c.

◆ NRSurrogate_IsSetup()

static bool NRSurrogate_IsSetup ( void  )
static

Helper function to check if the NRSurrogate model has been initialised.

Definition at line 320 of file LALSimIMRNRSur4d2s.c.

◆ NRSurrogateData_Init()

int NRSurrogateData_Init ( NRSurrogateData *  data,
const char  dir[] 
)
static

Definition at line 552 of file LALSimIMRNRSur4d2s.c.

◆ NRSurrogateData_Cleanup()

static void NRSurrogateData_Cleanup ( NRSurrogateData *  data)
static

Definition at line 695 of file LALSimIMRNRSur4d2s.c.

◆ TP_Spline_interpolation_5d()

static int TP_Spline_interpolation_5d ( REAL8  x0,
REAL8  x1,
REAL8  x2,
REAL8  x3,
REAL8  x4,
int  n_nodes,
int *  nc,
gsl_vector *  cvec_re,
gsl_vector *  cvec_im,
SplineData5d splinedata,
gsl_vector *  nodes_re,
gsl_vector *  nodes_im 
)
static

Definition at line 439 of file LALSimIMRNRSur4d2s.c.

◆ NRSurrogateData_Init_submodel()

static int NRSurrogateData_Init_submodel ( NRSurrogateData_submodel **  submodel,
LALH5File file,
const int  i_mode,
int  n_nodes,
int  n_freqs,
int *  nc 
)
static

Definition at line 503 of file LALSimIMRNRSur4d2s.c.

◆ NRSurrogateData_Cleanup_submodel()

static void NRSurrogateData_Cleanup_submodel ( NRSurrogateData_submodel *  submodel)
static

Definition at line 544 of file LALSimIMRNRSur4d2s.c.

◆ AddModeContribution()

static void AddModeContribution ( double  q,
double  chi1mag,
double  chi1theta,
double  chi1phi,
double  chi2z,
double  spheretheta,
double  spherephi,
int  swsh_L,
int  swsh_m,
int  n_nodes,
int *  nc,
gsl_vector *  h_re,
gsl_vector *  h_im,
NRSurrogateData_submodel *  modeData,
SplineData5d splinedata,
gsl_vector *  nodes_re,
gsl_vector *  nodes_im,
gsl_vector *  mode_re,
gsl_vector *  mode_im 
)
static

Evaluates one mode of the surrogate model and adds it to the waveform Real and imaginary parts used due to lack of gsl_vector_complex_conjugate() function Note that here the output waveform is a single complex function containing positive and negative frequency content, from which we may obtain hplus and hcross.

The output is evaluated at the empirical interpolation output samples. Output frequencies and waveform are dimensionless.

Definition at line 744 of file LALSimIMRNRSur4d2s.c.

◆ NRSurrogateCore()

static int NRSurrogateCore ( COMPLEX16FrequencySeries **  hptilde,
COMPLEX16FrequencySeries **  hctilde,
double  phiRef,
double  distance,
double  inclination,
double  Mtot_sec,
double  q,
double  chi1mag,
double  chi1theta,
double  chi1phi,
double  chi2z,
const REAL8Sequence freqs 
)
static

Core function for computing the ROM waveform.

Interpolate projection coefficient data and evaluate coefficients at desired (q, chi). Construct 1D splines for amplitude and phase. Compute strain waveform from amplitude and phase.

Definition at line 785 of file LALSimIMRNRSur4d2s.c.

◆ SplineData5d_Destroy()

static void SplineData5d_Destroy ( SplineData5d splinedata)
static

Definition at line 425 of file LALSimIMRNRSur4d2s.c.

◆ SplineData5d_Init()

static void SplineData5d_Init ( SplineData5d **  splinedata,
int *  nc,
double *  x1,
double *  x2,
double *  x3,
double *  x4,
double *  x5 
)
static

Definition at line 360 of file LALSimIMRNRSur4d2s.c.

◆ load_data_sub()

static int load_data_sub ( const int  i_mode,
LALH5File file,
gsl_vector *  cvec_re,
gsl_vector *  cvec_im,
gsl_matrix *  EI_re,
gsl_matrix *  EI_im 
)
static

Definition at line 328 of file LALSimIMRNRSur4d2s.c.

◆ Interpolate_Coefficent_Tensor_5d()

static REAL8 Interpolate_Coefficent_Tensor_5d ( gsl_vector *  v,
gsl_vector *  B0,
gsl_vector *  B1,
gsl_vector *  B2,
gsl_vector *  B3,
gsl_vector *  B4,
size_t  is0,
size_t  is1,
size_t  is2,
size_t  is3,
size_t  is4,
int *  nc 
)
static

Definition at line 260 of file LALSimIMRNRSur4d2s.c.

◆ XLALSimNRSur4d2sFrequencySequence()

int XLALSimNRSur4d2sFrequencySequence ( struct tagCOMPLEX16FrequencySeries **  hptilde,
struct tagCOMPLEX16FrequencySeries **  hctilde,
const REAL8Sequence freqs,
REAL8  phiRef,
REAL8  distance,
REAL8  inclination,
REAL8  m1SI,
REAL8  m2SI,
REAL8  S1x,
REAL8  S1y,
REAL8  S1z,
REAL8  S2x,
REAL8  S2y,
REAL8  S2z 
)
Parameters
hptildeOutput: Frequency-domain waveform h+
hctildeOutput: Frequency-domain waveform hx
freqsFrequency points at which to evaluate the waveform (Hz), need to be strictly monotonically increasing
phiRefOrbital phase at reference frequency
distanceDistance of source (m)
inclinationInclination of source (rad)
m1SIMass of companion 1 (kg)
m2SIMass of companion 2 (kg)
S1xx-component of the dimensionless spin of companion 1
S1yy-component of the dimensionless spin of companion 1
S1zz-component of the dimensionless spin of companion 1
S2xx-component of the dimensionless spin of companion 2
S2yy-component of the dimensionless spin of companion 2
S2zz-component of the dimensionless spin of companion 2

Definition at line 940 of file LALSimIMRNRSur4d2s.c.

◆ XLALSimNRSur4d2s()

int XLALSimNRSur4d2s ( struct tagCOMPLEX16FrequencySeries **  hptilde,
struct tagCOMPLEX16FrequencySeries **  hctilde,
REAL8  phiRef,
REAL8  deltaF,
REAL8  fLow,
REAL8  fHigh,
REAL8  distance,
REAL8  inclination,
REAL8  m1SI,
REAL8  m2SI,
REAL8  S1x,
REAL8  S1y,
REAL8  S1z,
REAL8  S2x,
REAL8  S2y,
REAL8  S2z 
)

Compute waveform in LAL format for the NRSur4d2s_FDROM NR surrogate model.

Described in: https://journals.aps.org/prd/abstract/10.1103/PhysRevD.95.104023 https://arxiv.org/abs/1701.00550

Returns the plus and cross polarizations as a complex frequency series with equal spacing deltaF and contains zeros from zero frequency to the starting frequency fLow and zeros beyond the cutoff frequency fHigh to the next power of 2 in the size of the frequency series.

Parameters
hptildeOutput: Frequency-domain waveform h+
hctildeOutput: Frequency-domain waveform hx
phiRefOrbital phase at 4500M before peak amplitude. Note that usually this is TWICE the orb phase.
deltaFSampling frequency (Hz)
fLowStarting GW frequency (Hz)
fHighEnd frequency
distanceDistance of source (m)
inclinationInclination of source (rad)
m1SIMass of companion 1 (kg)
m2SIMass of companion 2 (kg)
S1xSpins are in the source frame, which is different from the alignment frame. See http://software.ligo.org/docs/lalsuite/lalsimulation/group__lalsimulation__inspiral.html In the alignment frame, the larger BH is on the positive x-axis. x-component of chi_1
S1yy-component of the dimensionless spin of companion 1
S1zz-component of the dimensionless spin of companion 1
S2xx-component of the dimensionless spin of companion 2
S2yy-component of the dimensionless spin of companion 2
S2zz-component of the dimensionless spin of companion 2

Definition at line 1020 of file LALSimIMRNRSur4d2s.c.

Variable Documentation

◆ Q_MIN

const double Q_MIN = 1.
static

Definition at line 66 of file LALSimIMRNRSur4d2s.c.

◆ Q_MAX

const double Q_MAX = 2.
static

Definition at line 67 of file LALSimIMRNRSur4d2s.c.

◆ CHI1_MAG_MAX

const double CHI1_MAG_MAX = 0.8
static

Definition at line 68 of file LALSimIMRNRSur4d2s.c.

◆ CHI2_MIN

const double CHI2_MIN = -0.8
static

Definition at line 69 of file LALSimIMRNRSur4d2s.c.

◆ CHI2_MAX

const double CHI2_MAX = 0.8
static

Definition at line 70 of file LALSimIMRNRSur4d2s.c.

◆ NRSUR4D2S_DATAFILE

const char NRSUR4D2S_DATAFILE[] = "NRSur4d2s_FDROM.hdf5"
static

Definition at line 72 of file LALSimIMRNRSur4d2s.c.

◆ __lalsim_NRSurrogate_data

NRSurrogateData __lalsim_NRSurrogate_data
static

Definition at line 127 of file LALSimIMRNRSur4d2s.c.