Header file for likelihood functions used by LALInference codes.
LALInferenceLikelihood contains all the necessary routines to compute the likelihood from a template (computed with LALInferenceTemplate) and the data (initialised with LALInferenceReadData).
Likelihood functions follow the basic naming convention: LALInference<type_of>LogLikelihood()
Takes as input:
Outputs as a REAL8 the natural logarithm value of the likelihood, as defined by:
\[ Likelihood(\vec{x}|\vec{\lambda},M)=\exp(-\tfrac{1}{2}<\vec{x}-\vec{h_M}(\vec{\lambda})|\vec{x}-\vec{h_M}(\vec{\lambda})>) \]
where: \(<x|y>=4Re\left ( \int \frac{\tilde{x}\,\tilde{y}^*}{S_f}\, df \right )\)
Note that the likelihood is reported unnormalised.
REAL8 LALInferenceUndecomposedFreqDomainLogLikelihood | ( | LALInferenceVariables * | currentParams, |
LALInferenceIFOData * | data, | ||
LALInferenceModel * | model | ||
) |
(log-) likelihood function.
Returns the non-normalised logarithmic likelihood.
Required (‘currentParams’) parameters are:
Definition at line 313 of file LALInferenceLikelihood.c.
REAL8 LALInferenceZeroLogLikelihood | ( | LALInferenceVariables * | currentParams, |
LALInferenceIFOData * | data, | ||
LALInferenceModel * | model | ||
) |
For testing purposes (for instance sampling the prior), likelihood that returns 0.0 = log(1) every time.
Activated with the –zeroLogLike command flag.
REAL8 LALInferenceComputeFrequencyDomainOverlap | ( | LALInferenceIFOData * | data, |
COMPLEX16Vector * | freqData1, | ||
COMPLEX16Vector * | freqData2 | ||
) |
Computes the <x|y> overlap in the Fourier domain.
Definition at line 1490 of file LALInferenceLikelihood.c.
COMPLEX16 LALInferenceComputeFrequencyDomainComplexOverlap | ( | LALInferenceIFOData * | dataPtr, |
COMPLEX16Vector * | freqData1, | ||
COMPLEX16Vector * | freqData2 | ||
) |
Computes the complex <x|y> overlap.
Definition at line 1517 of file LALInferenceLikelihood.c.
REAL8 LALInferenceNullLogLikelihood | ( | LALInferenceIFOData * | data | ) |
Identical to LALInferenceFreqDomainNullLogLikelihood, but returns the likelihood of a null template.
Used for normalising.
Definition at line 1543 of file LALInferenceLikelihood.c.
REAL8 LALInferenceFreqDomainStudentTLogLikelihood | ( | LALInferenceVariables * | currentParams, |
LALInferenceIFOData * | data, | ||
LALInferenceModel * | model | ||
) |
Student-t (log-) likelihood function
as described in Roever/Meyer/Christensen (2011):
"Modelling coloured residual noise
in gravitational-wave signal processing.
"
Classical and Quantum Gravity, 28(1):015010.
http://dx.doi.org/10.1088/0264-9381/28/1/015010
http://arxiv.org/abs/0804.3853
Returns the non-normalised logarithmic likelihood.
Required (‘currentParams’) parameters are:
This function is essentially the same as the
"UndecomposedFreqDomainLogLikelihood()" function.
The additional parameter to be supplied is the (REAL8)
degrees-of-freedom parameter (nu) for each Ifo.
The additional "df" argument gives the corresponding
d.f. parameter for each element of the "*data" list.
The names of "df" must match the "->name" slot of
the elements of "data".
(TODO: allow for d.f. parameter to vary with frequency,
i.e., to be a set of vectors corresponding to
frequencies)
Definition at line 1480 of file LALInferenceLikelihood.c.
REAL8 LALInferenceCorrelatedAnalyticLogLikelihood | ( | LALInferenceVariables * | currentParams, |
LALInferenceIFOData * | data, | ||
LALInferenceModel * | model | ||
) |
An analytic likeilhood that is a correlated Gaussian in 15 dimensions.
Definition at line 203 of file LALInferenceAnalyticLikelihood.c.
REAL8 LALInferenceBimodalCorrelatedAnalyticLogLikelihood | ( | LALInferenceVariables * | currentParams, |
LALInferenceIFOData * | data, | ||
LALInferenceModel * | model | ||
) |
An analytic likeilhood that is two correlated Gaussians in 15 dimensions.
Definition at line 268 of file LALInferenceAnalyticLikelihood.c.
REAL8 LALInferenceRosenbrockLogLikelihood | ( | LALInferenceVariables * | currentParams, |
LALInferenceIFOData * | data, | ||
LALInferenceModel * | model | ||
) |
15-D Rosenbrock log(L) function (see Eq (3) of http://en.wikipedia.org/wiki/Rosenbrock_function .
Definition at line 349 of file LALInferenceAnalyticLikelihood.c.
REAL8 LALInferenceMarginalisedPhaseLogLikelihood | ( | LALInferenceVariables * | currentParams, |
LALInferenceIFOData * | data, | ||
LALInferenceModel * | model | ||
) |
Definition at line 1561 of file LALInferenceLikelihood.c.
REAL8 LALInferenceMarginalisedTimePhaseLogLikelihood | ( | LALInferenceVariables * | currentParams, |
LALInferenceIFOData * | data, | ||
LALInferenceModel * | model | ||
) |
Definition at line 1643 of file LALInferenceLikelihood.c.
double LALInferenceMarginalDistanceLogLikelihood | ( | double | dist_min, |
double | dist_max, | ||
double | OptimalSNR, | ||
double | d_inner_h, | ||
int | cosmology, | ||
int | margphi | ||
) |
Compute delta-log-likelihood for given distance min, max and OptimalSNR and d_inner_h when evaluated at 1Mpc cosmology: 0 = Euclidean distance prior , 1 = uniform in comoving volume margphi: 0 = use gaussian likelihood, 1 = phase-marginalised bessel likelihood.
Definition at line 1408 of file LALInferenceLikelihood.c.
REAL8 LALInferenceMarginalisedTimeLogLikelihood | ( | LALInferenceVariables * | currentParams, |
LALInferenceIFOData * | data, | ||
LALInferenceModel * | model | ||
) |
Returns the log-likelihood marginalised over the time dimension from the prior min to the prior max.
See https://dcc.ligo.org/LIGO-T1400460 for the details.
Definition at line 1633 of file LALInferenceLikelihood.c.
void LALInferenceInitLikelihood | ( | LALInferenceRunState * | runState | ) |
Initialisation function which reads runState->commaneLine and sets up the likelihood function accordingly.
Can choose between Gaussian, Student-t, marginalised phase likelihoods
Definition at line 102 of file LALInferenceLikelihood.c.
LALInferenceVariables LALInferenceGetInstrinsicParams | ( | LALInferenceVariables * | currentParams | ) |
Get the intrinsic parameters from currentParams.
Definition at line 236 of file LALInferenceLikelihood.c.
REAL8 LALInferenceFastSineGaussianLogLikelihood | ( | LALInferenceVariables * | currentParams, |
LALInferenceIFOData * | data, | ||
LALInferenceModel * | model | ||
) |
fast SineGaussian likelihood for LIB
Definition at line 1653 of file LALInferenceLikelihood.c.
void LALInferenceNetworkSNR | ( | LALInferenceVariables * | currentParams, |
LALInferenceIFOData * | data, | ||
LALInferenceModel * | model | ||
) |
Calculate the SNR across the network.
Definition at line 1866 of file LALInferenceLikelihood.c.