Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALPulsar 7.1.1.1-b246709
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

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...
 

Detailed Description

Header file for functions used in testing the parameter estimation code for known pulsar searches using the nested sampling algorithm.

Author
Matthew Pitkin

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...
 

Macro Definition Documentation

◆ USAGEGRID

#define USAGEGRID
Value:
"Usage: %s [options]\n\n"\
" --grid perform the posterior evalution on a 1D grid over the\n\ parameter given by --gridpar\n"\
" --gridpar The parameter over which to perform the 1D posterior\n\ evaluation\n"\
" --gridmin The lower end of the range over which to evaluate the\n\ paramter given by --gridpar\n"\
" --gridmax The upper end of the range over which to evaluate the\n\ paramter given by --gridpar\n"\
" --gridsteps The number of points in the grid\n"\
"\n"

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.

Function Documentation

◆ gridOutput()

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).

Parameters
runState[in] The analysis information structure

Definition at line 51 of file ppe_testing.c.

◆ test_gaussian_log_likelihood()

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.

Parameters
vars[in] A set of pulsar parameters
data[in] A data structure
get_modelUNDOCUMENTED
Returns
Natural logarithm of the likelihood

Definition at line 209 of file ppe_testing.c.

◆ test_gaussian_output()

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.

Parameters
runState[in] The LALInference run state variable

Definition at line 245 of file ppe_testing.c.

◆ outputPriorSamples()

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).

Parameters
runState[in]

Definition at line 385 of file ppe_testing.c.

◆ compare_likelihoods()

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.