GWForge.fisher.config¶
Configuration handling for gwforge_fisher.
Kept out of the executable so the parsing is importable and testable, and so the
CLI stays a thin driver like the other bin/ scripts.
Attributes¶
Functions¶
|
Read a list or dict written with single quotes from an ini file. |
|
Collect the sources to forecast. |
|
Waveform arguments, source model and parameter conversion. |
|
Read the |
|
Read the |
|
Segment length long enough to hold the signal. |
Module Contents¶
- GWForge.fisher.config.parse_collection(config, section, option, fallback=None)[source]¶
Read a list or dict written with single quotes from an ini file.
- Parameters:
config (configparser.ConfigParser)
section (str)
option (str)
fallback (object or None) – Returned when the option is absent or empty.
- Return type:
object
- GWForge.fisher.config.read_injections(config, section='Injection_Parameters')[source]¶
Collect the sources to forecast.
Accepts either parameters written inline in the configuration, or an
injection-filepointing at agwforge_populationHDF5, optionally sliced withstart-indexandend-index.- Parameters:
config (configparser.ConfigParser)
section (str)
- Returns:
One dict of parameters per source.
- Return type:
list of dict
- Raises:
ValueError – If the section is missing or defines no source.
- GWForge.fisher.config.waveform_settings(config, section='Waveform_Generator')[source]¶
Waveform arguments, source model and parameter conversion.
- Parameters:
config (configparser.ConfigParser)
section (str)
- Returns:
With keys
waveform_arguments,frequency_domain_source_model,parameter_conversionandminimum_frequency.- Return type:
dict
- Raises:
ValueError – If the named source model is unknown or unavailable in this bilby.
- GWForge.fisher.config.fisher_settings(config, section='Fisher')[source]¶
Read the
[Fisher]section.- Parameters:
config (configparser.ConfigParser)
section (str)
- Returns:
With keys
order,earth_rotation,finite_size,parameters,step_sizes,calibrateandtarget_change.- Return type:
dict
- GWForge.fisher.config.prior_settings(config, order, section='Priors')[source]¶
Read the
[Priors]section and enforce the order-dependent rule.Order 1 is a closed-form covariance and needs no prior; order 2 samples a truncated Taylor expansion, which is only meaningful inside bounds, so a prior file is required there.
- Parameters:
config (configparser.ConfigParser)
order (int) – Expansion order, from
fisher_settings().section (str)
- Returns:
With keys
prior_fileandenforce_physicality.- Return type:
dict
- Raises:
ValueError – If
order >= 2and noprior-fileis given.
- GWForge.fisher.config.segment_duration(parameters, minimum_frequency, approximant, maximum=None)[source]¶
Segment length long enough to hold the signal.
Getting this wrong is not a subtle error: a segment shorter than the inspiral wraps it, and the resulting derivatives are meaningless.
- Parameters:
parameters (dict) – Source parameters; needs component masses and aligned spins, which are derived from whatever mass parametrisation is present.
minimum_frequency (float) – Waveform starting frequency in Hz.
approximant (str)
maximum (float or None) – Cap on the returned duration, in seconds.
- Returns:
Duration in seconds, rounded up to a power of two.
- Return type:
float