Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
GWpy dev
Logo
  • What is GWpy?
  • How do I install GWpy?
    • FrameCPP
    • FrameL
    • LALSuite
    • NDS2
  • Citing GWpy

Data structures

  • Time Series data
    • Reading and writing time series data
    • Plotting time-domain data
    • TimeSeries
    • TimeSeriesDict
    • TimeSeriesList
  • The FrequencySeries class
    • Reading and writing frequency-domain data
    • Filtering frequency-domain data
    • FrequencySeries
    • SpectralVariance
  • The Spectrogram
    • Filtering frequency-domain data
    • Spectrogram
  • State vectors
    • StateVector
    • StateTimeSeries
    • StateVectorDict
  • Data-quality segments
    • The Segment Database
    • Reading/writing segments and flags
    • Generating data-quality flags by thresholding
    • DataQualityFlag
    • DataQualityDict
    • Segment
    • SegmentList
    • SegmentListDict
  • Data tables
    • Reading and writing Table and EventTable objects
    • Filtering tables
    • Calculating event trigger rate
    • Plotting tabular data
    • Data table histograms
    • EventTable

Data manipulation

  • Signal processing

Visualising data

  • Plotting in GWpy (gwpy.plot)
    • Plotting GPS time scales
    • Colorbars
    • Custom legends in GWpy
    • Log scales in GWpy
    • The Gravitational-Wave Observatory colour scheme
    • Visualising filters (BodePlot)
  • Command line plotting with GWpy
    • Filtered timeseries
    • High-resolution spectrum
    • Normalised spectrogram
    • Simple coherence
    • Simple coherence spectrogram
    • Simple spectrogram
    • Simple spectrum
    • Simple timeseries
    • Spectrum at two times
    • Spectrum with three interferometers
    • Time-series of input laser power

Other utilities

  • The Channel class
  • Times and timestamps
  • Astrophysical modelling
    • burst_range
    • burst_range_spectrum
    • inspiral_range
    • inspiral_range_psd
    • range_timeseries
    • range_spectrogram
  • Configuring GWpy from the environment

Examples

  • Examples gallery
    • FrequencySeries examples
      • Calculate and plot a FrequencySeries
      • Calculate the coherence between two channels
      • Generating a SpectralVariance histogram
      • Inject a signal into a FrequencySeries
      • Plotting a Rayleigh-statistic Spectrum
      • Plotting an averaged ASD with percentiles.
      • Transfer function
    • Miscellaneous examples
      • Estimating the spectral contribution to inspiral range
      • Generating an inspiral range timeseries
      • Plotting a spectrogram of all open data for many hours
    • Segments examples
      • Plotting observing segments for O1
    • Signal processing examples
      • Filtering a TimeSeries to detect gravitational waves
    • Spectrogram examples
      • Calculating the time-dependent coherence between two channels
      • Plotting a Spectrogram
      • Plotting a Spectrogram of the Rayleigh statistic
      • Plotting a normalised Spectrogram
      • Plotting an over-dense, short-duration Spectrogram
    • Tabular data examples
      • Calculating (and plotting) rate versus time for an EventTable
      • Plotting EventTable rate versus time for specific column bins
      • Plotting an EventTable as 2-d tiles
      • Plotting an EventTable in a histogram
      • Plotting an EventTable in a scatter
    • TimeSeries examples
      • Accessing and visualising public GW detector data
      • Calculating the SNR associated with an astrophysical signal model
      • Comparing seismic trends between LIGO sites
      • Generate the Q-transform of a TimeSeries
      • Inject a known signal into a TimeSeries
      • Plotting segments for a StateVector
      • Whitening a TimeSeries
  • TimeSeries examples
    • Accessing and visualising public GW detector data
    • Calculating the SNR associated with an astrophysical signal model
    • Comparing seismic trends between LIGO sites
    • Generate the Q-transform of a TimeSeries
    • Inject a known signal into a TimeSeries
    • Plotting segments for a StateVector
    • Whitening a TimeSeries
  • Signal processing examples
    • Filtering a TimeSeries to detect gravitational waves
  • FrequencySeries examples
    • Calculate and plot a FrequencySeries
    • Calculate the coherence between two channels
    • Generating a SpectralVariance histogram
    • Inject a signal into a FrequencySeries
    • Plotting a Rayleigh-statistic Spectrum
    • Plotting an averaged ASD with percentiles.
    • Transfer function
  • Spectrogram examples
    • Calculating the time-dependent coherence between two channels
    • Plotting a Spectrogram
    • Plotting a Spectrogram of the Rayleigh statistic
    • Plotting a normalised Spectrogram
    • Plotting an over-dense, short-duration Spectrogram
  • Segments examples
    • Plotting observing segments for O1
  • Tabular data examples
    • Calculating (and plotting) rate versus time for an EventTable
    • Plotting EventTable rate versus time for specific column bins
    • Plotting an EventTable as 2-d tiles
    • Plotting an EventTable in a histogram
    • Plotting an EventTable in a scatter
  • Miscellaneous examples
    • Estimating the spectral contribution to inspiral range
    • Generating an inspiral range timeseries
    • Plotting a spectrogram of all open data for many hours

Developer notes

  • Publishing a release
Back to top
View this page

Note

Go to the end to download the full example code.

Comparing seismic trends between LIGO sites¶

On Jan 16 2020 there was a series of earthquakes, that should have had an impact on LIGO operations, I’d like to find out.

Data access¶

We choose to look at the 0.03Hz-1Hz ground motion band-limited RMS channel (1-second average trends) for each interferometer. We use a format string so we can substitute the interferometer prefix without duplicating the channel name:

channel = "{ifo}:ISI-GND_STS_ITMY_Z_BLRMS_30M_100M"
lhochan = channel.format(ifo="H1")
llochan = channel.format(ifo="L1")

To access the data, we can use get(), and give start and end datetimes to fetch 6 hours of data for each interferometer:

from gwpy.timeseries import TimeSeriesDict
data = TimeSeriesDict.get(
    [lhochan, llochan],
    "Jan 16 2020 8:00",
    "Jan 16 2020 14:00",
    host="nds.gwosc.org",
)
/home/duncan.macleod/gwpy-nightly-build/conda/envs/gwpy-nightly-3.11/lib/python3.11/site-packages/igwn_auth_utils/requests.py:46: DeprecationWarning: Support for identity-based X.509 credentials for LIGO.ORG is being dropped.
Calls to this utility will stop working on/around 20 May 2025.

For details on this change please see

https://computing.docs.ligo.org/guide/compsoft/roadmap/LVK/x509_retirement/

If you have questions about this message, or its implications, please
consider opening an IGWN Computing Help Desk ticket:

https://git.ligo.org/computing/helpdesk/-/issues/new
  return func(*args, **kwargs)

Visualisation¶

Now that we have the data, we can easily plot them:

plot = data[lhochan].plot(
    color="gwpy:ligo-hanford",
    label="LIGO-Hanford",
    yscale="log",
    ylabel=r"$1-3$\,Hz motion [nm/s]",
)
ax = plot.gca()
ax.plot(data[llochan], color="gwpy:ligo-livingston", label="LIGO-Livingston")
ax.set_title("Impact of earthquakes on LIGO")
ax.legend()
plot.show()
Impact of earthquakes on LIGO

As we can see, the earthquake had a huge impact on the LIGO observatories, severly impairing operations for several hours.

Total running time of the script: (0 minutes 5.660 seconds)

Download Jupyter notebook: blrms.ipynb

Download Python source code: blrms.py

Download zipped: blrms.zip

Gallery generated by Sphinx-Gallery

Next
Generate the Q-transform of a TimeSeries
Previous
Calculating the SNR associated with an astrophysical signal model
Copyright © 2025 Cardiff University
Made with Sphinx and @pradyunsg's Furo
On this page
  • Comparing seismic trends between LIGO sites
    • Data access
    • Visualisation