GWForge.population_fisher.catalogue¶
Assemble a detected catalogue from GWForge population and SNR files.
Attributes¶
Classes¶
A detected catalogue, and the counts that describe how it was cut. |
Functions¶
|
Expand triangular detectors into the arm names the SNR file uses. |
|
Quadrature sum of the per-detector optimal SNRs. |
|
Add the parameters the population models want but the file does not store. |
|
Join a population file to its SNR file and cut on network SNR. |
|
Every injection, detected or not, as an events dict. |
Module Contents¶
- GWForge.population_fisher.catalogue.CATALOGUE_KEYS = ('mass_1_source', 'mass_2_source', 'mass_1', 'mass_2', 'redshift', 'luminosity_distance', 'a_1',...[source]¶
- class GWForge.population_fisher.catalogue.Catalogue(events, network_snr, detectors, snr_threshold, n_total, n_with_snr)[source]¶
A detected catalogue, and the counts that describe how it was cut.
- Variables:
events (dict) – Source parameters of the detected events, plus derived
mass_ratioandcos_tilt_1/cos_tilt_2where the inputs allow.network_snr (numpy.ndarray) – Network optimal SNR of the detected events.
detectors (list of str) – Detector columns that went into the network SNR.
snr_threshold (float)
n_total (int) – Injections in the population file.
n_with_snr (int) – Injections the SNR stage actually covered.
n_detected (int) – Injections above threshold. GWForge applies no duty cycle, so this is also the analysis sample.
- GWForge.population_fisher.catalogue.expand_detectors(detectors)[source]¶
Expand triangular detectors into the arm names the SNR file uses.
- Parameters:
detectors (sequence of str)
- Return type:
list of str
- GWForge.population_fisher.catalogue.network_snr_from(snr_data, detectors=None)[source]¶
Quadrature sum of the per-detector optimal SNRs.
- Parameters:
snr_data (dict) – As written by
gwforge_optimal_snr.detectors (sequence of str or None) – Detector names (triangles already expanded). Defaults to every
*_optimal_snrcolumn in the file.
- Returns:
(network_snr, detectors_used).- Return type:
tuple
- Raises:
KeyError – If a requested detector has no column.
- GWForge.population_fisher.catalogue.derive_event_keys(events)[source]¶
Add the parameters the population models want but the file does not store.
- Parameters:
events (dict) – Modified in place and returned.
- Return type:
dict
- GWForge.population_fisher.catalogue.load_catalogue(population_file, snr_file, snr_threshold=10.0, detectors=None, keys=CATALOGUE_KEYS)[source]¶
Join a population file to its SNR file and cut on network SNR.
- Parameters:
population_file (str) – HDF5 from
gwforge_population.snr_file (str) – HDF5 from
gwforge_optimal_snr.snr_threshold (float) – Network optimal-SNR threshold for detection.
detectors (sequence of str or None) – Detectors to sum.
"ET"is expanded to its three arms. Defaults to every detector in the SNR file.keys (sequence of str) – Source parameters to carry over.
- Return type:
- Raises:
ValueError – If the two files cannot be aligned, or nothing passes the threshold.