$ python -m pip install gwdatafind

Supported python versions: 2.7, 3.4+.


The client library for the LIGO Data Replicator (LDR) service.

The DataFind service allows users to query for the location of Gravitational-Wave Frame (GWF) files containing data from the current gravitational-wave detectors.

This package provides the HTTPConnection and HTTPSConnection class objects, for connecting to an LDR server in open and authenticated access modes respectively. The authenticated HTTPSConnection requires users have a valid X509 certificate that is registered with the server in question.


The following convenience functions are provided to perform single queries without a persistent question:


Ping the LDR host to test for life.


Query the LDR host for observatories.


Query the LDR host for frame types.


Query the LDR for times for which files are avaliable.


Query the LDR host for a single filename.


Find all files of the given type in the [start, end) GPS interval.


Query for the most recent file of a given type.

For example:

>>> from gwdatafind import find_urls
>>> urls = find_urls("L", "L1_GWOSC_O2_4KHZ_R1", 1187008880, 1187008884,
...                  host="")
>>> print(urls)

Additionally, one can manually open a connection using the connect() function, and then perform multiple queries. The connect() function will automatically select the correct protocol based on the host given, and will attempt to access any required X509 credentials.

For example:

>>> from gwdatafind import connect
>>> conn = connect(host="", port=443)
>>> obs = conn.find_observatories()
>>> print(obs)
['H', 'V', 'L']
>>> urls = {}
>>> for ifo in obs:
...     urls[ifo] = conn.find_urls(ifo, "{}1_GWOSC_O2_4KHZ_R1".format(ifo),
...                                1187008880, 1187008884)
>>> print(urls)
{'H': ['file://localhost/cvmfs/'],
 'V': ['file://localhost/cvmfs/'],
 'L': ['file://localhost/cvmfs/']}