bilby_pipe.create_injections
This a command line tool for the generation of injection files for consumption by bilby_pipe. Injection files can be generated in a variety of formats, see below, and are generated from a bilby-style prior_file.
Available formats: A dat file consists of a space-separated list of parameters with a header; A json formatted file.
If a geocent_time prior is given in the file, this will be used to create the time prior. Otherwise, the trigger-time & deltaT or gps-time and deltaT options are used (see below).
Exceptions
Common base class for all non-exit exceptions. |
Classes
An object to hold inputs to create_injection for consistency |
Functions
Generate a parser for the create_injections.py script |
|
|
Makes filename and ext consistent amongst user input |
|
Makes injection file using arguments from the namespace args parameter |
|
Driver to create an injection file |
Module Contents
- exception bilby_pipe.create_injections.BilbyPipeCreateInjectionsError(message)[source]
Bases:
bilby_pipe.utils.BilbyPipeError
Common base class for all non-exit exceptions.
- bilby_pipe.create_injections.create_parser()[source]
Generate a parser for the create_injections.py script
Additional options can be added to the returned parser before calling parser.parse_args to generate the arguments`
- Returns:
- parser: BilbyArgParser
A parser with all the default options already added
- class bilby_pipe.create_injections.InjectionCreator(prior_file, prior_dict, default_prior, trigger_time, gpstimes, n_injection, generation_seed, deltaT=0.2, duration=4, post_trigger_duration=2, enforce_signal_duration=False, minimum_frequency=None)[source]
Bases:
bilby_pipe.input.Input
An object to hold inputs to create_injection for consistency
- 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_priors()
- minimum_frequency = None[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
- bilby_pipe.create_injections.get_full_path(filename, extension)[source]
Makes filename and ext consistent amongst user input
- bilby_pipe.create_injections.create_injection_file(filename, n_injection, prior_file=None, prior_dict=None, trigger_time=None, deltaT=0.2, gpstimes=None, duration=4, post_trigger_duration=2, generation_seed=None, extension='dat', default_prior='BBHPriorDict', enforce_signal_duration=False)[source]
Makes injection file using arguments from the namespace args parameter