dqsegdb2 PyPI release badge dqsegdb2 license dqsegdb2 DOI

dqsegdb2 is a simplified Python implementation of the DQSEGDB API as defined in LIGO-T1300625.

Incomplete API

This package does not provide a complete implementation of the API as defined in LIGO-T1300625, and only supports GET requests for a subset of information available from a DQSEGDB server. Any users wishing to make POST requests should refer to the official DQSEGDB Python client available from https://pypi.org/project/dqsegdb/.

However, dqsegdb2 is light, with minimal dependencies, so might be useful for people only interested in querying for segment information.


DQSEGDB2 can be installed with Pip:

python -m pip install dqsegdb2

or with Conda from conda-forge:

conda install -c conda-forge dqsegdb2

Basic usage

from dqsegdb2.query import query_segments
print(query_segments('G1:GEO-SCIENCE:1', 1000000000, 1000001000))


The dqsegdb.query module defines the following functions:

query_names(ifo[, host])

Query for all defined flags for the given ifo

query_segments(flag, start, end[, host, ...])

Query for segments for the given flag in a [start, stop) interval

query_versions(flag[, host])

Query for defined versions for the given flag

scitoken_audience(url[, include_any])

Return the expected aud claim to authorize a request to url.

The dqsegdb.api module defines the following functions:

name_query_url(host, ifo)

Returns the URL to use in querying for flag names

segment_query_url(host, ifo, name, version)

Returns the URL to use in querying for segments

version_query_url(host, ifo, name)

Returns the URL to use in querying for flag versions

Last update: May 23, 2023