Functions | |
def | open_url (url, username, password) |
def | all_pairs (L) |
def | open_url_curl (url, args=[]) |
def | test_and_switch_param (common_output_table_header, test, switch) |
def | compare_plots_one_param_pdf (list_of_pos_by_name, param, analyticPDF=None) |
Plots a gaussian kernel density estimate for a set of Posteriors onto the same axis. More... | |
def | compare_plots_one_param_line_hist (list_of_pos_by_name, param, cl, color_by_name, cl_lines_flag=True, legend='right', analyticPDF=None) |
Plots a gaussian kernel density estimate for a set of Posteriors onto the same axis. More... | |
def | compute_ks_pvalue_matrix (list_of_pos_by_name, param) |
Returns a matrix of ks p-value tests between pairs of posteriors on the 1D marginalized distributions for param. More... | |
def | compare_plots_one_param_line_hist_cum (list_of_pos_by_name, param, cl, color_by_name, cl_lines_flag=True, analyticCDF=None, legend='auto') |
Plots a gaussian kernel density estimate for a set of Posteriors onto the same axis. More... | |
def | compare_bayes (outdir, names_and_pos_folders, injection_path, eventnum, username, password, reload_flag, clf, ldg_flag, contour_figsize=(4.5, 4.5), contour_dpi=250, contour_figposition=[0.15, 0.15, 0.5, 0.75], fail_on_file_err=True, covarianceMatrices=None, meanVectors=None, Npixels2D=50) |
def | output_confidence_levels_tex (clevels, outpath) |
Outputs a LaTeX table of parameter and run medians and confidence levels. More... | |
def | output_confidence_levels_dat (clevels, outpath) |
Outputs a LaTeX table of parameter and run medians and confidence levels. More... | |
def | output_confidence_uncertainty (cluncertainty, outpath) |
Variables | |
list | oneDMenu = ['mtotal','m1','m2','mchirp','mc','chirpmass','distance','distMPC','dist','iota','psi','eta','q','asym_massratio','spin1','spin2','a1','a2','phi1','theta1','phi2','theta2','costilt1','costilt2','costhetas','cosbeta','phi_orb', 'lambdat', 'dlambdat', 'lambda1', 'lambda2', 'lam_tilde', 'dlam_tilde','theta_jn','a1z','a2z'] + bppu.spininducedquadParams + bppu.snrParams + bppu.spinParams + bppu.cosmoParam + bppu.calParams + bppu.tigerParams + bppu.lorentzInvarianceViolationParams + bppu.qnmtestParams |
list | twoDGreedyMenu = [['mc','eta'],['mchirp','eta'],['chirpmass','eta'],['mc','q'],['mchirp','q'],['chirpmass','q'],['mc','asym_massratio'],['mchirp','asym_massratio'],['chirpmass','asym_massratio'],['m1','m2'],['mtotal','eta'],['distance','iota'],['dist','iota'],['dist','m1'],['ra','dec'],['dist','cos(iota)'],['phi_orb','iota'],['theta_jn','dist'],['spin1','spin2'],['spin1','mchirp'],['spin1','m1'],['a1','a2'],['a1','mchirp'],['a1','m1'],['tilt1','tilt2'],['tilt1','mchirp'],['tilt1','m1'],['a1z','a2z']] |
dictionary | paramNameLatexMap |
list | clTableParams = ['mchirp', 'mc', 'chirpmass', 'eta', 'q', 'm1', 'm2', 'distance', 'distMPC', 'dist', 'cos(iota)', 'iota', 'theta_jn', 'psi', 'ra', 'dec', 'time', 'phase', 'a1', 'a2', 'costilt1', 'costilt2','dchiMinus2','dchiMinus1','dchi0','dchi1','dchi2','dchi3','dchi3S','dchi3NS','dchi4','dchi4S','dchi4NS','dchi5','dchi5S','dchi5NS','dchi5l','dchi5lS','dchi5lNS','dchi6','dchi6S','dchi6NS','dchi6l','dchi7','dchi7S','dchi7NS','dbeta2','dbeta3','dsigma2','dsigma3','dsigma4','dbeta2','dbeta3', 'log10lambda_eff','log10lambda_a','log10livamp','lambda_eff','lambda_a','liv_amp','dquadmons','dchikappaS','dchikappaA','domega220', 'dtau220', 'domega210', 'dtau210', 'domega330', 'dtau330', 'domega440', 'dtau440', 'domega550', 'dtau550', 'db1', 'db2', 'db3', 'db4', 'dc1', 'dc2', 'dc4', 'dcl'] |
dictionary | greedyBinSizes = {'mc':0.001,'m1':0.1,'m2':0.1,'mass1':0.1,'mass2':0.1,'mtotal':0.1,'eta':0.001,'q':0.001,'asym_massratio':0.001,'iota':0.05,'time':1e-4,'distance':5.0,'dist':1.0,'mchirp':0.01,'chirpmass':0.01,'a1':0.02,'a2':0.02,'phi1':0.05,'phi2':0.05,'theta1':0.05,'theta2':0.05,'ra':0.05,'dec':0.005,'psi':0.1,'cos(iota)':0.01, 'cos(tilt1)':0.01, 'cos(tilt2)':0.01, 'tilt1':0.05, 'tilt2':0.05, 'cos(thetas)':0.01, 'cos(beta)':0.01,'phi_orb':0.2,'inclination':0.05,'theta_jn':0.05,'spin1':0.02,'spin2':0.02} |
list | OneDconfidenceLevels = [0.9] |
list | TwoDconfidenceLevels = OneDconfidenceLevels |
list | twoDplots = [['m1','m2'],['mass1','mass2'],['RA','dec'],['ra','dec'],['cos(thetas)','cos(beta)'],['distance','iota'],['dist','iota'],['dist','cosiota'],['distance','cosiota'],['psi','iota'],['psi','distance'],['psi','phi0'],['dist','cos(iota)'],['phi_orb','iota'],['distance','inclination'],['dist','inclination'],['theta_jn','dist'],['spin1','spin2'],['spin1','mchirp'],['spin1','m1'],['a1','a2'],['a1','mchirp'],['a1','m1'],['tilt1','tilt2'],['tilt1','mchirp'],['tilt1','m1']] |
list | allowed_params = ['mtotal','m1','m2','mchirp','mc','chirpmass','q','asym_massratio','distance','distMPC','dist','iota','psi','eta','ra','dec','a1','a2','spin1','spin2','phi1','theta1','phi2','theta2','cos(iota)','cos(tilt1)','cos(tilt2)','tilt1','tilt2','cos(thetas)','cos(beta)','phi_orb','inclination', 'logl', 'lambdat', 'dlambdat', 'lambda1', 'lambda2', 'lam_tilde', 'dlam_tilde','theta_jn','a1z','a2z','dquadmons','dquadmona','dquadmon1','dquadmon2']+bppu.snrParams + bppu.spinParams + bppu.cosmoParam + bppu.calParams + bppu.tigerParams |
parser = OptionParser() | |
dest | |
help | |
metavar | |
action | |
default | |
True | |
False | |
None | |
type | |
opts | |
args | |
outpath = os.getcwd() | |
list | names = [] |
pos_list | |
greedy2savepaths | |
oned_data | |
confidence_uncertainty | |
confidence_levels | |
max_logls | |
dics | |
ldg_flag | |
contour_figsize | |
contour_dpi | |
contour_figposition | |
fail_on_file_err | |
readFileErr | |
covarianceMatrices | |
meanVectors | |
Npixels2D | |
compare_page = bppu.htmlPage('Compare PDFs (single event)',css=bppu.__default_css_string) | |
Print Confidence Levels######. More... | |
param_section = compare_page.add_section('Meta') | |
string | param_section_write = '<div><p>This comparison was created from the following analyses</p>' |
save_paths | |
cl_table_str | |
ks_table_str | |
cl_uncer_str | |
bool | clf_toggle = False |
head | |
plotfile | |
temp | |
param_name = param_name.split('.')[0] | |
compare_page_footer = compare_page.add_section('') | |
cc_args = copy.deepcopy(sys.argv) | |
user_idx = cc_args.index('-u') | |
pass_idx = cc_args.index('-x') | |
string | cc_args_str = '' |
resultspage = open(os.path.join(outpath,'index.html'),'w') | |
def cbcBayesCompPos.open_url | ( | url, | |
username, | |||
password | |||
) |
Definition at line 101 of file cbcBayesCompPos.py.
def cbcBayesCompPos.all_pairs | ( | L | ) |
Definition at line 145 of file cbcBayesCompPos.py.
def cbcBayesCompPos.open_url_curl | ( | url, | |
args = [] |
|||
) |
Definition at line 150 of file cbcBayesCompPos.py.
def cbcBayesCompPos.test_and_switch_param | ( | common_output_table_header, | |
test, | |||
switch | |||
) |
Definition at line 159 of file cbcBayesCompPos.py.
def cbcBayesCompPos.compare_plots_one_param_pdf | ( | list_of_pos_by_name, | |
param, | |||
analyticPDF = None |
|||
) |
Plots a gaussian kernel density estimate for a set of Posteriors onto the same axis.
list_of_pos_by_name | a dictionary of {name:Posterior} class instances. |
param | parameter name to compare |
analyticPDF | Optional function to over-plot |
Definition at line 180 of file cbcBayesCompPos.py.
def cbcBayesCompPos.compare_plots_one_param_line_hist | ( | list_of_pos_by_name, | |
param, | |||
cl, | |||
color_by_name, | |||
cl_lines_flag = True , |
|||
legend = 'right' , |
|||
analyticPDF = None |
|||
) |
Plots a gaussian kernel density estimate for a set of Posteriors onto the same axis.
list_of_pos_by_name | a dict of Posterior class instances indexed by name |
param | parameter name to plot |
cl | list of credible levels to plot |
color_by_name | dict of colours indexed by name |
cl_lines_flag | option to plot credible level lines |
legend | matplotlib position for legend |
analyticPDF | Optional analytic function to over-plot |
Definition at line 260 of file cbcBayesCompPos.py.
def cbcBayesCompPos.compute_ks_pvalue_matrix | ( | list_of_pos_by_name, | |
param | |||
) |
Returns a matrix of ks p-value tests between pairs of posteriors on the 1D marginalized distributions for param.
Definition at line 369 of file cbcBayesCompPos.py.
def cbcBayesCompPos.compare_plots_one_param_line_hist_cum | ( | list_of_pos_by_name, | |
param, | |||
cl, | |||
color_by_name, | |||
cl_lines_flag = True , |
|||
analyticCDF = None , |
|||
legend = 'auto' |
|||
) |
Plots a gaussian kernel density estimate for a set of Posteriors onto the same axis.
list_of_pos_by_name | a dict of Posterior class instances indexed by name |
param | name of parameter to plot |
cl | list of confidence levels to show |
color_by_name | dict of colours indexed by name |
cl_lines_flag | Show confidence level lines |
analyticCDF | Analytic CDF function to over-plot |
legend | legend position to pass to matplotlib |
Definition at line 409 of file cbcBayesCompPos.py.
def cbcBayesCompPos.compare_bayes | ( | outdir, | |
names_and_pos_folders, | |||
injection_path, | |||
eventnum, | |||
username, | |||
password, | |||
reload_flag, | |||
clf, | |||
ldg_flag, | |||
contour_figsize = (4.5,4.5) , |
|||
contour_dpi = 250 , |
|||
contour_figposition = [0.15,0.15,0.5,0.75] , |
|||
fail_on_file_err = True , |
|||
covarianceMatrices = None , |
|||
meanVectors = None , |
|||
Npixels2D = 50 |
|||
) |
Definition at line 489 of file cbcBayesCompPos.py.
def cbcBayesCompPos.output_confidence_levels_tex | ( | clevels, | |
outpath | |||
) |
Outputs a LaTeX table of parameter and run medians and confidence levels.
Definition at line 888 of file cbcBayesCompPos.py.
def cbcBayesCompPos.output_confidence_levels_dat | ( | clevels, | |
outpath | |||
) |
Outputs a LaTeX table of parameter and run medians and confidence levels.
Definition at line 930 of file cbcBayesCompPos.py.
def cbcBayesCompPos.output_confidence_uncertainty | ( | cluncertainty, | |
outpath | |||
) |
Definition at line 962 of file cbcBayesCompPos.py.
list cbcBayesCompPos.oneDMenu = ['mtotal','m1','m2','mchirp','mc','chirpmass','distance','distMPC','dist','iota','psi','eta','q','asym_massratio','spin1','spin2','a1','a2','phi1','theta1','phi2','theta2','costilt1','costilt2','costhetas','cosbeta','phi_orb', 'lambdat', 'dlambdat', 'lambda1', 'lambda2', 'lam_tilde', 'dlam_tilde','theta_jn','a1z','a2z'] + bppu.spininducedquadParams + bppu.snrParams + bppu.spinParams + bppu.cosmoParam + bppu.calParams + bppu.tigerParams + bppu.lorentzInvarianceViolationParams + bppu.qnmtestParams |
Definition at line 50 of file cbcBayesCompPos.py.
list cbcBayesCompPos.twoDGreedyMenu = [['mc','eta'],['mchirp','eta'],['chirpmass','eta'],['mc','q'],['mchirp','q'],['chirpmass','q'],['mc','asym_massratio'],['mchirp','asym_massratio'],['chirpmass','asym_massratio'],['m1','m2'],['mtotal','eta'],['distance','iota'],['dist','iota'],['dist','m1'],['ra','dec'],['dist','cos(iota)'],['phi_orb','iota'],['theta_jn','dist'],['spin1','spin2'],['spin1','mchirp'],['spin1','m1'],['a1','a2'],['a1','mchirp'],['a1','m1'],['tilt1','tilt2'],['tilt1','mchirp'],['tilt1','m1'],['a1z','a2z']] |
Definition at line 52 of file cbcBayesCompPos.py.
dictionary cbcBayesCompPos.paramNameLatexMap |
Definition at line 56 of file cbcBayesCompPos.py.
list cbcBayesCompPos.clTableParams = ['mchirp', 'mc', 'chirpmass', 'eta', 'q', 'm1', 'm2', 'distance', 'distMPC', 'dist', 'cos(iota)', 'iota', 'theta_jn', 'psi', 'ra', 'dec', 'time', 'phase', 'a1', 'a2', 'costilt1', 'costilt2','dchiMinus2','dchiMinus1','dchi0','dchi1','dchi2','dchi3','dchi3S','dchi3NS','dchi4','dchi4S','dchi4NS','dchi5','dchi5S','dchi5NS','dchi5l','dchi5lS','dchi5lNS','dchi6','dchi6S','dchi6NS','dchi6l','dchi7','dchi7S','dchi7NS','dbeta2','dbeta3','dsigma2','dsigma3','dsigma4','dbeta2','dbeta3', 'log10lambda_eff','log10lambda_a','log10livamp','lambda_eff','lambda_a','liv_amp','dquadmons','dchikappaS','dchikappaA','domega220', 'dtau220', 'domega210', 'dtau210', 'domega330', 'dtau330', 'domega440', 'dtau440', 'domega550', 'dtau550', 'db1', 'db2', 'db3', 'db4', 'dc1', 'dc2', 'dc4', 'dcl'] |
Definition at line 75 of file cbcBayesCompPos.py.
dictionary cbcBayesCompPos.greedyBinSizes = {'mc':0.001,'m1':0.1,'m2':0.1,'mass1':0.1,'mass2':0.1,'mtotal':0.1,'eta':0.001,'q':0.001,'asym_massratio':0.001,'iota':0.05,'time':1e-4,'distance':5.0,'dist':1.0,'mchirp':0.01,'chirpmass':0.01,'a1':0.02,'a2':0.02,'phi1':0.05,'phi2':0.05,'theta1':0.05,'theta2':0.05,'ra':0.05,'dec':0.005,'psi':0.1,'cos(iota)':0.01, 'cos(tilt1)':0.01, 'cos(tilt2)':0.01, 'tilt1':0.05, 'tilt2':0.05, 'cos(thetas)':0.01, 'cos(beta)':0.01,'phi_orb':0.2,'inclination':0.05,'theta_jn':0.05,'spin1':0.02,'spin2':0.02} |
Definition at line 79 of file cbcBayesCompPos.py.
list cbcBayesCompPos.OneDconfidenceLevels = [0.9] |
Definition at line 93 of file cbcBayesCompPos.py.
list cbcBayesCompPos.TwoDconfidenceLevels = OneDconfidenceLevels |
Definition at line 94 of file cbcBayesCompPos.py.
list cbcBayesCompPos.twoDplots = [['m1','m2'],['mass1','mass2'],['RA','dec'],['ra','dec'],['cos(thetas)','cos(beta)'],['distance','iota'],['dist','iota'],['dist','cosiota'],['distance','cosiota'],['psi','iota'],['psi','distance'],['psi','phi0'],['dist','cos(iota)'],['phi_orb','iota'],['distance','inclination'],['dist','inclination'],['theta_jn','dist'],['spin1','spin2'],['spin1','mchirp'],['spin1','m1'],['a1','a2'],['a1','mchirp'],['a1','m1'],['tilt1','tilt2'],['tilt1','mchirp'],['tilt1','m1']] |
Definition at line 98 of file cbcBayesCompPos.py.
list cbcBayesCompPos.allowed_params = ['mtotal','m1','m2','mchirp','mc','chirpmass','q','asym_massratio','distance','distMPC','dist','iota','psi','eta','ra','dec','a1','a2','spin1','spin2','phi1','theta1','phi2','theta2','cos(iota)','cos(tilt1)','cos(tilt2)','tilt1','tilt2','cos(thetas)','cos(beta)','phi_orb','inclination', 'logl', 'lambdat', 'dlambdat', 'lambda1', 'lambda2', 'lam_tilde', 'dlam_tilde','theta_jn','a1z','a2z','dquadmons','dquadmona','dquadmon1','dquadmon2']+bppu.snrParams + bppu.spinParams + bppu.cosmoParam + bppu.calParams + bppu.tigerParams |
Definition at line 99 of file cbcBayesCompPos.py.
cbcBayesCompPos.parser = OptionParser() |
Definition at line 989 of file cbcBayesCompPos.py.
cbcBayesCompPos.dest |
Definition at line 990 of file cbcBayesCompPos.py.
cbcBayesCompPos.help |
Definition at line 990 of file cbcBayesCompPos.py.
cbcBayesCompPos.metavar |
Definition at line 990 of file cbcBayesCompPos.py.
cbcBayesCompPos.action |
Definition at line 991 of file cbcBayesCompPos.py.
cbcBayesCompPos.default |
Definition at line 998 of file cbcBayesCompPos.py.
cbcBayesCompPos.True |
Definition at line 998 of file cbcBayesCompPos.py.
cbcBayesCompPos.False |
Definition at line 1005 of file cbcBayesCompPos.py.
cbcBayesCompPos.None |
Definition at line 1006 of file cbcBayesCompPos.py.
cbcBayesCompPos.type |
Definition at line 1009 of file cbcBayesCompPos.py.
cbcBayesCompPos.opts |
Definition at line 1011 of file cbcBayesCompPos.py.
cbcBayesCompPos.args |
Definition at line 1011 of file cbcBayesCompPos.py.
cbcBayesCompPos.outpath = os.getcwd() |
Definition at line 1015 of file cbcBayesCompPos.py.
list cbcBayesCompPos.names = [] |
Definition at line 1025 of file cbcBayesCompPos.py.
cbcBayesCompPos.pos_list |
Definition at line 1035 of file cbcBayesCompPos.py.
cbcBayesCompPos.greedy2savepaths |
Definition at line 1041 of file cbcBayesCompPos.py.
cbcBayesCompPos.oned_data |
Definition at line 1041 of file cbcBayesCompPos.py.
cbcBayesCompPos.confidence_uncertainty |
Definition at line 1041 of file cbcBayesCompPos.py.
cbcBayesCompPos.confidence_levels |
Definition at line 1041 of file cbcBayesCompPos.py.
cbcBayesCompPos.max_logls |
Definition at line 1041 of file cbcBayesCompPos.py.
cbcBayesCompPos.dics |
Definition at line 1041 of file cbcBayesCompPos.py.
cbcBayesCompPos.ldg_flag |
Definition at line 1041 of file cbcBayesCompPos.py.
cbcBayesCompPos.contour_figsize |
Definition at line 1041 of file cbcBayesCompPos.py.
cbcBayesCompPos.contour_dpi |
Definition at line 1041 of file cbcBayesCompPos.py.
cbcBayesCompPos.contour_figposition |
Definition at line 1041 of file cbcBayesCompPos.py.
cbcBayesCompPos.fail_on_file_err |
Definition at line 1041 of file cbcBayesCompPos.py.
cbcBayesCompPos.readFileErr |
Definition at line 1041 of file cbcBayesCompPos.py.
cbcBayesCompPos.covarianceMatrices |
Definition at line 1041 of file cbcBayesCompPos.py.
cbcBayesCompPos.meanVectors |
Definition at line 1041 of file cbcBayesCompPos.py.
cbcBayesCompPos.Npixels2D |
Definition at line 1041 of file cbcBayesCompPos.py.
cbcBayesCompPos.compare_page = bppu.htmlPage('Compare PDFs (single event)',css=bppu.__default_css_string) |
Print Confidence Levels######.
Save confidence uncertainty#####
Print HTML!#######
Definition at line 1052 of file cbcBayesCompPos.py.
cbcBayesCompPos.param_section = compare_page.add_section('Meta') |
Definition at line 1054 of file cbcBayesCompPos.py.
string cbcBayesCompPos.param_section_write = '<div><p>This comparison was created from the following analyses</p>' |
Definition at line 1056 of file cbcBayesCompPos.py.
cbcBayesCompPos.save_paths |
Definition at line 1071 of file cbcBayesCompPos.py.
cbcBayesCompPos.cl_table_str |
Definition at line 1071 of file cbcBayesCompPos.py.
cbcBayesCompPos.ks_table_str |
Definition at line 1071 of file cbcBayesCompPos.py.
cbcBayesCompPos.cl_uncer_str |
Definition at line 1071 of file cbcBayesCompPos.py.
bool cbcBayesCompPos.clf_toggle = False |
Definition at line 1072 of file cbcBayesCompPos.py.
cbcBayesCompPos.head |
Definition at line 1074 of file cbcBayesCompPos.py.
cbcBayesCompPos.plotfile |
Definition at line 1074 of file cbcBayesCompPos.py.
cbcBayesCompPos.temp |
Definition at line 1085 of file cbcBayesCompPos.py.
cbcBayesCompPos.param_name = param_name.split('.')[0] |
Definition at line 1085 of file cbcBayesCompPos.py.
cbcBayesCompPos.compare_page_footer = compare_page.add_section('') |
Definition at line 1092 of file cbcBayesCompPos.py.
cbcBayesCompPos.cc_args = copy.deepcopy(sys.argv) |
Definition at line 1095 of file cbcBayesCompPos.py.
cbcBayesCompPos.user_idx = cc_args.index('-u') |
Definition at line 1099 of file cbcBayesCompPos.py.
cbcBayesCompPos.pass_idx = cc_args.index('-x') |
Definition at line 1105 of file cbcBayesCompPos.py.
string cbcBayesCompPos.cc_args_str = '' |
Definition at line 1110 of file cbcBayesCompPos.py.
Definition at line 1118 of file cbcBayesCompPos.py.