bilby_pipe.input

Module containing the main input class

Classes

Input

Superclass of input handlers

Module Contents

class bilby_pipe.input.Input(args, unknown_args, print_msg=True)[source]

Bases: object

Superclass of input handlers

known_args[source]
unknown_args[source]
property conda_env[source]
property complete_ini_file[source]
property idx[source]

The level A job index

property known_detectors[source]
property detectors[source]

A list of the detectors to include, e.g., [‘H1’, ‘L1’]

_check_detectors_against_known_detectors()[source]
static _split_string_by_space(string)[source]

Converts “H1 L1” to [“H1”, “L1”]

static _convert_string_to_list(string)[source]

Converts various strings to a list

property outdir[source]

The path to the directory where output will be stored

property submit_directory[source]

The path to the directory where submit output will be stored

property log_directory[source]

The top-level directory for the log directories

property data_generation_log_directory[source]

The path to the directory where generation logs will be stored

property data_analysis_log_directory[source]

The path to the directory where analysis logs will be stored

property summary_log_directory[source]

The path to the directory where pesummary logs will be stored

property data_directory[source]

The path to the directory where data output will be stored

property result_directory[source]

The path to the directory where result output will be stored

property final_result_directory[source]

The path to the directory where final result output will be stored

property webdir[source]
property gps_file[source]

The gps file containing the list of gps times

_parse_gps_file()[source]
static read_gps_file(gps_file)[source]
property gps_tuple[source]
static parse_gps_tuple(gps_tuple)[source]
property timeslide_file[source]

Timeslide file.

Timeslide file containing the list of timeslides to apply to each detector’s start time.

read_timeslide_file()[source]

Read timeslide file.

Each row of file is an array, hence ndmin = 2 [ [timshift1,…], [], [] …]

_parse_timeslide_file()[source]

Parse the timeslide file and check for correctness.

Sets the attribute “timeslides” if timeslide file correctly formatted and passed to Inputs()

get_timeslide_dict(idx)[source]

Return a specific timeslide value from the timeslide file.

Given an index, the dict of {detector: timeslide value} is created for the specific index and returned.

property bilby_frequency_domain_source_model[source]

The bilby function to pass to the waveform_generator

This can be a function defined in an external package.

get_bilby_source_model_function(model_string)[source]

Method to return a bilby frequency domain source model function given a string.

property reference_frequency[source]
property mode_array[source]
get_default_waveform_arguments()[source]
get_injection_waveform_arguments()[source]

Get the dict of the waveform arguments needed for creating injections.

Defaults the injection-waveform-approximant to waveform-approximant, if no injection-waveform-approximant provided. Note that the default waveform-approximant is IMRPhenomPv2.

property bilby_roq_frequency_domain_source_model[source]
property bilby_relative_binning_frequency_domain_source_model[source]
property bilby_multiband_frequency_domain_source_model[source]
property frequency_domain_source_model[source]

String of which frequency domain source model to use

property trigger_time[source]
property start_time[source]
_verify_start_time(start_time)[source]
property duration[source]
property injection_numbers[source]
property injection_df[source]
property injection_file[source]
property injection_dict[source]
static read_injection_file(injection_file)[source]
static read_json_injection_file(injection_file)[source]
static read_dat_injection_file(injection_file)[source]
property spline_calibration_envelope_dict[source]
property spline_calibration_amplitude_uncertainty_dict[source]
property spline_calibration_phase_uncertainty_dict[source]
property minimum_frequency[source]

The minimum frequency

If a per-detector dictionary is given, this will return the minimum frequency value. To access the dictionary, see self.minimum_frequency_dict

property minimum_frequency_dict[source]
property maximum_frequency[source]

The maximum frequency

If a per-detector dictionary is given, this will return the maximum frequency value. To access the dictionary, see self.maximum_frequency_dict

property maximum_frequency_dict[source]
test_frequency_dict(frequency_dict, label='')[source]
property default_prior_files[source]
static get_default_prior_files()[source]

Returns a dictionary of the default priors

get_distance_file_lookup_table(prior_file_str)[source]
get_source_distance_file_lookup_table(prior_file_str)[source]
property prior_file[source]
property prior_dict[source]

The input prior_dict from the ini (if given)

Note, this is not the bilby prior (see self.priors for that), this is a key-val dictionary where the val’s are strings which are converting into bilby priors in `_get_prior

static _convert_prior_dict_key(key)[source]

Converts the prior dict key to standard form

In the ini read, mass_1 -> mass-1, this corrects for that

property distance_marginalization_lookup_table[source]
property default_prior[source]
property combined_default_prior_dicts[source]
property time_parameter[source]
create_time_prior()[source]
property priors[source]

Read in and compose the prior at run-time

_get_priors(add_time=True)[source]

Construct the priors

Parameters:
add_time: bool

If True, the time prior is constructed from either the prior file or the trigger time. If False (used for the overview page where a single time-prior doesn’t make sense), this isn’t added to the prior

Returns:
prior: bilby.core.prior.PriorDict

The generated prior

_get_default_sky_priors()[source]
_priors_contains_default_sky_prior(priors)[source]
_update_default_prior_to_sky_frame_parameters(priors)[source]
property calibration_prior[source]
property calibration_model[source]
property calibration_lookup_table[source]
property likelihood[source]
property extra_likelihood_kwargs[source]
property roq_likelihood_kwargs[source]
property multiband_likelihood_kwargs[source]
property parameter_conversion[source]
property waveform_generator[source]
property waveform_generator_class[source]
property parameter_generation[source]
property summarypages_arguments[source]
property postprocessing_arguments[source]
property sampler[source]
property sampler_kwargs[source]
update_sampler_kwargs_conditional_on_request_cpus()[source]

If the user adds request-cpu >1, update npool in the sampler kwargs

pretty_print_prior()[source]
static _determine_conda_path_from_env(conda_env)[source]
property psd_dict[source]
_validate_psd_dict()[source]

Verify that all detectors are listed in the PSD dict and that they correspond to resolvable PSDs. Note that None is a special case that indicates the default PSD should be used.

property additional_transfer_paths[source]
property is_likelihood_multiband[source]
property reweighting_configuration[source]
property data_dict[source]
property channel_dict[source]
property frame_type_dict[source]
property psd_length[source]

Integer number of durations to use for generating the PSD

property psd_duration[source]
property psd_start_time[source]

The PSD start time relative to segment start time