bilby.gw.conversion

A collection of functions to convert between parameters describing gravitational-wave sources.

Functions

bilby_to_lalsimulation_spins(theta_jn, ...)

Convert from Bilby spin parameters to lalsimulation ones.

chirp_mass_and_mass_ratio_to_component_masses(...)

Convert total mass and mass ratio of a binary to its component masses.

chirp_mass_and_mass_ratio_to_total_mass(...)

Convert chirp mass and mass ratio of a binary to its total mass.

chirp_mass_and_primary_mass_to_mass_ratio(...)

Convert chirp mass and mass ratio of a binary to its total mass.

chirp_mass_and_total_mass_to_symmetric_mass_ratio(...)

Convert chirp mass and total mass of a binary to its symmetric mass ratio.

comoving_distance_to_luminosity_distance(...)

Convert from comoving_distance to luminosity_distance

comoving_distance_to_redshift(distance[, ...])

Convert from comoving_distance to redshift

component_masses_to_chirp_mass(mass_1, mass_2)

Convert the component masses of a binary to its chirp mass.

component_masses_to_mass_ratio(mass_1, mass_2)

Convert the component masses of a binary to its chirp mass.

component_masses_to_symmetric_mass_ratio(...)

Convert the component masses of a binary to its symmetric mass ratio.

component_masses_to_total_mass(mass_1, mass_2)

Convert the component masses of a binary to its total mass.

compute_per_detector_log_likelihoods(...[, ...])

Calculate the log likelihoods in each detector.

compute_snrs(sample, likelihood[, npool])

Compute the optimal and matched filter snrs of all posterior samples and print it out.

convert_to_lal_binary_black_hole_parameters(...)

Convert parameters we have into parameters we need.

convert_to_lal_binary_neutron_star_parameters(...)

Convert parameters we have into parameters we need.

eos_family_physical_check(eos)

Function that determines if the EoS family contains sufficient number of points before maximum mass is reached.

fill_from_fixed_priors(sample, priors)

Add parameters with delta function prior to the data frame/dictionary.

fill_sample(args)

generate_all_bbh_parameters(sample[, ...])

From either a single sample or a set of samples fill in all missing BBH parameters, in place.

generate_all_bns_parameters(sample[, ...])

From either a single sample or a set of samples fill in all missing BNS parameters, in place.

generate_component_masses(sample[, ...])

"

generate_component_spins(sample)

Add the component spins to the data frame/dictionary.

generate_mass_parameters(sample[, source])

Add the known mass parameters to the data frame/dictionary.

generate_posterior_samples_from_marginalized_likelihood(...)

Reconstruct the distance posterior from a run which used a likelihood which explicitly marginalised over time/distance/phase.

generate_sky_frame_parameters(samples, ...)

generate_source_frame_parameters(sample)

Generate source frame masses along with redshifts and comoving distance.

generate_specific_parameters(sample, parameters)

Generate a specific subset of parameters that can be generated.

generate_spin_parameters(sample)

Add all spin parameters to the data frame/dictionary.

generate_tidal_parameters(sample)

Generate all tidal parameters

lambda_1_lambda_2_to_delta_lambda_tilde(...)

Convert from individual tidal parameters to second domainant tidal term.

lambda_1_lambda_2_to_lambda_tilde(lambda_1, ...)

Convert from individual tidal parameters to domainant tidal term.

lambda_tilde_delta_lambda_tilde_to_lambda_1_lambda_2(...)

Convert from dominant tidal terms to individual tidal parameters.

lambda_tilde_to_lambda_1_lambda_2(...)

Convert from dominant tidal term to individual tidal parameters assuming lambda_1 * mass_1**5 = lambda_2 * mass_2**5.

luminosity_distance_to_comoving_distance(...)

Convert from luminosity_distance to comoving_distance

luminosity_distance_to_redshift(distance[, ...])

Convert from luminosity_distance to redshift

mass_1_and_chirp_mass_to_mass_ratio(mass_1, ...)

Calculate mass ratio from mass_1 and chirp_mass.

mass_2_and_chirp_mass_to_mass_ratio(mass_2, ...)

Calculate mass ratio from mass_1 and chirp_mass.

redshift_to_comoving_distance(redshift[, ...])

Convert from redshift to comoving_distance

redshift_to_luminosity_distance(redshift[, ...])

Convert from redshift to luminosity_distance

symmetric_mass_ratio_to_mass_ratio(...)

Convert the symmetric mass ratio to the normal mass ratio.

total_mass_and_mass_ratio_to_component_masses(...)

Convert total mass and mass ratio of a binary to its component masses.