Making a jupyter notebook for release
When samples are released to the public, it can be helpful to generate a jupyter notebook showing how to extract and visualise the samples that are stored. Through pesummary’s pesummary.gw.notebook module, we can create this jupyter notebook.
As an example, we generate a jupyter notebook showing the contents of the GW190814 public data release,
1#! /usr/bin/env python
2
3from pesummary.gw.notebook import make_public_notebook
4from pesummary.gw.fetch import fetch_open_samples
5
6file_name = fetch_open_samples(
7 "GW190814", catalog="GWTC-2", read_file=False, delete_on_exit=False,
8 outdir=".", unpack=True, path="GW190814.h5"
9)
10make_public_notebook(
11 file_name, (
12 "GW190814: Gravitational Waves from the Coalescence of a 23 Msun Black "
13 "Hole with a 2.6 Msun Compact Object"
14 ), default_analysis="combined", default_parameter="mass_2_source"
15)
The notebook that was generated can be seen here.