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

Functions for use in testing the parameter estimation codes for targeted pulsar searches. More...

Prototypes

static double ul_gauss_cdf_function (double x, void *params)
 
static double ul_gauss_CDFRoot (double mu, double sigma, double min, double max)
 Find the root of the Gaussian CDF to give a 95% upper limit. More...
 
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

Functions for use in testing the parameter estimation codes for targeted pulsar searches.

Author
Matthew Pitkin

Definition in file ppe_testing.c.

Go to the source code of this file.

Data Structures

struct  ul_params
 

Function Documentation

◆ ul_gauss_cdf_function()

double ul_gauss_cdf_function ( double  x,
void *  params 
)
static

Definition at line 309 of file ppe_testing.c.

◆ ul_gauss_CDFRoot()

static double ul_gauss_CDFRoot ( double  mu,
double  sigma,
double  min,
double  max 
)
static

Find the root of the Gaussian CDF to give a 95% upper limit.

Use the Steffenson method to find the root of the function defined in ul_gauss_function.

Definition at line 328 of file ppe_testing.c.

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