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 matchframetype (
str
) – name of dataset to matchgpsstart (
int
, optional) – GPS start time of querygpsend (
int
, optional) – GPS end time of querymatch (
str
,re.Pattern
, optional) – regular expression to match against known typeshost (
str
, optional) – the URL/name of the GWDataFind host to query; if not givenget_default_host()
will be used to discover the default host.session (
requests.Session
, optional) – the connection session to use; if not given, aigwn_auth_utils.requests.Session
will be created on-the-fly**request_kw – other keywords are passed to
igwn_auth_utils.requests.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