Header file for the signal models functions used in parameter estimation code for known pulsar searches using the nested sampling algorithm. More...
Prototypes | |
void | get_pulsar_model (LALInferenceModel *model) |
Defines the pulsar model/template to use. More... | |
void | add_pulsar_parameter (LALInferenceVariables *var, PulsarParameters *params, const CHAR *parname) |
Add a REAL8 parameter from a LALInferenceVariable into a PulsarParameters variable. More... | |
void | add_variable_parameter (PulsarParameters *params, LALInferenceVariables *var, const CHAR *parname, LALInferenceParamVaryType vary) |
Add a REAL8 parameter from a PulsarParameters variable into a LALInferenceVariable . More... | |
void | pulsar_model (PulsarParameters *params, LALInferenceIFOModel *ifo) |
Generate the model of the neutron star signal. More... | |
void | set_nonGR_model_parameters (PulsarParameters *pars, char *nonGRmodel) |
Set amplitude parameters for specific non-GR models. More... | |
REAL8Vector * | get_phase_model (PulsarParameters *params, LALInferenceIFOModel *ifo, REAL8 freqFactor) |
The phase evolution of a source. More... | |
REAL8Vector * | get_ssb_delay (PulsarParameters *pars, LIGOTimeGPSVector *datatimes, EphemerisData *ephem, TimeCorrectionData *tdat, TimeCorrectionType ttype, LALDetector *detector) |
Computes the delay between a GPS time at Earth and the solar system barycentre. More... | |
REAL8Vector * | get_bsb_delay (PulsarParameters *pars, LIGOTimeGPSVector *datatimes, REAL8Vector *dts, EphemerisData *ephem) |
Computes the delay between a pulsar in a binary system and the barycentre of the system. More... | |
REAL8Vector * | get_glitch_phase (PulsarParameters *pars, LIGOTimeGPSVector *datatimes, REAL8Vector *dts, REAL8Vector *bdts) |
Computes the phase from the glitch model. More... | |
void | get_amplitude_model (PulsarParameters *pars, LALInferenceIFOModel *ifo) |
The amplitude model of a complex heterodyned signal from the \( l=2, m=1,2 \) harmonics of a rotating neutron star. More... | |
REAL8 | get_phase_mismatch (REAL8Vector *phi1, REAL8Vector *phi2, LIGOTimeGPSVector *ts) |
Calculate the phase mismatch between two vectors of phases. More... | |
void | get_earth_pos_vel (EarthState *earth, EphemerisData *ephem, LIGOTimeGPS *t) |
Get the position and velocity of the Earth at a given time. More... | |
void | response_lookup_table (REAL8 t0, LALDetAndSource detNSource, INT4 timeSteps, REAL8 avedt, REAL8Vector *a1, REAL8Vector *b1, REAL8Vector *a2, REAL8Vector *b2, REAL8Vector *a3, REAL8Vector *b3) |
Creates a lookup table of the detector antenna pattern. More... | |
void | invert_source_params (PulsarParameters *params) |
Convert sources parameters into amplitude and phase notation parameters. More... | |
Header file for the signal models functions used in parameter estimation code for known pulsar searches using the nested sampling algorithm.
Definition in file ppe_models.h.
Go to the source code of this file.
Data Structures | |
struct | IFOModelExtraData |
Macros | |
#define | IFO_XTRA_DATA(ifo) ( (IFOModelExtraData*) ( ifo )->extraData ) |
#define IFO_XTRA_DATA | ( | ifo | ) | ( (IFOModelExtraData*) ( ifo )->extraData ) |
Definition at line 35 of file ppe_models.h.
void get_pulsar_model | ( | LALInferenceModel * | model | ) |
Defines the pulsar model/template to use.
This function is the wrapper for functions defining the pulsar model template to be used in the analysis. It places them into a PulsarParameters
structure.
Note: Any additional models should be added into this function.
model | [in] The model structure hold model information and current parameter info |
Definition at line 52 of file ppe_models.c.
void add_pulsar_parameter | ( | LALInferenceVariables * | var, |
PulsarParameters * | params, | ||
const CHAR * | parname | ||
) |
Add a REAL8
parameter from a LALInferenceVariable
into a PulsarParameters
variable.
var | [in] LALInferenceVariable structure |
params | [in] PulsarParameters structure |
parname | [in] name of the parameter |
Definition at line 359 of file ppe_models.c.
void add_variable_parameter | ( | PulsarParameters * | params, |
LALInferenceVariables * | var, | ||
const CHAR * | parname, | ||
LALInferenceParamVaryType | vary | ||
) |
Add a REAL8
parameter from a PulsarParameters
variable into a LALInferenceVariable
.
This function will rescale a parameter to its true value using the scale factor and minimum scale value.
params | [in] PulsarParameters structure |
var | [in] LALInferenceVariable structure |
parname | [in] name of the parameter |
vary | [in] the parameter LALInferenceParamVaryType |
Definition at line 376 of file ppe_models.c.
void pulsar_model | ( | PulsarParameters * | params, |
LALInferenceIFOModel * | ifo | ||
) |
Generate the model of the neutron star signal.
The function requires that the pulsar model is set using the model-type
command line argument (this is set in main
, and if not specified defaults to a triaxial
model). Currently the model can be triaxial
for quadrupole emission from a triaxial star at twice the rotation freqeuncy, or pinsf
for a two component emission model with emission at the rotation frequency and twice the rotation frequency. Depending on the specified model the function calls the appropriate model function.
Firstly the time varying amplitude of the signal will be calculated based on the antenna pattern and amplitude parameters. Then, if searching over phase parameters, the phase evolution of the signal will be calculated. The difference between the new phase model, \( \phi(t)_n \) , and that used to heterodyne the data, \( \phi(t)_h \) , will be calculated and the complex signal model, \( M \) , modified accordingly:
\[ M'(t) = M(t)\exp{i((\phi(t)_n - \phi(t)_h))}. \]
This does not try to undo the signal modulation in the data, but instead replicates the modulation in the model, hence the positive phase difference rather than a negative phase in the exponential function.
params | [in] A PulsarParameters structure containing the model parameters |
ifo | [in] The ifo model structure containing the detector paramters and buffers |
Definition at line 408 of file ppe_models.c.
void set_nonGR_model_parameters | ( | PulsarParameters * | pars, |
char * | nonGRmodel | ||
) |
Set amplitude parameters for specific non-GR models.
Turns physical parameters from a particular nonGR model into the corresponding antenna pattern amplitudes and phases. All nonGR models must be included here.
pars | [in] parameter structure |
nonGRmodel | [in] name of model requested |
GR plus unconstrained non-GR modes With different priors, this can be used to obtain GR+scalar (i.e. scalar-tensor), GR+vector, or GR+scalar+vector. Note: this mode used to be called just "ST".
Definition at line 301 of file ppe_models.c.
REAL8Vector * get_phase_model | ( | PulsarParameters * | params, |
LALInferenceIFOModel * | ifo, | ||
REAL8 | freqFactor | ||
) |
The phase evolution of a source.
This function will calculate the difference in the phase evolution of a source at a particular sky location as observed at Earth compared with that used to heterodyne (or SpectralInterpolate) the data. If the phase evolution is described by a Taylor expansion:
\[ \phi(T) = \sum_{k=1}^n \frac{f^{(k-1)}}{k!} T^k, \]
where \( f^(x) \) is the xth time derivative of the gravitational wave frequency, and \( T \) is the pulsar proper time, then the phase difference is given by
\[ \Delta\phi(t) = \sum_{k=1}^n \left( \frac{\Delta f^{(k-1)}}{k!}(t+\delta t_1)^k + \frac{f^{(k-1)}_2}{k!} \sum_{i=0}^{i<k} \left(\begin{array}{c}k \\ i\end{array}\right) (\Delta t)^{k-i} (t+\delta t_1)^i \right), \]
where \( t \) is the signal arrival time at the detector minus the given pulsar period epoch, \( \delta t_1 \) is the barycentring time delay (from both solar system and binary orbital effects) calculated at the heterodyned values, \( \Delta f^{(x)} = f_2^{(x)}-f1^{(x)} \) is the diffence in frequency (derivative) between the current value ( \( f_2^{(x)} \) ) and the heterodyne value ( \( \f_1^{(x)} \) ), and \( \Delta t = \delta t_2 - \delta t_1 \) is the difference between the barycentring time delay calculated at the current values ( \( \delta t_1 \) ) and the heterodyned values. Frequency time derivatives are currently allowed up to the tenth derivative. The pulsar proper time is calculated by correcting the time of arrival at Earth, \( t \) to the solar system barycentre and if necessary the binary system barycenter, so \( T = t + \delta{}t_{\rm SSB} + \delta{}t_{\rm BSB} \) .
In this function the time delay needed to correct to the solar system barycenter is only calculated if required, i.e., if an update is required due to a change in the sky position. The same is true for the binary system time delay, which is only calculated if it needs updating due to a change in the binary system parameters.
params | [in] A set of pulsar parameters |
ifo | [in] The ifo model structure containing the detector parameters and buffers |
freqFactor | [in] the multiplicative factor on the pulsar frequency for a particular model |
Definition at line 493 of file ppe_models.c.
REAL8Vector * get_ssb_delay | ( | PulsarParameters * | pars, |
LIGOTimeGPSVector * | datatimes, | ||
EphemerisData * | ephem, | ||
TimeCorrectionData * | tdat, | ||
TimeCorrectionType | ttype, | ||
LALDetector * | detector | ||
) |
Computes the delay between a GPS time at Earth and the solar system barycentre.
This function calculate the time delay between a GPS time at a specific location (e.g. a gravitational wave detector) on Earth and the solar system barycentre. The delay consists of three components: the geometric time delay (Roemer delay) \( t_R = \mathbf{r}(t)\hat{n}/c \) (where \( \mathbf{r}(t) \) is the detector's position vector at time \( t \) ), the special relativistic Einstein delay \( t_E \) , and the general relativistic Shapiro delay \( t_S \) .
Rather than computing the time delay at every time stamp passed to the function it is instead (if requested) able to perform linear interpolation to a point within a range given by interptime
.
pars | [in] A set of pulsar parameters |
datatimes | [in] A vector of GPS times at Earth |
ephem | [in] Information on the solar system ephemeris |
detector | [in] Information on the detector position on the Earth |
tdat | UNDOCUMENTED |
ttype | UNDOCUMENTED |
Definition at line 657 of file ppe_models.c.
REAL8Vector * get_bsb_delay | ( | PulsarParameters * | pars, |
LIGOTimeGPSVector * | datatimes, | ||
REAL8Vector * | dts, | ||
EphemerisData * | edat | ||
) |
Computes the delay between a pulsar in a binary system and the barycentre of the system.
This function uses XLALBinaryPulsarDeltaT
to calculate the time delay between for a pulsar in a binary system between the time at the pulsar and the time at the barycentre of the system. This includes Roemer delays and relativistic delays. The orbit may be described by different models and can be purely Keplarian or include various relativistic corrections.
pars | [in] A set of pulsar parameters |
datatimes | [in] A vector of GPS times |
dts | [in] A vector of solar system barycentre time delays |
edat | UNDOCUMENTED |
Definition at line 762 of file ppe_models.c.
REAL8Vector * get_glitch_phase | ( | PulsarParameters * | pars, |
LIGOTimeGPSVector * | datatimes, | ||
REAL8Vector * | dts, | ||
REAL8Vector * | bdts | ||
) |
Computes the phase from the glitch model.
pars | [in] A set of pulsar parameters |
datatimes | [in] A vector of GPS times |
dts | [in] A vector of solar system barycentre time delays |
bdts | [in] A vector of binary system barycentre time delays |
Definition at line 798 of file ppe_models.c.
void get_amplitude_model | ( | PulsarParameters * | pars, |
LALInferenceIFOModel * | ifo | ||
) |
The amplitude model of a complex heterodyned signal from the \( l=2, m=1,2 \) harmonics of a rotating neutron star.
This function calculates the complex heterodyned time series model for a rotating neutron star. It will currently calculate the model for emission from the \( l=m=2 \) harmonic (which gives emission at twice the rotation frequency) and/or the \( l=2 \) and \( m=1 \) harmonic (which gives emission at the rotation frequency). See LIGO T1200265-v3. Further harmonics can be added and are defined by the freqFactor
value, which is the multiple of the spin-frequency at which emission is produced.
The antenna pattern functions are contained in a 1D lookup table, so within this function the correct value for the given time is interpolated from this lookup table using linear interpolation..
pars | [in] A set of pulsar parameters |
ifo | [in] The ifo model containing detector-specific parameters |
Definition at line 933 of file ppe_models.c.
REAL8 get_phase_mismatch | ( | REAL8Vector * | phi1, |
REAL8Vector * | phi2, | ||
LIGOTimeGPSVector * | t | ||
) |
Calculate the phase mismatch between two vectors of phases.
The function will calculate phase mismatch between two vectors of phases (with phases given in cycles rather than radians).
The mismatch is calculated as:
\[ M = 1-\frac{1}{T}\int_0^T \cos{2\pi(\phi_1 - \phi_2)} dt. \]
In the function the integral is performed using the trapezium rule.
PARAM phi1 [in] First phase vector PARAM phi2 [in] Second phase vector PARAM t [in] The time stamps of the phase points
Definition at line 1171 of file ppe_models.c.
void get_earth_pos_vel | ( | EarthState * | earth, |
EphemerisData * | edat, | ||
LIGOTimeGPS * | tGPS | ||
) |
Get the position and velocity of the Earth at a given time.
This function will get the position and velocity of the Earth from the ephemeris data at the time t. It will be returned in an EarthState structure. This is based on the start of the XLALBarycenterEarth function.
Definition at line 1215 of file ppe_models.c.
void response_lookup_table | ( | REAL8 | t0, |
LALDetAndSource | detNSource, | ||
INT4 | timeSteps, | ||
REAL8 | avedt, | ||
REAL8Vector * | aT, | ||
REAL8Vector * | bT, | ||
REAL8Vector * | aV, | ||
REAL8Vector * | bV, | ||
REAL8Vector * | aS, | ||
REAL8Vector * | bS | ||
) |
Creates a lookup table of the detector antenna pattern.
This function creates a lookup table of the tensor, vector and scalar antenna patterns for a given detector orientation and source sky position. For the tensor modes these are the functions given by equations 10-13 in [9] , whilst for the vector and scalar modes they are the \( \psi \) independent parts of e.g. equations 5-8 of [17] . We remove the \( \psi \) dependent by setting \( \psi=0 \) .
If avedt
is a value over 60 seconds then the antenna pattern will actually be the mean value from 60 second intervals within that timespan. This accounts for the fact that each data point is actually an averaged value over the given timespan.
t0 | [in] initial GPS time of the data |
detNSource | [in] structure containing the detector and source orientations and locations |
timeSteps | [in] the number of grid bins to use in time |
avedt | [in] average the antenna pattern over this timespan |
aT | [in] a vector into which the a(t) Fplus tensor antenna pattern lookup table will be output |
bT | [in] a vector into which the b(t) Fcross tensor antenna pattern lookup table will be output |
aV | [in] a vector into which the a(t) Fx vector antenna pattern lookup table will be output |
bV | [in] a vector into which the b(t) Fy vector antenna pattern lookup table will be output |
aS | [in] a vector into which the a(t) Fb scalar antenna pattern lookup table will be output |
bS | [in] a vector into which the b(t) Fl scalar antenna pattern lookup table will be output |
Definition at line 1285 of file ppe_models.c.
void invert_source_params | ( | PulsarParameters * | params | ) |
Convert sources parameters into amplitude and phase notation parameters.
Convert the physical source parameters into the amplitude and phase notation given in Eqns 62-65 of [11] .
Note that phi0
is essentially the rotational phase of the pulsar. Also, note that if using \( h_0 \) , and therefore the convention for a signal as defined in [9] , the sign of the waveform model is the opposite of that in [11] , and therefore a sign flip is required in the amplitudes.
Definition at line 1367 of file ppe_models.c.