Functions | |
def | fractional_rank (x, xs) |
Returns the fraction of samples, xs , that fall below the value x . More... | |
def | pp_plot (ps, title=None, outfile=None) |
Generates a p-p plot for the given ps. More... | |
def | pp_kstest_pvalue (ps) |
Returns the K-S p-value for the test of the given ps against a uniform distribution on [0,1]. More... | |
def | read_posterior_samples (f, injrow) |
Returns a bppu posterior sample object. More... | |
def | output_html (outdir, ks_pvalues, injnum, skypp=False) |
Outputs the HTML page summarizing the results. More... | |
Variables | |
dictionary | posterior_name_to_latex_name |
string | USAGE |
parser = optparse.OptionParser(USAGE) | |
action | |
type | |
dest | |
help | |
default | |
None | |
options | |
args | |
injs = lsctables.SimInspiralTable.get_table(utils.load_filename(options.injxml)) | |
list | parameters = ['m1', 'm2', 'mc', 'eta', 'q', 'theta_jn', 'a1', 'a2', 'tilt1', 'tilt2', 'phi12', 'phi_jl', 'ra', 'dec', 'distance', 'time', 'phi_orb', 'psi'] |
dictionary | pvalues = { } |
posfiles = args | |
int | Ninj = 0 |
def | psamples = read_posterior_samples(posfile,injs[index]) |
def | samples = psamples[par].samples |
def | true_value = psamples[par].injval |
def | p = fractional_rank(true_value, samples) |
dictionary | ks_pvalues = {} |
ps | |
title | |
outfile | |
bool | skypp = False |
int | found = 0 |
inf = os.path.join(os.path.realpath(options.skypp),'p-p.%s'%i) | |
outf = os.path.join(options.outdir,'sky_p-p.%s'%i) | |
outdir | |
def cbcBayesPPAnalysis.fractional_rank | ( | x, | |
xs | |||
) |
Returns the fraction of samples, xs
, that fall below the value x
.
Definition at line 109 of file cbcBayesPPAnalysis.py.
Generates a p-p plot for the given ps.
:param ps: The p-values whose cumulative distribution is to be plotted.
:param title: An (optional) title for the plot.
:param outfile: An (optional) basename for the plot file; both basename.png and basename.pdf will be created.
Definition at line 125 of file cbcBayesPPAnalysis.py.
def cbcBayesPPAnalysis.pp_kstest_pvalue | ( | ps | ) |
Returns the K-S p-value for the test of the given ps
against a uniform distribution on [0,1].
Definition at line 161 of file cbcBayesPPAnalysis.py.
def cbcBayesPPAnalysis.read_posterior_samples | ( | f, | |
injrow | |||
) |
Returns a bppu posterior sample object.
Definition at line 168 of file cbcBayesPPAnalysis.py.
def cbcBayesPPAnalysis.output_html | ( | outdir, | |
ks_pvalues, | |||
injnum, | |||
skypp = False |
|||
) |
Outputs the HTML page summarizing the results.
Definition at line 182 of file cbcBayesPPAnalysis.py.
dictionary cbcBayesPPAnalysis.posterior_name_to_latex_name |
Definition at line 40 of file cbcBayesPPAnalysis.py.
string cbcBayesPPAnalysis.USAGE |
Definition at line 238 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.parser = optparse.OptionParser(USAGE) |
Definition at line 240 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.action |
Definition at line 241 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.type |
Definition at line 241 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.dest |
Definition at line 241 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.help |
Definition at line 242 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.default |
Definition at line 247 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.None |
Definition at line 252 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.options |
Definition at line 254 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.args |
Definition at line 254 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.injs = lsctables.SimInspiralTable.get_table(utils.load_filename(options.injxml)) |
Definition at line 256 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.parameters = ['m1', 'm2', 'mc', 'eta', 'q', 'theta_jn', 'a1', 'a2', 'tilt1', 'tilt2', 'phi12', 'phi_jl', 'ra', 'dec', 'distance', 'time', 'phi_orb', 'psi'] |
Definition at line 259 of file cbcBayesPPAnalysis.py.
dictionary cbcBayesPPAnalysis.pvalues = { } |
Definition at line 268 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.posfiles = args |
Definition at line 269 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.Ninj = 0 |
Definition at line 270 of file cbcBayesPPAnalysis.py.
def cbcBayesPPAnalysis.psamples = read_posterior_samples(posfile,injs[index]) |
Definition at line 273 of file cbcBayesPPAnalysis.py.
def cbcBayesPPAnalysis.samples = psamples[par].samples |
Definition at line 281 of file cbcBayesPPAnalysis.py.
def cbcBayesPPAnalysis.true_value = psamples[par].injval |
Definition at line 282 of file cbcBayesPPAnalysis.py.
def cbcBayesPPAnalysis.p = fractional_rank(true_value, samples) |
Definition at line 283 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.ks_pvalues = {} |
Definition at line 293 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.ps |
Definition at line 297 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.title |
Definition at line 297 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.outfile |
Definition at line 297 of file cbcBayesPPAnalysis.py.
bool cbcBayesPPAnalysis.skypp = False |
Definition at line 304 of file cbcBayesPPAnalysis.py.
int cbcBayesPPAnalysis.found = 0 |
Definition at line 306 of file cbcBayesPPAnalysis.py.
Definition at line 310 of file cbcBayesPPAnalysis.py.
Definition at line 311 of file cbcBayesPPAnalysis.py.
cbcBayesPPAnalysis.outdir |
Definition at line 322 of file cbcBayesPPAnalysis.py.