find_times

gwdatafind.find_times(site, frametype, gpsstart=None, gpsend=None, host=None, session=None, **request_kw)

Query a GWDataFind host for times in which data are available.

Parameters
  • site (str) – single-character name of site to match

  • frametype (str) – name of dataset to match

  • gpsstart (int, optional) – GPS start time of query

  • gpsend (int, optional) – GPS end time of query

  • match (str, re.Pattern, optional) – regular expression to match against known types

  • host (str, optional) – the URL/name of the GWDataFind host to query; if not given get_default_host() will be used to discover the default host.

  • session (requests.Session, optional) – the connection session to use; if not given, a igwn_auth_utils.requests.Session will be created on-the-fly

  • token – passed directly to Session, see SciTokens for more details.

  • token_audience – passed directly to Session, see SciTokens for more details.

  • token_scope – passed directly to Session, see SciTokens for more details.

  • cert – passed directly to Session, see X.509 for more details.

  • request_kw – other keywords are passed to igwn_auth_utils.get()

Returns

segments (segments.segmentlist) – the list of [start, end) intervals during which data are available for the relevant dataset.

Examples

>>> find_times(
...     "V",
...     "V1_GWOSC_O3a_4KHZ_R1",
...     gpsstart=1238249472,
...     gpsend=1239429120,
...     host="datafind.gw-openscience.org",
... )
[segment(1238249472, 1238417408), segment(1238421504, 1238605824), segment(1238609920, 1238827008), segment(1238839296, 1239429120)]
Raises

requests.RequestsException – if the request fails for any reason