Пример #1
0
"""

__author__ = 'Duncan Macleod <*****@*****.**>'

# .. currentmodule:: gwpy.segments
#
# Getting the segments
# --------------------
#
# First, we need to fetch the Open Data timeline segments from LOSC.
# To do that we can call the :meth:`DataQualityFlag.fetch_open_data` method
# using ``'H1_DATA'`` as the flag (for an explanation of what this means,
# read up on `The S6 Data Release <https://losc.ligo.org/S6/>`__).

from gwpy.segments import DataQualityFlag
h1segs = DataQualityFlag.fetch_open_data('H1_DATA', 'Sep 16 2010',
                                         'Sep 17 2010')

# For sanity, lets plot these segments:

splot = h1segs.plot(figsize=[12, 3])
splot.show()
splot.close()  # hide

# We see that the LIGO Hanford Observatory detector was operating for the
# majority of the day, with a few outages of ~30 minutes or so.

# We can use the :func:`abs` function to display the total amount of time
# spent taking data:

print(abs(h1segs.active))
Пример #2
0
from gwpy.segments import DataQualityFlag
h1segs = DataQualityFlag.fetch_open_data('H1_DATA', 'Sep 12 2015',
                                         'Jan 19 2016')
Пример #3
0
"""

__author__ = 'Duncan Macleod <*****@*****.**>'

# .. currentmodule:: gwpy.segments
#
# Getting the segments
# --------------------
#
# First, we need to fetch the Open Data timeline segments from LOSC.
# To do that we can call the :meth:`DataQualityFlag.fetch_open_data` method
# using ``'H1_DATA'`` as the flag (for an explanation of what this means,
# read up on `The S6 Data Release <https://losc.ligo.org/S6/>`__).

from gwpy.segments import DataQualityFlag
h1segs = DataQualityFlag.fetch_open_data('H1_DATA',
                                         'Sep 16 2010', 'Sep 17 2010')

# For sanity, lets plot these segments:

splot = h1segs.plot(figsize=[12, 3])
splot.show()
splot.close()  # hide

# We see that the LIGO Hanford Observatory detector was operating for the
# majority of the day, with a few outages of ~30 minutes or so.

# We can use the :func:`abs` function to display the total amount of time
# spent taking data:

print(abs(h1segs.active))
Пример #4
0
`Observing Run 1 (O1) <https://www.gw-openscience.org/O1/>`__
have been released by |GWOSC|_.

This example demonstrates how to download segment information into a
:class:`~gwpy.segments.DataQualityFlag`, and then plot them.
"""

__author__ = 'Duncan Macleod <*****@*****.**>'
__currentmodule__ = 'gwpy.segments'

# All we need to do is import the `DataQualityFlag` object, and then call
# the :meth:`DataQualityFlag.fetch_open_data` method to query for, and download
# the segments for all of O1:

from gwpy.segments import DataQualityFlag
h1segs = DataQualityFlag.fetch_open_data('H1_DATA', 'Sep 12 2015',
                                         'Jan 19 2016')

# We can then generate a plot of the times when LIGO-Hanford was operating:

plot = h1segs.plot(color='gwpy:ligo-hanford')
plot.show()

# That's a lot of segments. We can pare-down the list a little to display
# only the segments from the first month of the run:

h1month1 = DataQualityFlag.fetch_open_data('H1_DATA', 'Sep 12 2015',
                                           'Oct 12 2015')

# We can also download the LIGO-Livingston segments from the same period
# and display them alongside, as well as those segments during which both
# interferometers were operating at the same time
Пример #5
0
The data from the full Observing Run 1 (O1) have been released through the
`LIGO Open Science Center <https://losc.ligo.org/detector_status/>`__ (LOSC).

This example demonstrates how to download segment information into a
:class:`~gwpy.segments.DataQualityFlag`, and then plot them.
"""

__author__ = 'Duncan Macleod <*****@*****.**>'
__currentmodule__ = 'gwpy.segments'

# All we need to do is import the `DataQualityFlag` object, and then call
# the :meth:`DataQualityFlag.fetch_open_data` method to query for, and download
# the segments for all of O1:

from gwpy.segments import DataQualityFlag
h1segs = DataQualityFlag.fetch_open_data('H1_DATA', 'Sep 12 2015',
                                         'Jan 19 2016')

# We can then generate a plot of the times when LIGO-Hanford was operating:

plot = h1segs.plot(color='gwpy:ligo-hanford')
plot.show()

# That's a lot of segments. We can pare-down the list a little to display
# only the segments from the first month of the run:

h1month1 = DataQualityFlag.fetch_open_data('H1_DATA', 'Sep 12 2015',
                                           'Oct 12 2015')

# We can also download the LIGO-Livingston segments from the same period
# and display them alongside, as well as those segments during which both
# interferometers were operating at the same time