find_urls

gwdatafind.find_urls(site, frametype, gpsstart, gpsend, match=None, urltype='file', on_gaps='warn', host=None, session=None, **request_kw)

Query a GWDataFind host for all URLs for a dataset in an interval.

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

  • frametype (str) – name of dataset to match

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

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

  • match (str, re.Pattern, optional) – regular expression pattern to match URLs against

  • urltype (str, optional) – URL scheme to search for

  • on_gaps (str, optional) –

    what to do when the requested all or some of the GPS interval is not covereed by the dataset, one of:

    • 'error': raise a RuntimeError

    • 'warn': print a warning but return all available URLs

    • 'ignore': return the list of URLs with no warnings

  • 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

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

Raises
  • requests.RequestsException – if the request fails for any reason

  • RuntimeError – if gaps in the dataset are found and on_gaps="error" was given