Basic usage

The GWDataFind service allows users to query for the location of Gravitational-Wave data files containing data associated with gravitational-wave detectors.

This package provides a number of functions to make requests to a GWDataFind server with authorization credential handling.

Top-level API

The gwdatafind top-level module provides a number of convenience functions to perform single queries without a persistent connection:

ping

Ping the GWDataFind host to test for life.

find_observatories

Query a GWDataFind host for observatories with available data.

find_types

Query a GWDataFind host for dataset types.

find_times

Query a GWDataFind host for times in which data are available.

find_url

Query a GWDataFind host for the URL of a single filename.

find_urls

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

find_latest

Query a GWDataFind host for the latest file in a given dataset.

For example:

A simple query for URLs associated with Open Data
>>> from gwdatafind import find_urls
>>> urls = find_urls(
...     "L",
...     "L1_GWOSC_O2_4KHZ_R1",
...     1187008880,
...     1187008884,
...     host="datafind.gwosc.org",
... )
>>> print(urls)
['file://localhost/cvmfs/gwosc.osgstorage.org/gwdata/O2/strain.4k/frame.v1/L1/1186988032/L-L1_GWOSC_O2_4KHZ_R1-1187008512-4096.gwf']

The above examples work well for ‘one-shot’ queries where only a single result is required. For repeated queries, or similar, that require multiple connections to the same GWDataFind host, see Session usage.

Command-line interface

GWDataFind also provides a command-line interface accessible via module execution (python -m gwdatafind) or the gw_data_find entry point script. See gw_data_find.