Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALInference 4.1.9.1-5e288d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
LALInferencePrior.c File Reference

Prototypes

static double qInnerIntegrand (double M2, void *viData)
 
static double etaInnerIntegrand (double M2, void *viData)
 
static double outerIntegrand (double M1, void *voData)
 
static REAL8 REAL8max (REAL8 a, REAL8 b)
 
void LALInferenceInitCBCPrior (LALInferenceRunState *runState)
 Initialize the prior based on command line arguments. More...
 
void LALInferenceInitLIBPrior (LALInferenceRunState *runState)
 Initialize the LIB prior based on command line arguments. More...
 
static REAL8 LALInferenceConstantCalibrationPrior (LALInferenceRunState *runState, LALInferenceVariables *params)
 
UINT4 LALInferenceCubeToConstantCalibrationPrior (LALInferenceRunState *runState, LALInferenceVariables *params, INT4 *idx, double *Cube, void UNUSED *context)
 
REAL8 logGlitchAmplitudeDensity (REAL8 A, REAL8 Q, REAL8 f)
 Return the log Prior for the glitch amplitude. More...
 
static REAL8 LALInferenceGlitchPrior (LALInferenceRunState *runState, LALInferenceVariables *params)
 
static REAL8 LALInferencePSDPrior (LALInferenceRunState *runState, LALInferenceVariables *params)
 
REAL8 LALInferenceInspiralPrior (LALInferenceRunState *runState, LALInferenceVariables *params, LALInferenceModel *model)
 Return the logarithmic prior density of the variables specified, for the non-spinning/spinning inspiral signal case. More...
 
UINT4 LALInferenceInspiralCubeToPrior (LALInferenceRunState *runState, LALInferenceVariables *params, LALInferenceModel *model, double *Cube, void *context)
 Convert the hypercube parameter to physical parameters, for the non-spinning/spinning inspiral signal case. More...
 
void LALInferenceCyclicReflectiveBound (LALInferenceVariables *parameter, LALInferenceVariables *priorArgs)
 Apply cyclic and reflective boundaries to parameter to bring it back within the allowed prior ranges that are specified in priorArgs. More...
 
void LALInferenceRotateInitialPhase (LALInferenceVariables *parameter)
 Rotate initial phase if polarisation angle is cyclic around ranges. More...
 
REAL8 LALInferenceInspiralSkyLocPrior (LALInferenceRunState *runState, LALInferenceVariables *params, UNUSED LALInferenceModel *model)
 
UINT4 LALInferenceInspiralSkyLocCubeToPrior (LALInferenceRunState *runState, LALInferenceVariables *params, UNUSED LALInferenceModel *model, double *Cube, void *context)
 
REAL8 LALInferenceComputePriorMassNorm (const double MMin, const double MMax, const double MTotMax, const double McMin, const double McMax, const double massRatioMin, const double massRatioMax, const char *massRatioName)
 Computes the numerical normalization of the mass prior \(p(\mathcal{M}) \sim \mathcal{M}^{-11/6}\) applying all cuts in the mass plane implied by the various component, total, and chirp mass limits, and the mass ratio limits. More...
 
void LALInferenceAddMinMaxPrior (LALInferenceVariables *priorArgs, const char *name, REAL8 *min, REAL8 *max, LALInferenceVariableType type)
 Function to add the minimum and maximum values for the uniform prior onto the priorArgs. More...
 
void LALInferenceRemoveMinMaxPrior (LALInferenceVariables *priorArgs, const char *name)
 Function to remove the minimum and maximum values for the uniform prior onto the priorArgs. More...
 
int LALInferenceCheckMinMaxPrior (LALInferenceVariables *priorArgs, const char *name)
 Check for types of standard prior. More...
 
void LALInferenceGetMinMaxPrior (LALInferenceVariables *priorArgs, const char *name, REAL8 *min, REAL8 *max)
 Get the minimum and maximum values of the uniform prior from the priorArgs list, given a name. More...
 
int LALInferenceCheckGaussianPrior (LALInferenceVariables *priorArgs, const char *name)
 Check for a Gaussian prior (with a mean and variance) More...
 
void LALInferenceAddGaussianPrior (LALInferenceVariables *priorArgs, const char *name, REAL8 *mu, REAL8 *sigma, LALInferenceVariableType type)
 Function to add the mu and sigma values for the Gaussian prior onto the priorArgs. More...
 
void LALInferenceRemoveGaussianPrior (LALInferenceVariables *priorArgs, const char *name)
 Function to remove the mu and sigma values for the Gaussian prior onto the priorArgs. More...
 
void LALInferenceGetGaussianPrior (LALInferenceVariables *priorArgs, const char *name, REAL8 *mu, REAL8 *sigma)
 Get the mu and sigma values of the Gaussian prior from the priorArgs list, given a name. More...
 
void LALInferenceAddCorrelatedPrior (LALInferenceVariables *priorArgs, const char *name, gsl_matrix **cor, REAL8 *mu, REAL8 *sigma, UINT4 *idx)
 Function to add a correlation matrix and parameter index for a prior defined as part of a multivariate Gaussian distribution onto the priorArgs. More...
 
void LALInferenceGetCorrelatedPrior (LALInferenceVariables *priorArgs, const char *name, gsl_matrix **cor, gsl_matrix **invcor, REAL8 *mu, REAL8 *sigma, UINT4 *idx)
 Get the correlation coefficient matrix and index for a parameter from the priorArgs list. More...
 
void LALInferenceRemoveCorrelatedPrior (LALInferenceVariables *priorArgs)
 Remove the correlation coefficient matrix and index for a parameter from the priorArgs list. More...
 
int LALInferenceCheckCorrelatedPrior (LALInferenceVariables *priorArgs, const char *name)
 Check for the existance of a correlation coefficient matrix and index for a parameter from the priorArgs list. More...
 
void LALInferenceAddGMMPrior (LALInferenceVariables *priorArgs, const char *name, REAL8Vector ***mus, gsl_matrix ***covs, REAL8Vector **weights, REAL8Vector **minrange, REAL8Vector **maxrange)
 Add a Gaussian Mixture Model prior. More...
 
void LALInferenceGetGMMPrior (LALInferenceVariables *priorArgs, const char *name, REAL8Vector ***mus, REAL8Vector ***sigmas, gsl_matrix ***cors, gsl_matrix ***invcors, REAL8Vector **weights, REAL8Vector **minrange, REAL8Vector **maxrange, REAL8Vector **dets, UINT4 *idx, CHAR **fullname)
 Get the parameters defining a Gaussian Mixture Model prior. More...
 
int LALInferenceCheckGMMPrior (LALInferenceVariables *priorArgs, const char *name)
 Check for a Gaussian Mixture Model prior. More...
 
void LALInferenceRemoveGMMPrior (LALInferenceVariables *priorArgs, const char *name)
 Remove a Gaussian Mixture Model prior. More...
 
int LALInferenceCheckFermiDiracPrior (LALInferenceVariables *priorArgs, const char *name)
 Check for a Fermi-Dirac prior (with a r and sigma parameter) More...
 
void LALInferenceAddFermiDiracPrior (LALInferenceVariables *priorArgs, const char *name, REAL8 *sigma, REAL8 *r, LALInferenceVariableType type)
 Add a Fermi-Dirac prior. More...
 
void LALInferenceRemoveFermiDiracPrior (LALInferenceVariables *priorArgs, const char *name)
 Function to remove the r and sigma values for the Fermi-Dirac prior onto the priorArgs. More...
 
void LALInferenceGetFermiDiracPrior (LALInferenceVariables *priorArgs, const char *name, REAL8 *sigma, REAL8 *r)
 Get the r and sigma values of the Fermi-Dirac prior from the priorArgs list, given a name. More...
 
int LALInferenceCheckLogUniformPrior (LALInferenceVariables *priorArgs, const char *name)
 Check for a log-uniform prior (with xmin and xmax parameters) More...
 
void LALInferenceAddLogUniformPrior (LALInferenceVariables *priorArgs, const char *name, REAL8 *xmin, REAL8 *xmax, LALInferenceVariableType type)
 Add a log-uniform prior. More...
 
void LALInferenceRemoveLogUniformPrior (LALInferenceVariables *priorArgs, const char *name)
 Function to remove the min and max values for the log-uniform prior from the priorArgs. More...
 
void LALInferenceGetLogUniformPrior (LALInferenceVariables *priorArgs, const char *name, REAL8 *xmin, REAL8 *xmax)
 Get the xmin and xmax values of the log-uniform prior from the priorArgs list, given a name. More...
 
void LALInferenceDrawFromPrior (LALInferenceVariables *output, LALInferenceVariables *priorArgs, gsl_rng *rdm)
 Draw variables from the prior ranges. More...
 
void LALInferenceDrawNameFromPrior (LALInferenceVariables *output, LALInferenceVariables *priorArgs, char *name, LALInferenceVariableType type, gsl_rng *rdm)
 Draw an individual variable from its prior range. More...
 
UINT4 within_malmquist (LALInferenceRunState *runState, LALInferenceVariables *params, LALInferenceModel *model)
 
REAL8 LALInferenceAnalyticNullPrior (LALInferenceRunState UNUSED *runState, LALInferenceVariables *params, LALInferenceModel UNUSED *model)
 
UINT4 LALInferenceAnalyticCubeToPrior (LALInferenceRunState *runState, LALInferenceVariables *params, UNUSED LALInferenceModel *model, double *Cube, void *context)
 
REAL8 LALInferenceFlatBoundedPrior (LALInferenceRunState *runState, LALInferenceVariables *params)
 Prior that checks for minimum and maximum prior range specified in runState->priorArgs and returns 0.0 if sample lies inside the boundaries, -DBL_MAX otherwise. More...
 
REAL8 LALInferenceNullPrior (LALInferenceRunState UNUSED *runState, LALInferenceVariables UNUSED *params, LALInferenceModel UNUSED *model)
 
UINT4 LALInferenceCubeToPSDScaleParams (LALInferenceVariables *priorParams, LALInferenceVariables *params, INT4 *idx, double *Cube, void UNUSED *context)
 
REAL8 LALInferenceSineGaussianPrior (LALInferenceRunState *runState, LALInferenceVariables *params, LALInferenceModel *model)
 
REAL8 LALInferenceCubeToFlatPrior (double r, double x1, double x2)
 Prior that converts from a Cube parameter in [0,1] to the flat prior bounded by x1 and x2. More...
 
REAL8 LALInferenceCubeToLogFlatPrior (double r, double x1, double x2)
 Prior that converts from a Cube parameter in [0,1] to the flat in log prior bounded by x1 and x2. More...
 
REAL8 LALInferenceCubeToPowerPrior (double p, double r, double x1, double x2)
 Prior that converts from a Cube parameter in [0,1] to the power prior bounded by x1 and x2 with power p. More...
 
REAL8 LALInferenceCubeToGaussianPrior (double r, double mean, double sigma)
 Prior that converts from a Cube parameter in [0,1] to the Gaussian prior with given mean and standard deviation. More...
 
REAL8 LALInferenceCubeToSinPrior (double r, double x1, double x2)
 Prior that converts from a Cube parameter in [0,1] to the sine prior with given min (x1) and max (x2) values. More...
 
REAL8 LALInferenceFermiDiracPrior (LALInferenceVariables *priorArgs, const char *name, REAL8 value)
 Return the Fermi-Dirac distribution log prior. More...
 
REAL8 LALInferenceGMMPrior (LALInferenceVariables *priorArgs, const char *name, REAL8 value)
 Calculate the log probability for the Gaussian Mixture Model prior. More...
 
REAL8 LALInferenceLogUniformPrior (LALInferenceVariables *priorArgs, const char *name, REAL8 value)
 

Go to the source code of this file.

Data Structures

struct  innerData
 
struct  outerData
 

Macros

#define LALINFERENCE_PRIOR_SQR(x)   ((x)*(x))
 
#define LALINFERENCE_PRIOR_MIN(x, y)   ((x) < (y) ? (x) : (y))
 

Macro Definition Documentation

◆ LALINFERENCE_PRIOR_SQR

#define LALINFERENCE_PRIOR_SQR (   x)    ((x)*(x))

Definition at line 1824 of file LALInferencePrior.c.

◆ LALINFERENCE_PRIOR_MIN

#define LALINFERENCE_PRIOR_MIN (   x,
  y 
)    ((x) < (y) ? (x) : (y))

Definition at line 1853 of file LALInferencePrior.c.

Function Documentation

◆ qInnerIntegrand()

static double qInnerIntegrand ( double  M2,
void *  viData 
)
static

Definition at line 1813 of file LALInferencePrior.c.

◆ etaInnerIntegrand()

static double etaInnerIntegrand ( double  M2,
void *  viData 
)
static

Definition at line 1826 of file LALInferencePrior.c.

◆ outerIntegrand()

static double outerIntegrand ( double  M1,
void *  voData 
)
static

Definition at line 1855 of file LALInferencePrior.c.

◆ REAL8max()

static REAL8 REAL8max ( REAL8  a,
REAL8  b 
)
static

Definition at line 47 of file LALInferencePrior.c.

◆ LALInferenceConstantCalibrationPrior()

static REAL8 LALInferenceConstantCalibrationPrior ( LALInferenceRunState runState,
LALInferenceVariables params 
)
static

Definition at line 201 of file LALInferencePrior.c.

◆ LALInferenceCubeToConstantCalibrationPrior()

UINT4 LALInferenceCubeToConstantCalibrationPrior ( LALInferenceRunState runState,
LALInferenceVariables params,
INT4 idx,
double *  Cube,
void UNUSED *  context 
)

Definition at line 250 of file LALInferencePrior.c.

◆ LALInferenceGlitchPrior()

static REAL8 LALInferenceGlitchPrior ( LALInferenceRunState runState,
LALInferenceVariables params 
)
static

Definition at line 319 of file LALInferencePrior.c.

◆ LALInferencePSDPrior()

static REAL8 LALInferencePSDPrior ( LALInferenceRunState runState,
LALInferenceVariables params 
)
static

Definition at line 391 of file LALInferencePrior.c.

◆ LALInferenceInspiralSkyLocPrior()

REAL8 LALInferenceInspiralSkyLocPrior ( LALInferenceRunState runState,
LALInferenceVariables params,
UNUSED LALInferenceModel model 
)

Definition at line 1247 of file LALInferencePrior.c.

◆ LALInferenceInspiralSkyLocCubeToPrior()

UINT4 LALInferenceInspiralSkyLocCubeToPrior ( LALInferenceRunState runState,
LALInferenceVariables params,
UNUSED LALInferenceModel model,
double *  Cube,
void *  context 
)

Definition at line 1408 of file LALInferencePrior.c.

◆ LALInferenceAnalyticNullPrior()

REAL8 LALInferenceAnalyticNullPrior ( LALInferenceRunState UNUSED *  runState,
LALInferenceVariables params,
LALInferenceModel UNUSED *  model 
)

Definition at line 2985 of file LALInferencePrior.c.

◆ LALInferenceAnalyticCubeToPrior()

UINT4 LALInferenceAnalyticCubeToPrior ( LALInferenceRunState runState,
LALInferenceVariables params,
UNUSED LALInferenceModel model,
double *  Cube,
void *  context 
)

Definition at line 3020 of file LALInferencePrior.c.

◆ LALInferenceNullPrior()

REAL8 LALInferenceNullPrior ( LALInferenceRunState UNUSED *  runState,
LALInferenceVariables UNUSED *  params,
LALInferenceModel UNUSED *  model 
)

Definition at line 3236 of file LALInferencePrior.c.

◆ LALInferenceCubeToPSDScaleParams()

UINT4 LALInferenceCubeToPSDScaleParams ( LALInferenceVariables priorParams,
LALInferenceVariables params,
INT4 idx,
double *  Cube,
void UNUSED *  context 
)

Definition at line 3240 of file LALInferencePrior.c.