Note
Go to the end to download the full example code.
Normalised spectrogramΒΆ
This example shows a normalised spectrogram of the strain data from LIGO-Hanford around the time of GW150914.
gwpy-plot spectrogram \
--gwosc \
--ifo L1 \
--start 1264315518 \
--duration 1024 \
--norm \
--cmap Spectral_r \
--imin .25 \
--imax 4 \
--interactive
The same command can be executed directly in Python as:
from gwpy.cli.gwpy_plot import main
main([
'spectrogram',
'--gwosc',
'--ifo', 'L1',
'--start', '1264315518',
'--duration', '1024',
'--norm',
'--cmap', 'Spectral_r',
'--imin', '.25',
'--imax', '4',
'--interactive',
])

Program run time: 3.8
Total running time of the script: (0 minutes 3.848 seconds)