bilby_pipe.data_generation ========================== .. py:module:: bilby_pipe.data_generation .. autoapi-nested-parse:: Script to perform data generation steps .. !! processed by numpydoc !! Classes ------- .. autoapisummary:: bilby_pipe.data_generation.DataGenerationInput Functions --------- .. autoapisummary:: bilby_pipe.data_generation.create_generation_parser bilby_pipe.data_generation.main Module Contents --------------- .. py:class:: DataGenerationInput(args, unknown_args, create_data=True) Bases: :py:obj:`bilby_pipe.input.Input` Handles user-input for the data generation script :Parameters: **parser: configargparse.ArgParser, optional** The parser containing the command line / ini file inputs **args_list: list, optional** A list of the arguments to parse. Defaults to `sys.argv[1:]` **create_data: bool** If false, no data is generated (used for testing) .. !! processed by numpydoc !! .. py:attribute:: meta_data .. py:property:: injection_parameters .. py:attribute:: ini .. py:attribute:: idx The level A job index .. !! processed by numpydoc !! .. py:property:: generation_seed .. py:attribute:: trigger_time .. py:attribute:: outdir The path to the directory where output will be stored .. !! processed by numpydoc !! .. py:attribute:: label .. py:attribute:: reference_frame .. py:attribute:: time_reference .. py:attribute:: phase_marginalization .. py:attribute:: prior_file .. py:attribute:: prior_dict 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 :func:`_get_priors` .. !! processed by numpydoc !! .. py:attribute:: deltaT .. py:attribute:: default_prior .. py:attribute:: ignore_gwpy_data_quality_check .. py:attribute:: detectors A list of the detectors to include, e.g., ['H1', 'L1'] .. !! processed by numpydoc !! .. py:property:: channel_dict .. py:property:: data_dict .. py:attribute:: data_format .. py:attribute:: allow_tape .. py:attribute:: tukey_roll_off .. py:attribute:: zero_noise .. py:attribute:: resampling_method .. py:attribute:: duration .. py:attribute:: post_trigger_duration .. py:property:: sampling_frequency .. py:attribute:: minimum_frequency 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 .. !! processed by numpydoc !! .. py:attribute:: maximum_frequency 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 .. !! processed by numpydoc !! .. py:attribute:: reference_frequency .. py:attribute:: waveform_generator_class .. py:attribute:: waveform_approximant .. py:attribute:: catch_waveform_errors .. py:attribute:: pn_spin_order .. py:attribute:: pn_tidal_order .. py:attribute:: pn_phase_order .. py:attribute:: pn_amplitude_order .. py:attribute:: mode_array .. py:attribute:: waveform_arguments_dict .. py:attribute:: numerical_relativity_file .. py:attribute:: injection_waveform_approximant .. py:attribute:: frequency_domain_source_model String of which frequency domain source model to use .. !! processed by numpydoc !! .. py:attribute:: conversion_function .. py:attribute:: generation_function .. py:attribute:: likelihood_type .. py:attribute:: extra_likelihood_kwargs .. py:attribute:: enforce_signal_duration .. py:attribute:: psd_maximum_duration .. py:attribute:: psd_dict .. py:attribute:: calibration_model .. py:attribute:: spline_calibration_envelope_dict .. py:attribute:: spline_calibration_amplitude_uncertainty_dict .. py:attribute:: spline_calibration_phase_uncertainty_dict .. py:attribute:: spline_calibration_nodes .. py:attribute:: calibration_prior_boundary .. py:attribute:: roq_folder .. py:attribute:: roq_linear_matrix .. py:attribute:: roq_quadratic_matrix .. py:attribute:: roq_weights .. py:attribute:: roq_weight_format .. py:attribute:: roq_scale_factor .. py:attribute:: update_fiducial_parameters .. py:attribute:: epsilon .. py:attribute:: distance_marginalization .. py:attribute:: distance_marginalization_lookup_table .. py:attribute:: time_marginalization .. py:attribute:: calibration_marginalization .. py:attribute:: calibration_lookup_table .. py:attribute:: number_of_response_curves .. py:attribute:: jitter_time .. py:attribute:: plot_data .. py:attribute:: plot_spectrogram .. py:attribute:: plot_injection .. py:attribute:: reweighting_configuration .. py:method:: create_data(args) Function to iterate through data generation method Note, the data methods are mutually exclusive and only one can be given to the parser. :Parameters: **args: Namespace** Input arguments :Raises: BilbyPipeError: If no data is generated .. !! processed by numpydoc !! .. py:property:: psd_length Integer number of durations to use for generating the PSD .. !! processed by numpydoc !! .. py:property:: psd_duration .. py:property:: psd_start_time The PSD start time relative to segment start time .. !! processed by numpydoc !! .. py:property:: parameter_conversion .. py:method:: get_channel_type(det) Help method to read the channel_dict and print useful messages .. !! processed by numpydoc !! .. py:method:: _set_interferometers_from_gaussian_noise() Method to generate the interferometers data from Gaussian noise .. !! processed by numpydoc !! .. py:method:: _set_interferometers_from_injection_in_gaussian_noise() Method to generate the interferometers data from an injection in Gaussian noise .. !! processed by numpydoc !! .. py:method:: inject_signal_into_time_domain_data(data, ifo) Method to inject a signal into time-domain interferometer data Parameters of the injection are obtained from the `injection_parameters` or the injection file (if injection_parameters has not been set). The geocent_time of the injection is set to be trigger_time +/- deltaT/2 if the geocent_time is not provided in the injection parameters. :Parameters: **data: gwpy.timeseries.TimeSeries** The data into which to inject the signal **ifo: bilby.gw.detector.Interferometer** The interferometer for which the data relates to :Returns: data_and_signal: gwpy.timeseries.TimeSeries The data with the signal added .. !! processed by numpydoc !! .. py:method:: _set_psd_from_file(ifo) .. py:method:: _set_interferometers_from_data() Method to generate the interferometers data from data This sets the PSD before the analysis data so that the SNR of injected signals is correct. .. !! processed by numpydoc !! .. py:method:: __get_psd_data(det) .. py:method:: __generate_psd(psd_data, roll_off) Create the psd from strain data. .. !! processed by numpydoc !! .. py:method:: __plot_ifo_spectrogram(det, strain_data, psd_strain_data=None) Method to plot an IFO's data. :Parameters: **det: str** The detector name corresponding to the key in data-dict **strain_data, psd_strain_data: gwpy.TimeSeries** The timeseries strain data of a detector. :Returns: None .. File by the name `/data/_