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.h
Go to the documentation of this file.
1/*
2 *
3 * LALInference: LAL Inference library
4 * LALInferencePrior.h: Collection of common priors
5 *
6 * Copyright (C) 2009 Ilya Mandel, Vivien Raymond, Christian Roever, Marc van der Sluys and John Veitch
7 *
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with with program; see the file COPYING. If not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22 * MA 02110-1301 USA
23 */
24#ifndef LALInferencePrior_h
25#define LALInferencePrior_h
26
27#include <lal/LALInference.h>
28
29#ifdef SWIG // SWIG interface directives
30SWIGLAL(
31 FUNCTION_POINTER(
33 LALInferenceInspiralPriorNormalised,
35 )
36);
37#endif
38
39/**
40 * \defgroup LALInferencePrior_h Header LALInferencePrior.h
41 * \ingroup lalinference_general
42 * \brief Collection of commonly used Prior functions and utilities
43 */
44/** @{ */
45
46#ifdef SWIG /* SWIG interface directives */
47SWIGLAL(INPUT_SCALARS(REAL8*, min, max));
48#endif
49
50/**
51 * Initialize the prior based on command line arguments.
52*/
54
55/**
56 * Initialize the LIB prior based on command line arguments.
57*/
59
60
61/**
62 * Return the log Prior for the glitch amplitude
63*/
65
66/**
67 * Return the logarithmic prior density of the variables specified, for the non-spinning/spinning inspiral signal case.
68 */
70
71/**
72 * Convert the hypercube parameter to physical parameters, for the non-spinning/spinning inspiral signal case.
73 */
75
76/**
77 * Apply cyclic and reflective boundaries to \c parameter to bring it
78 * back within the allowed prior ranges that are specified in \c
79 * priorArgs. LALInferenceCyclicReflectiveBound() should not be
80 * called after any multi-parameter update step in a jump proposal,
81 * as this violates detailed balance.
82 *
83 * \param parameter [in] Pointer to an array of parameters
84 * \param priorArgs [in] Pointer to an array of prior ranges
85 */
87
88/**
89 * \brief Rotate initial phase if polarisation angle is cyclic around ranges
90 *
91 * If the polarisation angle parameter \f$\psi\f$ is cyclic about its upper and
92 * lower ranges of \f$-\pi/4\f$ to \f$\pi/4\f$ then the transformation for
93 * crossing a boundary requires the initial phase parameter \f$\phi_0\f$ to be
94 * rotated through \f$\pi\f$ radians. The function assumes the value of
95 * \f$\psi\f$ has been rescaled to be between 0 and \f$2\pi\f$ - this is a
96 * requirement of the covariance matrix routine \c LALInferenceNScalcCVM
97 * function.
98 *
99 * This is particularly relevant for pulsar analyses.
100 *
101 * \param parameter [in] Pointer to an array of parameters
102 */
104
105/**
106 * Return the logarithmic prior density of the variables as specified for the sky localisation project
107 * (see: https://www.lsc-group.phys.uwm.edu/ligovirgo/cbcnote/SkyLocComparison#priors ),
108 * for the non-spinning/spinning inspiral signal case.
109 */
111
112/**
113 * Convert the hypercube parameter to physical parameters, for the prior density of the variables as
114 * specified for the sky localisation project
115 * (see: https://www.lsc-group.phys.uwm.edu/ligovirgo/cbcnote/SkyLocComparison#priors ),
116 * for the non-spinning/spinning inspiral signal case.
117 */
119
120/**
121 * Function to add the minimum and maximum values for the uniform prior onto the \c priorArgs.
122 */
124
125/**
126 * Get the minimum and maximum values of the uniform prior from the \c priorArgs list, given a name.
127 */
128void LALInferenceGetMinMaxPrior(LALInferenceVariables *priorArgs, const char *name, REAL8 *min, REAL8 *max);
129
130/**
131 * Function to remove the minimum and maximum values for the uniform prior onto the \c priorArgs.
132 */
133void LALInferenceRemoveMinMaxPrior(LALInferenceVariables *priorArgs, const char *name);
134
135
136/**
137 * Function to add the mu and sigma values for the Gaussian prior onto the \c priorArgs.
138 */
140 const char *name, REAL8 *mu, REAL8 *sigma,
142
143/**
144 * Get the mu and sigma values of the Gaussian prior from the \c priorArgs list, given a name.
145 */
147 const char *name, REAL8 *mu, REAL8 *sigma);
148
149
150/**
151 * Function to remove the mu and sigma values for the Gaussian prior onto the \c priorArgs.
152 */
153void LALInferenceRemoveGaussianPrior(LALInferenceVariables *priorArgs, const char *name);
154
155
156/**
157 * \brief Add a Gaussian Mixture Model prior
158 *
159 * Add a Gaussian Mixture Model prior defined by a number of multi-variate Gaussian modes, each with a
160 * specified set of means, standard deviations, covariance matrices and weights (where weights are the
161 * relative probabilities for each mode). The minumum and maximum allowed prior range for each
162 * parameter should also be supplied, although if the array pointers are NULL these ranges will default
163 * to +/-infinity.
164 *
165 * The \c name input should be a colon separated list of all the parameters in the multivariate GMM,
166 * e.g. "H0:COSIOTA". The number of parameters in this list will be checked against the number of
167 * means supplied for each mode, and the shape of the covariances for each mode to make sure that
168 * they are consistent. If just one parameter is supplied (e.g. "H0") then this will just be a
169 * one-dimensional GMM.
170 *
171 * Internally the function will convert the covariance matrices into correlation matrices and inverse
172 * correlation matrices for use later (provided they are positive-definite). This will avoid
173 * dynamic range/numerical precision issue with using covariances of parameters spanning a large range
174 * of values. The standard deviations of each parameter will also be extracted from the covariance
175 * matrices and stored, along with the determinants of the covariance matrices.
176 */
177void LALInferenceAddGMMPrior( LALInferenceVariables *priorArgs, const char *name,
178 REAL8Vector ***mus, gsl_matrix ***covs, REAL8Vector **weights,
179 REAL8Vector **minrange, REAL8Vector **maxrange );
180
181/**
182 * \brief Check for a Gaussian Mixture Model prior
183 *
184 * Check if the single parameter given by \c name has a Gaussian Mixture model prior. If the
185 * parameter was within a multivariate GMM prior then it will be found.
186 */
187int LALInferenceCheckGMMPrior(LALInferenceVariables *priorArgs, const char *name);
188
189/**
190 * Remove a Gaussian Mixture Model prior
191 */
192void LALInferenceRemoveGMMPrior( LALInferenceVariables *priorArgs, const char *name );
193
194/**
195 * \brief Get the parameters defining a Gaussian Mixture Model prior
196 *
197 * For a single parameter given by \c name it will check if that parameter has a GMM prior (even if
198 * it is within a multivariate GMM prior). Arrays of the following values for each GMM mode will be
199 * returned: means of each parameter; standard deviations of each parameter; a correlation matrix;
200 * and inverse correlation matrix; the weight (relative probability) of the mode; and, the determinant
201 * of the covariance matrix. The minimum and maximum ranges for each parameter are returned.
202 * The position (index) of the parameter \c name within a multivariate GMM will is returned. Finally,
203 * the combined name of the prior (i.e. including all parameters) is returned.
204 */
205void LALInferenceGetGMMPrior( LALInferenceVariables *priorArgs, const char *name,
206 REAL8Vector ***mus, REAL8Vector ***sigmas, gsl_matrix ***cors, gsl_matrix ***invcors,
207 REAL8Vector **weights, REAL8Vector **minrange, REAL8Vector **maxrange,
208 REAL8Vector **dets, UINT4 *idx, CHAR **fullname );
209
210/**
211 * \brief Add a log-uniform prior
212 *
213 * Add a prior uniform in the log, i.e. PDF(x)~1/x
214 * \f[p(h|h_{\rm min}, h_{\rm max}, I) = \frac{1/h}{\log{(h_{\rm max}/h_{\rm min})}},\f]
215 * where \f$h_{\rm min}\f$ and \f$h_{\rm max}\f$ limit the domain of the PDF.
216 * The function has no support outside this range.
217 *
218 * This function adds \c xmin and \c xmax values for the Fermi-Dirac prior to the \c priorArgs.
219 */
221 const char *name, REAL8 *xmin, REAL8 *xmax,
223
224/**
225 * Get the xmin and xmax values of the log-uniform prior from the \c priorArgs list, given a name.
226 */
228 const char *name, REAL8 *xmin, REAL8 *xmax);
229
230/**
231 * Function to remove the min and max values for the log-uniform prior from the \c priorArgs.
232 */
233void LALInferenceRemoveLogUniformPrior(LALInferenceVariables *priorArgs, const char *name);
234
235/**
236 * \brief Add a Fermi-Dirac prior
237 *
238 * Add a prior defined by the Fermi-Dirac PDF
239 * \f[p(h|\sigma, r, I) = \frac{1}{\sigma\log{\left(1+e^{r} \right)}}\left(e^{((h/\sigma) - r)} + 1\right)^{-1},\f]
240 * where \f$r = \mu/\sigma\f$ to give a more familiar form of the function.
241 *
242 * This function adds \c sigma and \c r values for the Fermi-Dirac prior onto the \c priorArgs.
243 */
245 const char *name, REAL8 *sigma, REAL8 *r,
247
248/**
249 * Get the r and sigma values of the Fermi-Dirac prior from the \c priorArgs list, given a name.
250 */
252 const char *name, REAL8 *sigma, REAL8 *r);
253
254
255/**
256 * Function to remove the r and sigma values for the Fermi-Dirac prior onto the \c priorArgs.
257 */
258void LALInferenceRemoveFermiDiracPrior(LALInferenceVariables *priorArgs, const char *name);
259
260/** Check for types of standard prior */
261/** Check for a uniform prior (with minimum and maximum) */
262int LALInferenceCheckMinMaxPrior(LALInferenceVariables *priorArgs, const char *name);
263/** Check for a Gaussian prior (with a mean and variance) */
264int LALInferenceCheckGaussianPrior(LALInferenceVariables *priorArgs, const char *name);
265/** Check for a log-uniform prior (with xmin and xmax parameters) */
266int LALInferenceCheckLogUniformPrior(LALInferenceVariables *priorArgs, const char *name);
267/** Check for a Fermi-Dirac prior (with a r and sigma parameter) */
268int LALInferenceCheckFermiDiracPrior(LALInferenceVariables *priorArgs, const char *name);
269
270
271/**
272 * Function to add a correlation matrix and parameter index for a prior
273 * defined as part of a multivariate Gaussian distribution onto the \c
274 * priorArgs. The correlation coefficient matrix must be a gsl_matrix and the
275 * index for the given parameter in the matrix must be supplied. The mean
276 * and standard deviation the named parameter must also be supplied.
277 */
279 const char *name, gsl_matrix **cor,
280 REAL8 *mu, REAL8 *sigma, UINT4 *idx );
281
282/**
283 * Get the correlation coefficient matrix and index for a parameter from the
284 * \c priorArgs list.
285 */
287 const char *name, gsl_matrix **cor, gsl_matrix **invcor,
288 REAL8 *mu, REAL8 *sigma, UINT4 *idx );
289
290/**
291 * Remove the correlation coefficient matrix and index for a parameter from the
292 * \c priorArgs list.
293 */
295
296/**
297 * Check for the existance of a correlation coefficient matrix and index for
298 * a parameter from the \c priorArgs list.
299 */
301 const char *name );
302
303/** Draw variables from the prior ranges */
305 LALInferenceVariables *priorArgs,
306 gsl_rng *rdm );
307
308/** Draw an individual variable from its prior range */
310 LALInferenceVariables *priorArgs,
311 char *name, LALInferenceVariableType type,
312 gsl_rng *rdm );
313
314/* Switch reads true if parameters lie within Malmquist prior */
316
317/** Prior that is 1 everywhere in component mass space. */
319
320/** Analytic null prior converted from hypercube */
322
323/** Prior that is 1 everywhere. */
325
326/**
327 * Computes the numerical normalization of the mass prior \f$p(\mathcal{M}) \sim
328 * \mathcal{M}^{-11/6}\f$ applying all cuts in the mass plane implied by the
329 * various component, total, and chirp mass limits, and the mass
330 * ratio limits. Returns the integral of \f$\mathcal{M}^{-11/6}\f$ over the allowed
331 * ranges in mass.
332 */
333REAL8 LALInferenceComputePriorMassNorm(const double MMin, const double MMax, const double MTotMax,
334 const double McMin, const double McMax,
335 const double massRatioMin, const double massRatioMax, const char *massRatioName);
336
337/**
338 * Prior that checks for minimum and maximum prior range specified in runState->priorArgs
339 * and returns 0.0 if sample lies inside the boundaries, -DBL_MAX otherwise.
340 * Can be used with MinMaxPrior functions.
341 * Ignores variables which are not REAL8 or do not have min and max values set.
342 */
344
345/**
346 * Utility CubeToPrior functions for psd-fit and both calibration models
347 */
350
351/**
352 * Prior that converts from a Cube parameter in [0,1] to the flat prior bounded by x1 and x2.
353 */
354REAL8 LALInferenceCubeToFlatPrior(double r, double x1, double x2);
355
356/**
357 * Prior that converts from a Cube parameter in [0,1] to the flat in log prior bounded by x1 and x2.
358 */
359REAL8 LALInferenceCubeToLogFlatPrior(double r, double x1, double x2);
360
361/**
362 * Prior that converts from a Cube parameter in [0,1] to the power prior bounded by x1 and x2 with power p.
363 */
364REAL8 LALInferenceCubeToPowerPrior(double p, double r, double x1, double x2);
365
366/**
367 * Prior that converts from a Cube parameter in [0,1] to the Gaussian prior with given mean and standard deviation.
368 */
369REAL8 LALInferenceCubeToGaussianPrior(double r, double mean, double sigma);
370
371/**
372 * Prior that converts from a Cube parameter in [0,1] to the sine prior with given
373 * min (x1) and max (x2) values
374 */
375REAL8 LALInferenceCubeToSinPrior(double r, double x1, double x2);
376
377/* Simple burst prior (only checks for dec and (log)hrss*/
379
380/* return the log of the Fermi-Dirac prior */
381REAL8 LALInferenceFermiDiracPrior(LALInferenceVariables *priorArgs, const char *name, REAL8 value);
382
383/**
384 * \brief Calculate the log probability for the Gaussian Mixture Model prior
385 */
386REAL8 LALInferenceGMMPrior(LALInferenceVariables *priorArgs, const char *name, REAL8 value);
387
388/* Return the log Prior for a parameter that has a prior that is uniform in log space */
389REAL8 LALInferenceLogUniformPrior( LALInferenceVariables *priorArgs, const char *name, REAL8 value );
390
391/** @} */
392
393#endif
static REAL8 mean(REAL8 *array, int N)
#define max(a, b)
double REAL8
char CHAR
uint32_t UINT4
int32_t INT4
LALInferenceVariableType
An enumerated type for denoting the type of a variable.
Definition: LALInference.h:104
void LALInferenceRemoveCorrelatedPrior(LALInferenceVariables *priorArgs)
Remove the correlation coefficient matrix and index for a parameter from the priorArgs list.
UINT4 LALInferenceAnalyticCubeToPrior(LALInferenceRunState *runState, LALInferenceVariables *params, LALInferenceModel *model, double *Cube, void *context)
Analytic null prior converted from hypercube.
REAL8 LALInferenceGMMPrior(LALInferenceVariables *priorArgs, const char *name, REAL8 value)
Calculate the log probability for the Gaussian Mixture Model prior.
UINT4 LALInferenceCubeToConstantCalibrationPrior(LALInferenceRunState *runState, LALInferenceVariables *params, INT4 *idx, double *Cube, void *context)
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.
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 applying all cuts in the mass plane implied b...
UINT4 LALInferenceCubeToPSDScaleParams(LALInferenceVariables *priorParams, LALInferenceVariables *params, INT4 *idx, double *Cube, void *context)
Utility CubeToPrior functions for psd-fit and both calibration models.
REAL8 LALInferenceInspiralPrior(LALInferenceRunState *runState, LALInferenceVariables *params, LALInferenceModel *model)
Return the logarithmic prior density of the variables specified, for the non-spinning/spinning inspir...
REAL8 LALInferenceFlatBoundedPrior(LALInferenceRunState *runState, LALInferenceVariables *params)
Prior that checks for minimum and maximum prior range specified in runState->priorArgs and returns 0....
int LALInferenceCheckMinMaxPrior(LALInferenceVariables *priorArgs, const char *name)
Check for types of standard prior.
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...
void LALInferenceAddGMMPrior(LALInferenceVariables *priorArgs, const char *name, REAL8Vector ***mus, gsl_matrix ***covs, REAL8Vector **weights, REAL8Vector **minrange, REAL8Vector **maxrange)
Add a Gaussian Mixture Model prior.
void LALInferenceDrawNameFromPrior(LALInferenceVariables *output, LALInferenceVariables *priorArgs, char *name, LALInferenceVariableType type, gsl_rng *rdm)
Draw an individual variable from its prior range.
UINT4 LALInferenceInspiralSkyLocCubeToPrior(LALInferenceRunState *runState, LALInferenceVariables *params, LALInferenceModel *model, double *Cube, void *context)
Convert the hypercube parameter to physical parameters, for the prior density of the variables as spe...
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.
void LALInferenceInitCBCPrior(LALInferenceRunState *runState)
Initialize the prior based on command line arguments.
void LALInferenceRemoveFermiDiracPrior(LALInferenceVariables *priorArgs, const char *name)
Function to remove the r and sigma values for the Fermi-Dirac prior onto the priorArgs.
void LALInferenceRemoveMinMaxPrior(LALInferenceVariables *priorArgs, const char *name)
Function to remove the minimum and maximum values for the uniform prior onto the priorArgs.
REAL8 LALInferenceNullPrior(LALInferenceRunState *runState, LALInferenceVariables *params, LALInferenceModel *model)
Prior that is 1 everywhere.
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.
REAL8 LALInferenceSineGaussianPrior(LALInferenceRunState *runState, LALInferenceVariables *params, LALInferenceModel *model)
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)...
void LALInferenceAddLogUniformPrior(LALInferenceVariables *priorArgs, const char *name, REAL8 *xmin, REAL8 *xmax, LALInferenceVariableType type)
Add a log-uniform prior.
void LALInferenceRemoveGaussianPrior(LALInferenceVariables *priorArgs, const char *name)
Function to remove the mu and sigma values for the Gaussian prior onto the priorArgs.
REAL8 LALInferenceLogUniformPrior(LALInferenceVariables *priorArgs, const char *name, REAL8 value)
void LALInferenceCyclicReflectiveBound(LALInferenceVariables *parameter, LALInferenceVariables *priorArgs)
Apply cyclic and reflective boundaries to parameter to bring it back within the allowed prior ranges ...
void LALInferenceRotateInitialPhase(LALInferenceVariables *parameter)
Rotate initial phase if polarisation angle is cyclic around ranges.
int LALInferenceCheckCorrelatedPrior(LALInferenceVariables *priorArgs, const char *name)
Check for the existance of a correlation coefficient matrix and index for a parameter from the priorA...
void LALInferenceDrawFromPrior(LALInferenceVariables *output, LALInferenceVariables *priorArgs, gsl_rng *rdm)
Draw variables from the prior ranges.
void LALInferenceInitLIBPrior(LALInferenceRunState *runState)
Initialize the LIB prior based on command line arguments.
REAL8 LALInferenceFermiDiracPrior(LALInferenceVariables *priorArgs, const char *name, REAL8 value)
Return the Fermi-Dirac distribution log prior.
int LALInferenceCheckGMMPrior(LALInferenceVariables *priorArgs, const char *name)
Check for a Gaussian Mixture Model prior.
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.
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.
int LALInferenceCheckGaussianPrior(LALInferenceVariables *priorArgs, const char *name)
Check for a Gaussian prior (with a mean and variance)
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.
int LALInferenceCheckFermiDiracPrior(LALInferenceVariables *priorArgs, const char *name)
Check for a Fermi-Dirac prior (with a r and sigma parameter)
int LALInferenceCheckLogUniformPrior(LALInferenceVariables *priorArgs, const char *name)
Check for a log-uniform prior (with xmin and xmax parameters)
UINT4 within_malmquist(LALInferenceRunState *runState, LALInferenceVariables *params, LALInferenceModel *model)
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.
REAL8 LALInferenceInspiralSkyLocPrior(LALInferenceRunState *runState, LALInferenceVariables *params, LALInferenceModel *model)
Return the logarithmic prior density of the variables as specified for the sky localisation project (...
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...
REAL8 logGlitchAmplitudeDensity(REAL8 A, REAL8 Q, REAL8 f)
Return the log Prior for the glitch amplitude.
void LALInferenceRemoveGMMPrior(LALInferenceVariables *priorArgs, const char *name)
Remove a Gaussian Mixture Model prior.
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...
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 multivariat...
void LALInferenceRemoveLogUniformPrior(LALInferenceVariables *priorArgs, const char *name)
Function to remove the min and max values for the log-uniform prior from the priorArgs.
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.
void LALInferenceAddFermiDiracPrior(LALInferenceVariables *priorArgs, const char *name, REAL8 *sigma, REAL8 *r, LALInferenceVariableType type)
Add a Fermi-Dirac prior.
REAL8 LALInferenceAnalyticNullPrior(LALInferenceRunState *runState, LALInferenceVariables *params, LALInferenceModel *model)
Prior that is 1 everywhere in component mass space.
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.
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.
static const INT4 r
type
Structure to constain a model and its parameters.
Definition: LALInference.h:436
Structure containing inference run state This includes pointers to the function types required to run...
Definition: LALInference.h:592
The LALInferenceVariables structure to contain a set of parameters Implemented as a linked list of LA...
Definition: LALInference.h:170