Note
Go to the end to download the full example code.
High-resolution spectrumΒΆ
This example shows a high-resolution spectrum (power spectral density) of the strain data from LIGO-Livingston around GW200129_065458 (see Gravitational-Wave Transient Catalogue (GWTC) 3 for full details).
gwpy-plot spectrum \
--gwosc \
--ifo L1 \
--start 1264315518 \
--duration 1024 \
--secpfft 64 \
--xmin 10 \
--xmax 4000 \
--interactive
The same command can be executed directly in Python as:
from gwpy.cli.gwpy_plot import main
main([
'spectrum',
'--gwosc',
'--ifo', 'L1',
'--start', '1264315518',
'--duration', '1024',
'--secpfft', '64',
'--xmin', '10',
'--xmax', '4000',
'--interactive',
])

/home/duncan.macleod/gwpy-nightly-build/gwpy/gwpy/types/series.py:933: UserWarning: FrequencySeries.crop given end larger than current end, crop will begin when the Series actually ends.
warn(
Program run time: 1.1
Total running time of the script: (0 minutes 1.079 seconds)