Header file for functions used in testing the parameter estimation code for known pulsar searches using the nested sampling algorithm. More...
Prototypes | |
void | gridOutput (LALInferenceRunState *runState) |
A test function to calculate a 1D posterior on a grid. More... | |
REAL8 | test_gaussian_log_likelihood (LALInferenceVariables *vars, LALInferenceIFOData *data, LALInferenceModel *get_model) |
Test the sampler using a Gaussian likelihood. More... | |
void | test_gaussian_output (LALInferenceRunState *runState) |
Output the analytic evidence for the test Gaussian likelihood and a 95% upper limit. More... | |
void | outputPriorSamples (LALInferenceRunState *runState) |
Output a number of prior samples based on the initial live points. More... | |
void | compare_likelihoods (LALInferenceRunState *rs) |
Read in an ascii text file of nested samples and compare the log likelihoods. More... | |
Header file for functions used in testing the parameter estimation code for known pulsar searches using the nested sampling algorithm.
Definition in file ppe_testing.h.
Go to the source code of this file.
Macros | |
#define | USAGEGRID |
The usage format for the test case of performing the analysis on a one-dimensional grid. More... | |
#define USAGEGRID |
The usage format for the test case of performing the analysis on a one-dimensional grid.
Definition at line 40 of file ppe_testing.h.
void gridOutput | ( | LALInferenceRunState * | runState | ) |
A test function to calculate a 1D posterior on a grid.
This function is only to be used as a check/test of the code and will be run if the grid
command line argument is present. It will calculate the posterior for one parameter (given by gridpar
), between the ranges given by gridmin
and gridmax
(which default to 0 and 1) at a number of points given by gridsteps
(which default to 100).
runState | [in] The analysis information structure |
Definition at line 51 of file ppe_testing.c.
REAL8 test_gaussian_log_likelihood | ( | LALInferenceVariables * | vars, |
LALInferenceIFOData * | data, | ||
LALInferenceModel * | get_model | ||
) |
Test the sampler using a Gaussian likelihood.
This is a testing function that can be substituted for the standard likelihood function. It calculates only the h0
parameter posterior based on a Gaussian likelihood with mean of 0.0 and standard deviation of 0.025 - these values can be changed if required. It is just to be used to test the sampling routine (e.g. Nested Sampling) with a well defined likelihood function.
vars | [in] A set of pulsar parameters |
data | [in] A data structure |
get_model | UNDOCUMENTED |
Definition at line 209 of file ppe_testing.c.
void test_gaussian_output | ( | LALInferenceRunState * | runState | ) |
Output the analytic evidence for the test Gaussian likelihood and a 95% upper limit.
This function calculated the analytical evidence for a given test Gaussian likelihood and also a 95% upper limit on the likelihood. The values are output to the HDF5 file if given, but otherwise are just output to screen.
runState | [in] The LALInference run state variable |
Definition at line 245 of file ppe_testing.c.
void outputPriorSamples | ( | LALInferenceRunState * | runState | ) |
Output a number of prior samples based on the initial live points.
This function will output prior samples for variable parameters (as create by the LALInferenceSetupLivePointsArray function).
runState | [in] |
Definition at line 385 of file ppe_testing.c.
void compare_likelihoods | ( | LALInferenceRunState * | rs | ) |
Read in an ascii text file of nested samples and compare the log likelihoods.
This function reads in a file containing nested samples, including their log likelihoods, recomputes the full likelihood and compares it to the previously output value. This is useful for comparing outputs using ROQ to outputs using the full likelihood.
Definition at line 450 of file ppe_testing.c.