Allowed file formats

Alongside the list of file formats that can be read in with the core module, the gw specific module provides additional functionality for reading in gravitational specific file formats.

GWTC1

As part of the GWTC-1. LIGO-Virgo publication, the posterior samples for the first 11 gravitational wave candidates was released. For these files, we use the pesummary.gw.file.formats.GWTC1.open_GWTC1 function to extract the posterior samples. If path_to_samples is not specified, the Overall_posterior group is used.

pesummary.gw.file.formats.GWTC1.open_GWTC1(path, path_to_samples=None, **kwargs)[source]

Grab the parameters and samples in a bilby file

Parameters:
  • path (str) – path to the result file you wish to read in

  • path_to_samples (str, optional) – path to the group containing the posterior samples you wish to load

LALInference

For the lalinference file format, we use the pesummary.gw.file.formats.lalinference.open_lalinference function which calls the pesummary.core.file.formats.hdf5.open_hdf5 function to extract the posterior samples. As part of the open_lalinference function, We also extract attributes and file versions from this file.

pesummary.gw.file.formats.lalinference.open_lalinference(path)[source]

Grab the parameters and samples in a lalinference file

Parameters:

path (str) – path to the result file you wish to read in

bilby

A file produced by the gravitational wave module in the bilby parameter estimation code, is read in through the pesummary.gw.file.formats.bilby.read_bilby function. This function calls the pesummary.core.file.formats.bilby.read_bilby function (as explained here) to extract the posterior samples. Posterior samples are then extracted through the .posterior property.

pesummary.gw.file.formats.bilby.read_bilby(path, disable_prior=False, latex_dict={'220_quasinormal_mode_frequency': '$f_{220} [\\mathrm{Hz}]$', 'E1_matched_filter_snr_abs': '$\\mathrm{abs}(\\rho^{E}_{\\mathrm{mf}})$', 'E1_matched_filter_snr_angle': '$\\mathrm{arg}(\\rho^{E}_{\\mathrm{mf}})$', 'E1_optimal_snr': '$\\rho^{E}_{\\mathrm{opt}}$', 'E1_time': '$t_{E} [\\mathrm{s}]$', 'H1_matched_filter_snr': '$\\rho^{H}_{\\mathrm{mf}}$', 'H1_matched_filter_snr_abs': '$\\mathrm{abs}(\\rho^{H}_{\\mathrm{mf}})$', 'H1_matched_filter_snr_angle': '$\\mathrm{arg}(\\rho^{H}_{\\mathrm{mf}})$', 'H1_optimal_snr': '$\\rho^{H}_{\\mathrm{opt}}$', 'H1_time': '$t_{H} [\\mathrm{s}]$', 'L1_matched_filter_snr': '$\\rho^{L}_{\\mathrm{mf}}$', 'L1_matched_filter_snr_abs': '$\\mathrm{abs}(\\rho^{L}_{\\mathrm{mf}})$', 'L1_matched_filter_snr_angle': '$\\mathrm{arg}(\\rho^{L}_{\\mathrm{mf}})$', 'L1_optimal_snr': '$\\rho^{L}_{\\mathrm{opt}}$', 'L1_time': '$t_{L} [\\mathrm{s}]$', 'V1_matched_filter_snr_abs': '$\\mathrm{abs}(\\rho^{V}_{\\mathrm{mf}})$', 'V1_matched_filter_snr_angle': '$\\mathrm{arg}(\\rho^{V}_{\\mathrm{mf}})$', 'V1_optimal_snr': '$\\rho^{V}_{\\mathrm{opt}}$', 'V1_time': '$t_{V} [\\mathrm{s}]$', '_b_bar': '$\\bar{b}$', '_precessing_harmonics_overlap': '$|\\mathrm{O}^{\\mathrm{prec}}_{0,1}|$', 'a_1': '$a_{1}$', 'a_2': '$a_{2}$', 'baryonic_mass_1': '$m_{1, \\mathrm{baryonic}} [M_{\\odot}]$', 'baryonic_mass_1_source': '$m^{\\mathrm{source}}_{1, \\mathrm{baryonic}} [M_{\\odot}]$', 'baryonic_mass_2': '$m_{2, \\mathrm{baryonic}} [M_{\\odot}]$', 'baryonic_mass_2_source': '$m^{\\mathrm{source}}_{2, \\mathrm{baryonic}} [M_{\\odot}]$', 'baryonic_torus_mass': '$M_{\\mathrm{torus}} [M_{\\odot}]$', 'baryonic_torus_mass_source': '$M^{\\mathrm{source}}_{\\mathrm{torus}} [M_{\\odot}]$', 'beta': '$\\beta$', 'chi_eff': '$\\chi_{\\mathrm{eff}}$', 'chi_eff_infinity': '$\\chi_{\\mathrm{eff},\\infty}$', 'chi_eff_infinity_only_prec_avg': '$\\chi_{\\mathrm{eff},\\infty}^{\\mathrm{only\\, prec\\, avg}}$', 'chi_p': '$\\chi_{\\mathrm{p}}$', 'chi_p_2spin': '$\\chi_{\\mathrm{p}}^{\\mathrm{2spin}}$', 'chi_p_infinity': '$\\chi_{\\mathrm{p},\\infty}$', 'chi_p_infinity_only_prec_avg': '$\\chi_{\\mathrm{p},\\infty}^{\\mathrm{only\\, prec\\, avg}}$', 'chirp_mass': '$\\mathcal{M} [M_{\\odot}]$', 'chirp_mass_source': '$\\mathcal{M}^{\\mathrm{source}} [M_{\\odot}]$', 'comoving_distance': '$d_{com} [\\mathrm{Mpc}]$', 'compactness_1': '$C_{1}$', 'compactness_2': '$C_{2}$', 'cos_iota': '$\\cos{\\iota}$', 'cos_theta_jn': '$\\cos{\\theta_{JN}}$', 'cos_tilt_1': '$\\cos{\\theta_{1}}$', 'cos_tilt_1_infinity': '$\\cos{\\theta_{1,\\infty}}$', 'cos_tilt_1_infinity_only_prec_avg': '$\\cos{\\theta_{1,\\infty}^{\\mathrm{only\\, prec\\, avg}}}$', 'cos_tilt_2': '$\\cos{\\theta_{2}}$', 'cos_tilt_2_infinity': '$\\cos{\\theta_{2,\\infty}}$', 'cos_tilt_2_infinity_only_prec_avg': '$\\cos{\\theta_{2,\\infty}^{\\mathrm{only\\, prec\\, avg}}}$', 'dec': '$\\delta [\\mathrm{rad}]$', 'delta_lambda': '$\\delta\\lambda$', 'final_kick': '$v_{\\mathrm{final}} [\\mathrm{km\\;s^{-1}}]$', 'final_mass': '$M_{\\mathrm{final}} [M_{\\odot}]$', 'final_mass_non_evolved': '$M_{\\mathrm{final}}^{\\mathrm{nonevol}} [M_{\\odot}]$', 'final_mass_source': '$M_{\\mathrm{final}}^{\\mathrm{source}} [M_{\\odot}]$', 'final_mass_source_non_evolved': '$M_{\\mathrm{final}}^{\\mathrm{source, nonevol}} [M_{\\odot}]$', 'final_spin': '$a_{\\mathrm{final}}$', 'final_spin_non_evolved': '$a_{\\mathrm{final}}^{\\mathrm{nonevol}}$', 'gamma_1': '$\\Gamma_{1}$', 'gamma_2': '$\\Gamma_{2}$', 'gamma_3': '$\\Gamma_{3}$', 'geocent_time': '$t_{c} [\\mathrm{s}]$', 'inverted_mass_ratio': '$1/q$', 'iota': '$\\iota [\\mathrm{rad}]$', 'lambda_1': '$\\lambda_{1}$', 'lambda_2': '$\\lambda_{2}$', 'lambda_tilde': '$\\tilde{\\lambda}$', 'log_pressure': '$\\log{\\mathcal{P}}$', 'luminosity_distance': '$d_{L} [\\mathrm{Mpc}]$', 'mass_1': '$m_{1} [M_{\\odot}]$', 'mass_1_source': '$m_{1}^{\\mathrm{source}} [M_{\\odot}]$', 'mass_2': '$m_{2} [M_{\\odot}]$', 'mass_2_source': '$m_{2}^{\\mathrm{source}} [M_{\\odot}]$', 'mass_ratio': '$q$', 'network_21_multipole_snr': '$\\rho_{21}$', 'network_33_multipole_snr': '$\\rho_{33}$', 'network_44_multipole_snr': '$\\rho_{44}$', 'network_matched_filter_snr': '$\\rho^{N}_{\\mathrm{mf}}$', 'network_optimal_snr': '$\\rho^{N}_{\\mathrm{opt}}$', 'network_precessing_snr': '$\\rho_{\\mathrm{p}}$', 'peak_luminosity': '$L_{\\mathrm{peak}} [10^{56} \\mathrm{ergs\\;s^{-1}}]$', 'peak_luminosity_non_evolved': '$L_{\\mathrm{peak}}^{\\mathrm{nonevol}} [10^{56} \\mathrm{ergs\\;s^{-1}}]$', 'phase': '$\\phi [\\mathrm{rad}]$', 'phi_1': '$\\phi_{1} [\\mathrm{rad}]$', 'phi_12': '$\\phi_{12} [\\mathrm{rad}]$', 'phi_2': '$\\phi_{2} [\\mathrm{rad}]$', 'phi_jl': '$\\phi_{JL} [\\mathrm{rad}]$', 'psi': '$\\Psi [\\mathrm{rad}]$', 'psi_J': '$\\Psi_{J} [\\mathrm{rad}]$', 'ra': '$\\alpha [\\mathrm{rad}]$', 'radiated_energy': '$E_{\\mathrm{rad}} [M_{\\odot}]$', 'radiated_energy_non_evolved': '$E_{\\mathrm{rad}}^{\\mathrm{nonevol}} [M_{\\odot}]$', 'redshift': '$z$', 'spectral_decomposition_gamma_0': '$\\gamma_{0}$', 'spectral_decomposition_gamma_1': '$\\gamma_{1}$', 'spectral_decomposition_gamma_2': '$\\gamma_{2}$', 'spectral_decomposition_gamma_3': '$\\gamma_{3}$', 'spin_1x': '$S_{1x}$', 'spin_1y': '$S_{1y}$', 'spin_1z': '$S_{1z}$', 'spin_1z_evolved': '$S_{1z}^{\\mathrm{evol}}$', 'spin_1z_infinity': '$S_{1z,\\infty}$', 'spin_1z_infinity_only_prec_avg': '$S_{1z,\\infty}^{\\mathrm{only\\, prec\\, avg}}$', 'spin_2x': '$S_{2x}$', 'spin_2y': '$S_{2y}$', 'spin_2z': '$S_{2z}$', 'spin_2z_evolved': '$S_{2z}^{\\mathrm{evol}}$', 'spin_2z_infinity': '$S_{2z,\\infty}$', 'spin_2z_infinity_only_prec_avg': '$S_{2z,\\infty}^{\\mathrm{only\\, prec\\, avg}}$', 'symmetric_mass_ratio': '$\\eta$', 'theta_jn': '$\\theta_{JN} [\\mathrm{rad}]$', 'tidal_disruption_frequency': '$f_{\\mathrm{td}} [\\mathrm{Hz}]$', 'tidal_disruption_frequency_ratio': '$f_{\\mathrm{td}} / f_{220}$', 'tilt_1': '$\\theta_{1} [\\mathrm{rad}]$', 'tilt_1_infinity': '$\\theta_{1,\\infty} [\\mathrm{rad}]$', 'tilt_1_infinity_only_prec_avg': '$\\theta_{1,\\infty}^{\\mathrm{only\\, prec\\, avg}} [\\mathrm{rad}]$', 'tilt_2': '$\\theta_{2} [\\mathrm{rad}]$', 'tilt_2_infinity': '$\\theta_{2,\\infty} [\\mathrm{rad}]$', 'tilt_2_infinity_only_prec_avg': '$\\theta_{2,\\infty}^{\\mathrm{only\\, prec\\, avg}} [\\mathrm{rad}]$', 'total_mass': '$M [M_{\\odot}]$', 'total_mass_source': '$M^{\\mathrm{source}} [M_{\\odot}]$', 'viewing_angle': '$\\Theta [\\mathrm{rad}]$'}, complex_params=['matched_filter_snr', 'optimal_snr'], **kwargs)[source]

Grab the parameters and samples in a bilby file

Parameters:
  • path (str) – path to the result file you wish to read in

  • disable_prior (Bool, optional) – if True, do not collect prior samples from the bilby result file. Default False

  • complex_params (list, optional) – list of parameters stored in the bilby result file which are complex and you wish to store the amplitude and angle as seperate posterior distributions

  • latex_dict (dict, optional) – list of latex labels for each parameter