.. _gwpy-example-timeseries-statevector: .. sectionauthor:: Duncan Macleod .. currentmodule:: gwpy.timeseries Plotting segments for a `StateVector` ##################################### Confident detection of gravitational-wave signals is critically dependent on understanding the quality of the data searched. Alongside the strain *h(t)* data, |GWOSC|_ also releases a *Data Quality* :ref:`state vector `. We can use this to check on the quality of the data from the LIGO Livingston detector around |GW170817|_. First, we can import the `StateVector` class: .. plot:: :context: reset :nofigs: :include-source: from gwpy.timeseries import StateVector and download the state information surrounding GW170817: .. plot:: :context: :nofigs: :include-source: data = StateVector.fetch_open_data( "L1", 1187008882 - 100, 1187008882 + 100, verbose=True, ) Finally, we make a :meth:`~StateVector.plot`, passing `insetlabels=True` to display the bit names inside the axes: .. plot:: :context: :include-source: plot = data.plot(insetlabels=True) ax = plot.gca() ax.set_xscale('seconds', epoch=1187008882) ax.axvline(1187008882, color='orange', linestyle='--') ax.set_title('LIGO-Livingston data quality around GW170817') plot.show() This plot shows that for a short time exactly overlapping with GW170817 there was a data quality issue recorded that would negatively impact a search for generic gravitational-wave transients (bursts). For more details on this _glitch_, and on how it was excised, please see the `Science Summary for GW170817 `__.