run_at_gps

gwosc.datasets.run_at_gps(gps, host='https://gwosc.org')

Returns the name of the open-data run dataset matching the GPS time

This function will return the first event for which start <= gps < end

Parameters:
  • gps (float) – The GPS time to locate

  • host (str, optional) – the URL of the GWOSC host to query, defaults to https://gwosc.org

Returns:

run – the name of the matched observing run

Return type:

str

Raises:

ValueError – if no datasets are found matching the GPS time

Examples

>>> from gwosc.datasets import run_at_gps
>>> run_at_gps(1135136350)
'O1'
>>> run_at_gps(0)
ValueError: no run dataset found containing GPS 0