Amplitude Marginaliser
|
#include "ampmarginaliser.h"
Functions | |
float | marginalise_amplitudes_f (int Nmodels, float **modelModel, float *dataModel, float sigma, unsigned int lastHalfRange) |
The same as marginalise_amplitudes() , but for float inputs rather than double . | |
double | marginalise_amplitudes_except_final (int Nmodels, double **modelModel, double *dataModel, double sigma) |
Marginalise over all amplitudes except for the final model component. | |
float | marginalise_amplitudes_except_final_f (int Nmodels, float **modelModel, float *dataModel, float sigma) |
The same as marginalise_amplitudes_except_final() , but for float inputs rather than double . | |
double | marginalise_amplitudes_linear (int Nmodels, double modelModel[], double dataModel[], double sigma, unsigned int lastHalfRange) |
The same as marginalise_amplitudes() , but with the modelModel array made into a 1D vector rather than a 2D array. | |
double | marginalise_amplitudes_except_final_linear (int Nmodels, double modelModel[], double dataModel[], double sigma) |
The same as marginalise_amplitudes_except_final() , but with the modelModel array made into a 1D vector rather than a 2D array. | |
double | marginalise_three_amplitudes (double **modelModel, double *dataModel, double sigma, unsigned int lastHalfRange) |
Performs the likelihood ratio marginalisation explicitly written out for the model amplitude components. | |
float | marginalise_three_amplitudes_f (float **modelModel, float *dataModel, float sigma, unsigned int lastHalfRange) |
The same as marginalise_three_amplitudes() , but for float inputs rather than double . | |
double | marginalise_three_amplitudes_exclude_final (double **modelModel, double *dataModel, double sigma) |
Explicitly marginalise over the first three model component amplitudes, but not the final one. |
double marginalise_amplitudes_except_final | ( | int | Nmodels, |
double ** | modelModel, | ||
double * | dataModel, | ||
double | sigma | ||
) |
Marginalise over all amplitudes except for the final model component.
This function allows for a model that contains components for which the amplitudes are required to be marginalisation over, and also a component (which could contain multiple components defined by various parameters itself) for which no marginalisation is required. It follows the same route as for marginalise_amplitudes()
, but stops before the final marginalisation.
All the amplitude marginalisations are performed over the range.
double marginalise_three_amplitudes | ( | double ** | modelModel, |
double * | dataModel, | ||
double | sigma, | ||
unsigned int | lastHalfRange | ||
) |
Performs the likelihood ratio marginalisation explicitly written out for the model amplitude components.
For three amplitudes the marginalised likelihood ratio is given by:
for an integral between for all amplitudes, and
for the final integral being between . In these equations we have used the following substitutions:
,
,
,
,
,
,
, and
where
is the data and
,
and
are the three model components for which the amplitudes have been marginalised over.
This function explicitly writes out the marginalised likelihood ratio for a model consisting of three components with the amplitudes marginalised over. This can be used to test the correctness of the marginalise_amplitudes()
function.
double marginalise_three_amplitudes_exclude_final | ( | double ** | modelModel, |
double * | dataModel, | ||
double | sigma | ||
) |
Explicitly marginalise over the first three model component amplitudes, but not the final one.
This function uses the fully expanded integral over the amplitudes of first three components of a signal model, whilst not integrating over the final fourth component's amplitude. All the amplitude marginalisations are performed over the range. This can be used to test the correctness of the
marginalise_amplitudes_except_final()
function.