PESummary Configuration Settings

Most of the settings used by pesummary are controlled by the pesummary.conf module. This module includes settings like the default matplotlib style properties and default image captions.

Below is the matplotlib style file that is used by default,

figure.facecolor : white
lines.solid_capstyle : round
patch.edgecolor : w
patch.force_edgecolor : True
font.size : 22.0
xtick.labelsize : 16.0
ytick.labelsize : 16.0
axes.labelsize : 20.0
axes.titlesize : 20.0
figure.titlesize : 22.0
legend.fontsize : 14.0
font.family: Times New Roman
font.sans-serif: ['Bitstream Vera Sans']
text.usetex: True
mathtext.fontset: cm
text.latex.preamble: \renewcommand{\mathdefault}[1][]{}

Below are the image captions that are used,

# Caption for 1d histogram
caption_1d_histogram = (
    "Plot showing the marginalized posterior distribution for {}. The vertical "
    "dashed lines show the 90% credible interval. The title gives the median "
    "and 90% confidence interval."
)

# Caption for bootstrapped 1d histogram
caption_1d_histogram_bootstrap = (
    "Plot showing {} posterior realizations for {}. {} samples were randomly "
    "drawn for each test."
)

# Caption for 2d contour plot
caption_2d_contour = (
    "Plot showing the 2d posterior distribution for {} and {}. The contours "
    "show the 50% and 90% credible intervals."
)

# Caption for autocorrelation plot
caption_autocorrelation = (
    "Plot showing the autocorrelation function for {}. This plot is commonly "
    "used to check for randomness in the data. An autocorrelation of 1/-1 "
    "means that the samples are correlated and 0 means no correlation. The "
    "autocorrelation function at a lag of N gives the correlation between "
    "the 0th sample and the Nth sample."
)

# Caption for sample evolution plot
caption_sample_evolution = (
    "Scatter plot showing the evolution of the collected samples for {}."
)

# Caption for sample evolution plot colored by second variable
caption_sample_evolution_colored = (
    caption_sample_evolution[:-1] + " colored by {}."
)

# Caption for preliminary skymap
caption_skymap_preliminary = (
    "Plot showing the most likely position of the source. This map has been "
    "produced by creating a 2d histogram from the samples of 'ra' and 'dec'. "
    "This is a valid approximation near the equator but breaks down near the "
    "poles. The 50% and 90% credible intervals are approximate. For true "
    "50% and 90% credible intervals a 'ligo.skymap' skymap should be "
    "generated."
)

# Caption for ligo.skymap skymap
caption_skymap = (
    "Plot showing the most likely position of the source that generated the "
    "gravitational wave. We give the 50% and 90% credible intervals. The "
    "black region corresponds to the most likely position and light orange "
    "least likely."
)

# Caption for strain plot
caption_strain = (
    "Plot showing the comparison between the gravitational wave strain "
    "measured at the detectors (grey) and the maximum likelihood waveform "
    "(orange) for all available detectors. A 30Hz high and 300Hz low pass "
    "filter have been applied to the gravitational wave strain."
)

# Caption for frequency domain waveform
caption_frequency_waveform = (
    "Plot showing the frequency domain waveform generated from the maximum "
    "likelihood samples."
)

# Caption for comparison time domain waveform plot
caption_time_waveform = (
    "Plot showing the time domain waveform generated from the maximum "
    "likelihood samples."
)

# Caption for psd plot
caption_psd = (
    "Plot showing the instrument noise for each detector near the time of "
    "detection; the power spectral density is expressed in terms of "
    "equivalent gravitational-wave strain amplitude."
)

# Caption for calibration plot
caption_calibration = (
    "Plot showing the calibration posteriors (solid lines) and calibration "
    "priors (solid band) for amplitude (top) and phase (bottom)."
)

# Caption for default mass1 mass2 classification plot
caption_default_classification_mass_1_mass_2 = (
    "Scatter plot showing the individual samples with their classifications "
    "over the mass_1 and mass_2 parameter space. The samples have not been "
    "reweighted. Green regions correspond to BBHs, blue BNS, orange NSBH and "
    "red MassGap."
)

# Caption for population mass1 mass2 classification plot
caption_population_classification_mass_1_mass_2 = (
    "Scatter plot showing the individual samples with their classifications "
    "over the mass_1 and mass_2 parameter space. The samples have been "
    "reweighted to a population prior. Green regions correspond to BBHs, blue "
    "BNS, orange NSBH and red MassGap."
)

# Caption for default classification bar plot
caption_default_classification_bar = (
    "Bar plot showing the most likely classification of the binary based on "
    "the samples."
)

# Caption for population classification bar plot
caption_population_classification_bar = (
    "Bar plot showing the most likely classification of the binary based on "
    "the samples which have been reweighted to a population prior."
)

# Caption for 2d contour plots
caption_2d_contour = (
    "2d contour plot showing the bounded posterior distributions for {} and "
    "{}. Each contour shows the 90% credible interval and the posterior "
    "distributions are normalized."
)

# Caption for violin plots
caption_violin = (
    "Violin plot showing the posterior distributions for {}. The horizontal "
    "black lines show the 90% credible intervals."
)

# Caption for spin disk plots
caption_spin_disk = (
    "Posterior probability distributions for the dimensionless component spins "
    "relative to the normal to the orbital plane, L, marginalized over the  "
    "azimuthal angles. The bins are constructed linearly in spin magnitude and "
    "the cosine of the tilt angles and are assigned equal prior probability."
)

Below, are the default settings used by PESummary,

import numpy as np
import os
from pesummary import conf

# matplotlib style file
_path = conf.__path__[0]
style_file = os.path.join(_path, "matplotlib_rcparams.sty")

# checkpoint file
checkpoint_dir = lambda webdir: os.path.join(webdir, "checkpoint")
resume_file = "pesummary_resume.pickle"

# Overwrite message
overwrite = "Overwriting {} from {} to {}"

# The palette to be used to distinguish result files
palette = "colorblind"

# Include the prior on the posterior plots
include_prior = False

# The user that submitted the job
user = "albert.einstein"

# The number of samples to disregard as burnin
burnin = 0

# The method to use to remove the samples as burnin
burnin_method = "burnin_by_step_number"

# delimiter to use when saving files to dat with np.savetxt
delimiter = "\t"

# Minimum length of h5 dataset for compression. Compressing small datasets can
# lead to an increased file size
compression_min_length = 1

# Plot 1d kdes rather than 1d histograms
kde_plot = False

# color for non-comparison plots
color = 'b'

# color cycle for different mcmc chains
colorcycle = "brgkmc"

# color cycle for different cmaps
cmapcycle = ["YlOrBr", "Blues", "Purples", "Greens", "PuRd", "inferno"]

# color for injection lines
injection_color = 'orange'

# color for prior histograms
prior_color = 'k'

# Produce public facing summarypages
public = False

# Number of cores to run on
multi_process = 1

# Default f_low to use for GW specific conversions
default_flow = 20.0

# Default f_final to use for GW specific conversions
default_f_final = 1024.0

# Default delta_f to use for GW specific conversions
default_delta_f = 1. / 256

# Standard meta_data names
log_evidence = "ln_evidence"
evidence = "evidence"
log_evidence_error = "ln_evidence_error"
log_bayes_factor = "ln_bayes_factor"
bayes_factor = "bayes_factor"
log_noise_evidence = "ln_noise_evidence"
log_prior_volume = "ln_prior_volume"

# corner.corner colors
corner_colors = ['#0072C1', '#b30909', '#8809b3', '#b37a09']

# corner.corner default kwargs
corner_kwargs = dict(
    bins=50, smooth=0.9, label_kwargs=dict(fontsize=16),
    title_kwargs=dict(fontsize=16), color=corner_colors[0],
    truth_color='tab:orange', quantiles=[0.16, 0.84],
    levels=(1 - np.exp(-0.5), 1 - np.exp(-2), 1 - np.exp(-9 / 2.)),
    plot_density=False, plot_datapoints=True, fill_contours=True,
    max_n_ticks=3
)

# Parameters to use for GW corner plot
gw_corner_parameters = [
    "luminosity_distance", "dec", "a_2", "a_1", "geocent_time", "phi_jl",
    "psi", "ra", "phase", "mass_2", "mass_1", "phi_12", "tilt_2", "theta_jn",
    "tilt_1", "chi_p", "chirp_mass", "mass_ratio", "symmetric_mass_ratio",
    "total_mass", "chi_eff", "redshift", "mass_1_source", "mass_2_source",
    "total_mass_source", "chirp_mass_source", "lambda_1", "lambda_2",
    "delta_lambda", "lambda_tilde", "log_likelihood"
]

# Parameters to use for GW source frame corner plot
gw_source_frame_corner_parameters = [
    "luminosity_distance", "mass_1_source", "mass_2_source",
    "total_mass_source", "chirp_mass_source", "redshift"
]

# List of precessing angles
precessing_angles = [
    "cos_tilt_1", "cos_tilt_2", "tilt_1", "tilt_2", "phi_12", "phi_jl"
]
# List of precessing spins
precessing_spins = ["spin_1x", "spin_1y", "spin_2x", "spin_2y"]
# Parameters to use for GW extrinsic corner plot
gw_extrinsic_corner_parameters = ["luminosity_distance", "psi", "ra", "dec"]

# List of 2d plots to generate for GW analyses
gw_2d_plots = [
    ["mass_1", "mass_2"], ["mass_1_source", "mass_2_source"], ["a_1", "a_2"],
    ["total_mass", "chi_eff"], ["mass_ratio", "chi_eff"],
    ["mass_ratio", "chi_p"], ["chi_p", "chi_eff"], ["cos_theta_jn", "chi_p"],
    ["ra", "dec"], ["cos_theta_jn", "luminosity_distance"],
    ["chirp_mass", "luminosity_distance"],
    ["mass_ratio", "luminosity_distance"], ["lambda_1", "lambda_2"],
    ["mass_ratio", "lambda_tilde"], ["ra", "geocent_time"],
    ["dec", "geocent_time"], ["H1_L1_time_delay", "H1_V1_time_delay"],
    ["H1_V1_time_delay", "L1_V1_time_delay"],
]

# Cosmology to use when calculating redshift
cosmology = "Planck15"

# Analytic PSD to use for conversions when no PSD file is provided
psd = "aLIGOZeroDetHighPower"

# GraceDB service url to use
gracedb_server = "https://gracedb.ligo.org/api/"

# Information required for reproducing a GW analysis
gw_reproducibility = ["config", "psd"]

# Additional 1d histogram pages that combine multiple GW marginalized posterior
# distributions
additional_1d_pages = {
    "precession": ["chi_p", "chi_p_2spin", "network_precessing_snr", "beta"],
    "subdominant_multipoles": [
        "network_matched_filter_snr", "network_21_multipole_snr",
        "network_33_multipole_snr", "network_44_multipole_snr"
    ]
}