summarydetchar

The summarydetchar executable allows the user to generate plots specific to gravitational wave strain data by interacting with the pesummary.gw.plots.detchar module of PESummary and GWpy. This includes omegascans and spectrograms.

To see help for this executable please run:

$ summarydetchar --help
2024-05-14  08:02:13 PESummary WARNING : Unable to install 'pycbc'. You will not be able to use some of the inbuilt functions.
usage: summarydetchar [-h] [-w DIR] [-s SAMPLES [SAMPLES ...]]
                      [--gwdata CHANNEL:CACHEFILE or PICKLEFILE [CHANNEL:CACHEFILE or PICKLEFILE ...]]
                      [--plot {spectrogram,omegascan}] [--gps GPS]
                      [--vmin VMIN] [--vmax VMAX] [--window WINDOW]

This executable is used to generate plots associated with the detectors

optional arguments:
  -h, --help            show this help message and exit
  -w DIR, --webdir DIR  make page and plots in DIR
  -s SAMPLES [SAMPLES ...], --samples SAMPLES [SAMPLES ...]
                        Path to posterior samples file(s). See documentation
                        for allowed formats. If path is on a remote server,
                        add username and servername in the form
                        {username}@{servername}:{path}. If path is on a public
                        webpage, ensure the path starts with https://. You may
                        also pass a string such as posterior_samples*.dat and
                        all matching files will be used
  --gwdata CHANNEL:CACHEFILE or PICKLEFILE [CHANNEL:CACHEFILE or PICKLEFILE ...]
                        channels and paths to strain cache files
  --plot {spectrogram,omegascan}
                        name of the publication plot you wish to produce
  --gps GPS             GPS time to centre the omegascan around
  --vmin VMIN           minimum for the omegascan colormap
  --vmax VMAX           maximum for the omegascan colormap
  --window WINDOW       window around gps time to generate omegascan for

–gwdata

The gravitational wave strain data can be passed to summarydetchar via the –gwdata option. Currently only cache files or bilby pickle files can be used. If using cache files, you must pass this to summarydetchar with the following syntax

$ summarydetchar --gwdata DETECTOR:CHANNEL:CACHEFILE

where DETECTOR is the name of the detector that the CACHEFILE is associated with and CHANNEL is the channel used to collect the strain data. If a single bilby pickle file is used, simply use the following syntax,

$ summarydetchar --gwdata PICKLEFILE

Generating an Omegascan

An example command line for generating an omegascan given some GW strain data is shown below:

$ summarydetchar --gwdata H1:GDS-CALIB_STRAIN:H-H1_HOFT_C00_CACHE.lcf \
                 --window 2 \
                 --gps 1000000 \
                 --vmin 0 \
                 --vmax 25 \
                 --plot omegascan
                 --webdir ./

Generating a Spectrogram

An example command line for generating a spectrogram given some GW strain data is shown below:

$ summarydetchar --gwdata H1:GDS-CALIB_STRAIN:H-H1_HOFT_C00_CACHE.lcf \
                 --plot spectrogram \
                 --webdir ./

pesummary.gw.plots.detchar

pesummary.gw.plots.detchar.frequency_domain_strain_data(strain, window=True, window_kwargs={'roll_off': 0.2}, resolution=0.001953125, fmin=-inf, fmax=inf, asd={})[source]

Plot the strain data in the frequency domain

Parameters:
  • strain (dict) – dictionary of gw.py timeseries objects containing the strain data for each IFO

  • window (Bool, optional) – if True, apply a window to the data before applying FFT to the data. Default True

  • window_kwargs (dict, optional) – optional kwargs for the window function

  • resolution (float, optional) – resolution to downsample the frequency domain data. Default 1./512

  • fmin (float, optional) – lowest frequency to start plotting the data

  • fmax (float, optional) – highest frequency to stop plotting the data

  • asd (dict, optional) – dictionary containing the ASDs for each detector to plot ontop of the detector data

pesummary.gw.plots.detchar.omegascan(strain, gps, window=4, vmin=0, vmax=25, cmap='viridis', ylim=[40, 2000], **kwargs)[source]

Generate an omegascan from the timeseries

Parameters:
  • strain (dict) – dictionary of gw.py timeseries objects containing the strain data for each IFO

  • gps (float) – gps time you wish to center your omegascan around

  • window (float, optional) – window around gps time to generate omagescan for. Default 4s

  • vmin (float, optional) – minimum for the colormap

  • vmax (float, optional) – maximum for the colormap

  • cmap (str, optional) – cmap for the plot. See matplotlib.pyplot.colormaps() for options

  • ylim (list, optional) – list to give the lower and upper bound of the plot

pesummary.gw.plots.detchar.spectrogram(strain, vmin=1e-23, vmax=1e-19, cmap='viridis', ylim=[40, 2000], **kwargs)[source]

Generate a spectrogram from the timeseries

Parameters:
  • strain (dict) – dictionary of gw.py timeseries objects containing the strain data for each IFO

  • vmin (float, optional) – minimum for the colormap

  • vmax (float, optional) – maximum for the colormap

  • cmap (str, optional) – cmap for the plot. See matplotlib.pyplot.colormaps() for options

  • ylim (list, optional) – list to give the lower and upper bound of the plot

pesummary.gw.plots.detchar.time_domain_strain_data(strain, bandpass_frequencies=[50, 250], notches=[60.0, 120.0, 180.0], window=None, merger_time=None, template=None, grid=False, xlabel='UTC', UTC_format='%B %d %Y, %H:%M:%S')[source]

Plot the strain data in the time domain. Code based on the GW150914 tutorial provided by gwpy: https://gwpy.github.io/docs/latest/examples/signal/gw150914.html