find_types¶
- gwdatafind.find_types(
- site=None,
- match=None,
- host=None,
- api='v1',
- ext='gwf',
- session=None,
- **request_kw,
Query a GWDataFind host for dataset types.
- Parameters:
site (
str, optional) – single-character name of site to match; if not given types for all sites will be returned.match (
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.api (
str, optional) – The API version to use. Defaults to the value of theGWDATAFIND_APIenvironment variable, or"v1"if not set.ext (
str, optional) – the file extension for which to search.session (
requests.Session, optional) – the connection session to use; if not given, aigwn_auth_utils.Sessionwill be created on-the-flytoken – passed directly to
igwn_auth_utils.Session, see SciTokens for more details.token_audience – passed directly to
igwn_auth_utils.Session, see SciTokens for more details.token_scope – passed directly to
igwn_auth_utils.Session, see SciTokens for more details.cert – passed directly to
igwn_auth_utils.Session, see X.509 for more details.request_kw – other keywords are passed to
igwn_auth_utils.get()
- Returns:
- Raises:
requests.RequestException – if the request fails for any reason
Examples
>>> find_types(host="datafind.gwosc.org") ['H2_LOSC_4_V1', 'V1_GWOSC_O3a_16KHZ_R1', 'H1_LOSC_16_V1', 'L1_LOSC_4_V1', 'V1_GWOSC_O2_16KHZ_R1', 'V1_GWOSC_O3a_4KHZ_R1', 'L1_GWOSC_O3a_4KHZ_R1', 'L1_GWOSC_O2_16KHZ_R1', 'L1_GWOSC_O2_4KHZ_R1', 'V1_GWOSC_O2_4KHZ_R1', 'H1_LOSC_4_V1', 'H1_GWOSC_O3a_16KHZ_R1', 'H1_GWOSC_O2_16KHZ_R1', 'H1_GWOSC_O3a_4KHZ_R1', 'L1_GWOSC_O3a_16KHZ_R1', 'H1_GWOSC_O2_4KHZ_R1', 'L1_LOSC_16_V1'] >>> find_types(site='V', host="datafind.gwosc.org") ['V1_GWOSC_O3a_4KHZ_R1', 'V1_GWOSC_O3a_16KHZ_R1', 'V1_GWOSC_O2_4KHZ_R1', 'V1_GWOSC_O2_16KHZ_R1']
(accurate as of Nov 18 2021)