Coverage for pesummary/conf/configuration.py: 100.0%
46 statements
« prev ^ index » next coverage.py v7.4.4, created at 2024-12-09 22:34 +0000
« prev ^ index » next coverage.py v7.4.4, created at 2024-12-09 22:34 +0000
1import numpy as np
2import os
3from pesummary import conf
5# matplotlib style file
6_path = conf.__path__[0]
7style_file = os.path.join(_path, "matplotlib_rcparams.sty")
9# checkpoint file
10checkpoint_dir = lambda webdir: os.path.join(webdir, "checkpoint")
11resume_file = "pesummary_resume.pickle"
13# Overwrite message
14overwrite = "Overwriting {} from {} to {}"
16# The palette to be used to distinguish result files
17palette = "colorblind"
19# Include the prior on the posterior plots
20include_prior = False
22# The user that submitted the job
23user = "albert.einstein"
25# The number of samples to disregard as burnin
26burnin = 0
28# The method to use to remove the samples as burnin
29burnin_method = "burnin_by_step_number"
31# delimiter to use when saving files to dat with np.savetxt
32delimiter = "\t"
34# Minimum length of h5 dataset for compression. Compressing small datasets can
35# lead to an increased file size
36compression_min_length = 1
38# Plot 1d kdes rather than 1d histograms
39kde_plot = False
41# color for non-comparison plots
42color = 'b'
44# color cycle for different mcmc chains
45colorcycle = "brgkmc"
47# color cycle for different cmaps
48cmapcycle = ["YlOrBr", "Blues", "Purples", "Greens", "PuRd", "inferno"]
50# color for injection lines
51injection_color = 'orange'
53# color for prior histograms
54prior_color = 'k'
56# Produce public facing summarypages
57public = False
59# Number of cores to run on
60multi_process = 1
62# Default f_low to use for GW specific conversions
63default_flow = 20.0
65# Default f_final to use for GW specific conversions
66default_f_final = 1024.0
68# Default delta_f to use for GW specific conversions
69default_delta_f = 1. / 256
71# Standard meta_data names
72log_evidence = "ln_evidence"
73evidence = "evidence"
74log_evidence_error = "ln_evidence_error"
75log_bayes_factor = "ln_bayes_factor"
76bayes_factor = "bayes_factor"
77log_noise_evidence = "ln_noise_evidence"
78log_prior_volume = "ln_prior_volume"
80# corner.corner colors
81corner_colors = ['#0072C1', '#b30909', '#8809b3', '#b37a09']
83# corner.corner default kwargs
84corner_kwargs = dict(
85 bins=50, smooth=0.9, label_kwargs=dict(fontsize=16),
86 title_kwargs=dict(fontsize=16), color=corner_colors[0],
87 truth_color='tab:orange', quantiles=[0.16, 0.84],
88 levels=(1 - np.exp(-0.5), 1 - np.exp(-2), 1 - np.exp(-9 / 2.)),
89 plot_density=False, plot_datapoints=True, fill_contours=True,
90 max_n_ticks=3
91)
93# Parameters to use for GW corner plot
94gw_corner_parameters = [
95 "luminosity_distance", "dec", "a_2", "a_1", "geocent_time", "phi_jl",
96 "psi", "ra", "phase", "mass_2", "mass_1", "phi_12", "tilt_2", "theta_jn",
97 "tilt_1", "chi_p", "chirp_mass", "mass_ratio", "symmetric_mass_ratio",
98 "total_mass", "chi_eff", "redshift", "mass_1_source", "mass_2_source",
99 "total_mass_source", "chirp_mass_source", "lambda_1", "lambda_2",
100 "delta_lambda", "lambda_tilde", "log_likelihood"
101]
103# Parameters to use for GW source frame corner plot
104gw_source_frame_corner_parameters = [
105 "luminosity_distance", "mass_1_source", "mass_2_source",
106 "total_mass_source", "chirp_mass_source", "redshift"
107]
109# List of precessing angles
110precessing_angles = [
111 "cos_tilt_1", "cos_tilt_2", "tilt_1", "tilt_2", "phi_12", "phi_jl"
112]
113# List of precessing spins
114precessing_spins = ["spin_1x", "spin_1y", "spin_2x", "spin_2y"]
115# Parameters to use for GW extrinsic corner plot
116gw_extrinsic_corner_parameters = ["luminosity_distance", "psi", "ra", "dec"]
118# List of 2d plots to generate for GW analyses
119gw_2d_plots = [
120 ["mass_1", "mass_2"], ["mass_1_source", "mass_2_source"], ["a_1", "a_2"],
121 ["total_mass", "chi_eff"], ["mass_ratio", "chi_eff"],
122 ["mass_ratio", "chi_p"], ["chi_p", "chi_eff"], ["cos_theta_jn", "chi_p"],
123 ["ra", "dec"], ["cos_theta_jn", "luminosity_distance"],
124 ["chirp_mass", "luminosity_distance"],
125 ["mass_ratio", "luminosity_distance"], ["lambda_1", "lambda_2"],
126 ["mass_ratio", "lambda_tilde"], ["ra", "geocent_time"],
127 ["dec", "geocent_time"], ["H1_L1_time_delay", "H1_V1_time_delay"],
128 ["H1_V1_time_delay", "L1_V1_time_delay"],
129]
131# Cosmology to use when calculating redshift
132cosmology = "Planck15"
134# Analytic PSD to use for conversions when no PSD file is provided
135psd = "aLIGOZeroDetHighPower"
137# GraceDB service url to use
138gracedb_server = "https://gracedb.ligo.org/api/"
140# Information required for reproducing a GW analysis
141gw_reproducibility = ["config", "psd"]
143# Additional 1d histogram pages that combine multiple GW marginalized posterior
144# distributions
145additional_1d_pages = {
146 "precession": ["chi_p", "chi_p_2spin", "network_precessing_snr", "beta"],
147 "subdominant_multipoles": [
148 "network_matched_filter_snr", "network_21_multipole_snr",
149 "network_33_multipole_snr", "network_44_multipole_snr"
150 ]
151}