LALInference 4.1.9.1-eeff03c
cbcBayesThermoInt Namespace Reference

Functions

def extract_temp (filename)
 Extracts the PTMCMC temperature from the header lines of the given file. More...
 
def get_mean_logl (filename)
 Returns the mean value of log(L) from the given filename, excluding the first 50% of samples as burn-in. More...
 

Variables

string usage
 
 parser = OptionParser(usage=usage)
 
 metavar
 
 default
 
 help
 
 options
 
 args
 
 betas = np.array([1.0/extract_temp(f) for f in args])
 
 logls = np.array([get_mean_logl(f) for f in args])
 
 inds = np.argsort(betas)[::-1]
 
 ebetas = np.concatenate((betas, [0.0]))
 
 elogls = np.concatenate((logls, [logls[-1]]))
 
 ebetas2 = np.concatenate((betas[::2], [0.0]))
 
 elogls2 = np.concatenate((logls[::2], [logls[::2][-1]]))
 
 evidence = -trapezoid(elogls, ebetas)
 
 evidence2 = -trapezoid(elogls2, ebetas2)
 
 devidence = np.abs(evidence - evidence2)
 

Function Documentation

◆ extract_temp()

def cbcBayesThermoInt.extract_temp (   filename)

Extracts the PTMCMC temperature from the header lines of the given file.

Definition at line 20 of file cbcBayesThermoInt.py.

◆ get_mean_logl()

def cbcBayesThermoInt.get_mean_logl (   filename)

Returns the mean value of log(L) from the given filename, excluding the first 50% of samples as burn-in.

Definition at line 39 of file cbcBayesThermoInt.py.

Variable Documentation

◆ usage

string cbcBayesThermoInt.usage ( void  )
Initial value:
1= """%s [-h] [--plotfile FILE] [--evfile FILE] OUTPUT_FILE [OUTPUT_FILE ...]
2
3Thermodynamic integration on PTMCMC samples.
4
5positional arguments:
6 OUTPUT_FILE PTMCMC output files""" % (os.path.basename(sys.argv[0]))

Definition at line 60 of file cbcBayesThermoInt.py.

◆ parser

cbcBayesThermoInt.parser = OptionParser(usage=usage)

Definition at line 67 of file cbcBayesThermoInt.py.

◆ metavar

cbcBayesThermoInt.metavar

Definition at line 68 of file cbcBayesThermoInt.py.

◆ default

cbcBayesThermoInt.default

Definition at line 68 of file cbcBayesThermoInt.py.

◆ help

cbcBayesThermoInt.help

Definition at line 68 of file cbcBayesThermoInt.py.

◆ options

cbcBayesThermoInt.options

Definition at line 71 of file cbcBayesThermoInt.py.

◆ args

cbcBayesThermoInt.args

Definition at line 71 of file cbcBayesThermoInt.py.

◆ betas

cbcBayesThermoInt.betas = np.array([1.0/extract_temp(f) for f in args])

Definition at line 77 of file cbcBayesThermoInt.py.

◆ logls

cbcBayesThermoInt.logls = np.array([get_mean_logl(f) for f in args])

Definition at line 78 of file cbcBayesThermoInt.py.

◆ inds

cbcBayesThermoInt.inds = np.argsort(betas)[::-1]

Definition at line 80 of file cbcBayesThermoInt.py.

◆ ebetas

cbcBayesThermoInt.ebetas = np.concatenate((betas, [0.0]))

Definition at line 88 of file cbcBayesThermoInt.py.

◆ elogls

cbcBayesThermoInt.elogls = np.concatenate((logls, [logls[-1]]))

Definition at line 89 of file cbcBayesThermoInt.py.

◆ ebetas2

cbcBayesThermoInt.ebetas2 = np.concatenate((betas[::2], [0.0]))

Definition at line 91 of file cbcBayesThermoInt.py.

◆ elogls2

cbcBayesThermoInt.elogls2 = np.concatenate((logls[::2], [logls[::2][-1]]))

Definition at line 92 of file cbcBayesThermoInt.py.

◆ evidence

cbcBayesThermoInt.evidence = -trapezoid(elogls, ebetas)

Definition at line 94 of file cbcBayesThermoInt.py.

◆ evidence2

cbcBayesThermoInt.evidence2 = -trapezoid(elogls2, ebetas2)

Definition at line 95 of file cbcBayesThermoInt.py.

◆ devidence

cbcBayesThermoInt.devidence = np.abs(evidence - evidence2)

Definition at line 97 of file cbcBayesThermoInt.py.