find_observatories¶
- gwdatafind.find_observatories(
- match=None,
- host=None,
- api='v1',
- ext='gwf',
- session=None,
- **request_kw,
Query a GWDataFind host for observatories with available data.
- Parameters:
match (
str,re.Pattern, optional) – restrict returned observatories to those matching a regular expression.host (
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:
obs (
listofstr) – the list of known observatories prefices (and combinations)- Raises:
requests.RequestException – if the request fails for any reason
Examples
>>> find_observatories(host="datafind.gwosc.org") ['L', 'V', 'H'] >>> find_observatories(match="H", host="datafind.gwosc.org") ['H']