Note
Go to the end to download the full example code.
Simple spectrumΒΆ
This example shows a simple spectrum (power spectral density) of strain data from the LIGO-Livingston detector around the time of GW200129_065458 (see Gravitational-Wave Transient Catalogue (GWTC) 3 for full details).
gwpy-plot spectrum \
--gwosc \
--ifo L1 \
--start 1264316100 \
--duration 32 \
--interactive
The same command can be executed directly in Python as:
from gwpy.cli.gwpy_plot import main
main([
'spectrum',
'--gwosc',
'--ifo', 'L1',
'--start', '1264316100',
'--duration', '32',
'--interactive',
])

Program run time: 15.7
Total running time of the script: (0 minutes 0.903 seconds)