Using heron’s verification interface

Heron includes a growing suite of tools for verifiying its models against other models and alternative waveform catalogues. This notebook contains an overview of the process for comparing on of the models with the most up to date version of the Georgia Tech waveform catalogue.

import heron.testing
from elk.catalogue import NRCatalogue, PPCatalogue
from heron.models.georgebased import HeronHodlr
from heron.models.torchbased import HeronCUDA
import matplotlib.pyplot as plt
import numpy as np

First we need to load the model itself.

model = HeronCUDA()

We then load the NR catalogue.

data_root = "/home/daniel/data/gravitational-waves/gt-waveforms/"
samples_catalogue = NRCatalogue("GeorgiaTech", catalogue_root = data_root)

Matches between every waveform from the catalogue can then be calculated against the output of the model using the nrcat_match function from heron.testing.

matches = heron.testing.nrcat_match(model, samples_catalogue)
/home/daniel/repositories/elk/elk/ H5pyDeprecationWarning: The default file mode will change to 'r' (read-only) in h5py 3.0. To suppress this warning, pass the mode you need to h5py.File(), or set the global default h5.get_config().default_file_mode, or set the environment variable H5PY_DEFAULT_READONLY=1. Available modes are: 'r', 'r+', 'w', 'w-'/'x', 'a'. See the docs for details.
  waveform = h5py.File(self.data_file)
/home/daniel/.virtualenvs/gaston/sandbox/local/lib/python3.7/site-packages/pycbc/filter/ RuntimeWarning: divide by zero encountered in double_scalars
  norm = (4.0 * stilde.delta_f) / sqrt( h_norm)
/home/daniel/.virtualenvs/gaston/sandbox/local/lib/python3.7/site-packages/pycbc/filter/ RuntimeWarning: invalid value encountered in double_scalars
  return maxsnr * snr_norm / sqrt(v2_norm), max_id
[ ]:

f, ax = plt.subplots(1,1, dpi=300)
ax.hist(1-np.array(list(matches.values())), alpha=0.8, density=True,



ax.set_title("HeronCUDA - Georgia Tech [Apr 2020] Mismatches")

findfont: Font family ["'URW Bookman L'"] not found. Falling back to DejaVu Sans.
findfont: Font family ["'URW Bookman L'"] not found. Falling back to DejaVu Sans.