find_observatories
- gwdatafind.find_observatories(match=None, host=None, 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.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
obs (
list
ofstr
) – the list of known observatories prefices (and combinations)- Raises
requests.RequestsException – if the request fails for any reason
Examples
>>> find_observatories(host="datafind.gw-openscience.org") ['L', 'V', 'H'] >>> find_observatories(match="H", host="datafind.gw-openscience.org") ['H']