Note
Go to the end to download the full example code.
Simple spectrogramΒΆ
This example shows a spectrogram of the strain data from LIGO-Hanford around the time of GW150914.
gwpy-plot spectrogram \
--gwosc \
--ifo H1 \
--start 1264316116 \
--duration 32 \
--epoch 1264316116.4 \
--ymax 4000 \
--interactive
The same command can be executed directly in Python as:
from gwpy.cli.gwpy_plot import main
main([
'spectrogram',
'--gwosc',
'--ifo', 'H1',
'--start', '1264316116',
'--duration', '32',
'--epoch', '1264316116.4',
'--ymax', '4000',
'--interactive',
])

Program run time: 14.6
Total running time of the script: (0 minutes 1.066 seconds)