GWForge.population_fisher.catalogue

Assemble a detected catalogue from GWForge population and SNR files.

Attributes

Classes

Catalogue

A detected catalogue, and the counts that describe how it was cut.

Functions

expand_detectors(detectors)

Expand triangular detectors into the arm names the SNR file uses.

network_snr_from(snr_data[, detectors])

Quadrature sum of the per-detector optimal SNRs.

derive_event_keys(events)

Add the parameters the population models want but the file does not store.

load_catalogue(population_file, snr_file[, ...])

Join a population file to its SNR file and cut on network SNR.

load_injections(population_file[, keys])

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]
GWForge.population_fisher.catalogue.TRIANGULAR_ARMS[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_ratio and cos_tilt_1/cos_tilt_2 where 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.

events[source]
network_snr[source]
detectors[source]
snr_threshold[source]
n_total[source]
n_with_snr[source]
n_detected[source]
property detected_fraction[source]

Fraction of the SNR-covered injections that passed the threshold.

summary()[source]

A plain-text description of the cuts.

Return type:

str

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_snr column 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:

Catalogue

Raises:

ValueError – If the two files cannot be aligned, or nothing passes the threshold.

GWForge.population_fisher.catalogue.load_injections(population_file, keys=CATALOGUE_KEYS)[source]

Every injection, detected or not, as an events dict.

Parameters:
  • population_file (str)

  • keys (sequence of str)

Return type:

dict