.. _gwpy-example-timeseries-public: .. sectionauthor:: Duncan Macleod .. currentmodule:: gwpy.timeseries Accessing and visualising public GW detector data ################################################# Data from the current generation gravitational wave detectors are published by |GWOSCl| and freely available to the public. In this example we demonstrate how to identify times of a published GW detection event, and to download and visualise detector data. Firstly, we can use the |gwosc-mod| Python package to query for the time of the first gravitational-wave detection |GW150914|: .. plot:: :context: reset :nofigs: :include-source: from gwosc.datasets import event_gps gps = event_gps("GW150914") GWpy's `TimeSeries` class provides an interface to the public |GWOSC| data in the :meth:`~TimeSeries.fetch_open_data` method; to use it we need to first import the `TimeSeries` object: .. plot:: :context: :nofigs: :include-source: from gwpy.timeseries import TimeSeries then call the :meth:`~TimeSeries.fetch_open_data` method, passing it the prefix for the interferometer we want (`'L1'` here for LIGO-Livingston), and the GPS start and stop times of our query (based around the GPS time for GW150914): .. plot:: :context: :nofigs: :include-source: data = TimeSeries.fetch_open_data('L1', gps-5, gps+5) and then we can make a plot: .. plot:: :context: :include-source: plot = data.plot( title="LIGO Livingston Observatory data for GW150914", ylabel="Strain amplitude", color="gwpy:ligo-livingston", epoch=gps, ) plot.show() We can't see anything that looks like a gravitational wave signal in these data, the amplitude is dominated by low-frequency detector noise. Further filtering is required to be able to identify the GW150914 event here, see :ref:`gwpy-example-signal-gw150914` for a more in-depth example of extracting signals from noise.