Data Structures | |
class | LIGOLWContentHandlerExtractSimBurstTable |
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) |
Returns a named numpy array of the posterior samples in the file f . More... | |
def | output_html (outdir, ks_pvalues, injnum, skypp=False) |
Outputs the HTML page summarizing the results. More... | |
Variables | |
dictionary | posterior_name_to_sim_burst_extractor |
dictionary | posterior_name_to_latex_name |
string | USAGE |
parser = optparse.OptionParser(USAGE) | |
action | |
type | |
dest | |
help | |
default | |
None | |
options | |
args | |
injs = lsctables.SimBurstTable.get_table(utils.load_filename(options.injxml,contenthandler=LIGOLWContentHandlerExtractSimBurstTable)) | |
list | parameters = ['frequency', 'quality', 'hrss', 'ra', 'dec', 'psi', 'time', 'alpha','polar_eccentricity'] |
dictionary | pvalues = { } |
posfiles = args | |
int | Ninj = 0 |
def | psamples = read_posterior_samples(posfile) |
true_params = injs[index] | |
def | samples = psamples[par] |
dictionary | true_value = posterior_name_to_sim_burst_extractor[par](true_params) |
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 cbcBayesBurstPPAnalysis.fractional_rank | ( | x, | |
xs | |||
) |
Returns the fraction of samples, xs
, that fall below the value x
.
Definition at line 93 of file cbcBayesBurstPPAnalysis.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 109 of file cbcBayesBurstPPAnalysis.py.
def cbcBayesBurstPPAnalysis.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 145 of file cbcBayesBurstPPAnalysis.py.
def cbcBayesBurstPPAnalysis.read_posterior_samples | ( | f | ) |
Returns a named numpy array of the posterior samples in the file f
.
Definition at line 154 of file cbcBayesBurstPPAnalysis.py.
def cbcBayesBurstPPAnalysis.output_html | ( | outdir, | |
ks_pvalues, | |||
injnum, | |||
skypp = False |
|||
) |
Outputs the HTML page summarizing the results.
Definition at line 165 of file cbcBayesBurstPPAnalysis.py.
dictionary cbcBayesBurstPPAnalysis.posterior_name_to_sim_burst_extractor |
Definition at line 58 of file cbcBayesBurstPPAnalysis.py.
dictionary cbcBayesBurstPPAnalysis.posterior_name_to_latex_name |
Definition at line 73 of file cbcBayesBurstPPAnalysis.py.
string cbcBayesBurstPPAnalysis.USAGE |
Definition at line 221 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.parser = optparse.OptionParser(USAGE) |
Definition at line 223 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.action |
Definition at line 224 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.type |
Definition at line 224 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.dest |
Definition at line 224 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.help |
Definition at line 225 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.default |
Definition at line 230 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.None |
Definition at line 235 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.options |
Definition at line 237 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.args |
Definition at line 237 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.injs = lsctables.SimBurstTable.get_table(utils.load_filename(options.injxml,contenthandler=LIGOLWContentHandlerExtractSimBurstTable)) |
Definition at line 239 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.parameters = ['frequency', 'quality', 'hrss', 'ra', 'dec', 'psi', 'time', 'alpha','polar_eccentricity'] |
Definition at line 242 of file cbcBayesBurstPPAnalysis.py.
dictionary cbcBayesBurstPPAnalysis.pvalues = { } |
Definition at line 251 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.posfiles = args |
Definition at line 252 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.Ninj = 0 |
Definition at line 253 of file cbcBayesBurstPPAnalysis.py.
def cbcBayesBurstPPAnalysis.psamples = read_posterior_samples(posfile) |
Definition at line 256 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.true_params = injs[index] |
Definition at line 258 of file cbcBayesBurstPPAnalysis.py.
def cbcBayesBurstPPAnalysis.samples = psamples[par] |
Definition at line 267 of file cbcBayesBurstPPAnalysis.py.
dictionary cbcBayesBurstPPAnalysis.true_value = posterior_name_to_sim_burst_extractor[par](true_params) |
Definition at line 268 of file cbcBayesBurstPPAnalysis.py.
def cbcBayesBurstPPAnalysis.p = fractional_rank(true_value, samples) |
Definition at line 269 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.ks_pvalues = {} |
Definition at line 280 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.ps |
Definition at line 282 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.title |
Definition at line 282 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.outfile |
Definition at line 282 of file cbcBayesBurstPPAnalysis.py.
bool cbcBayesBurstPPAnalysis.skypp = False |
Definition at line 287 of file cbcBayesBurstPPAnalysis.py.
int cbcBayesBurstPPAnalysis.found = 0 |
Definition at line 289 of file cbcBayesBurstPPAnalysis.py.
Definition at line 293 of file cbcBayesBurstPPAnalysis.py.
Definition at line 294 of file cbcBayesBurstPPAnalysis.py.
cbcBayesBurstPPAnalysis.outdir |
Definition at line 305 of file cbcBayesBurstPPAnalysis.py.