Querying dataset information

gwosc.datasets includes functions to query for available datasets.

To search for all available datasets:

>>> from gwosc import datasets
>>> datasets.find_datasets()
['GW150914', 'GW151226', 'GW170104', 'GW170608', 'GW170814', 'GW170817', 'LVT151012', 'O1', 'S5', 'S6']
>>> datasets.find_datasets(detector='V1')
['GW170814', 'GW170817']
>>> datasets.find_datasets(type='run')
['O1', 'S5', 'S6']

To query for the GPS time of an event dataset (or vice-versa):

>>> datasets.event_gps('GW170817')
1187008882.43
>>> datasets.event_at_gps(1187008882)
'GW170817'

Similar queries are available for observing run datasets:

>>> datasets.run_segment('O1')
(1126051217, 1137254417)
>>> datasets.run_at_gps(1135136350)  # event_gps('GW151226')
'O1'

To run an event query filtered by merger parameters:

>>> from gwosc.datasets import query_events
>>> query_events(select=["mass-1-source <= 3.0"])
['GW170817-v3', 'GW190425-v1', 'GW190425-v2', 'GW190425_081805-v3']

Functions

dataset_type(dataset[, host])

Returns the type of the named dataset

event_at_gps(gps[, host, tol])

Returns the name of the open-data event matching the GPS time

event_detectors(event[, catalog, version, host])

Returns the set of detectors that observed an event

event_gps(event[, catalog, version, host])

Returns the GPS time of an open-data event

event_segment(event[, detector, catalog, ...])

Returns the GPS [start, stop) interval covered by an event dataset

find_datasets([detector, type, segment, ...])

Find datasets available on the given GW open science host

query_events(select[, host])

Return a list of events filtered by the parameters in select

run_at_gps(gps[, host])

Returns the name of the open-data run dataset matching the GPS time

run_segment(run[, host])

Returns the GPS [start, stop) interval covered by a run dataset