event_at_gps
- gwosc.datasets.event_at_gps(gps, host='https://gwosc.org', tol=1)
Returns the name of the open-data event matching the GPS time
This function will return the first event for which
|eventgps - gps| < = tol
.- Parameters:
gps (
float
) – The GPS time to locatehost (
str
, optional) – the URL of the GWOSC host to query, defaults to https://gwosc.orgtol (
float
, optional) – the search window (in seconds), default:1
- Returns:
event – the name of the matched event
- Return type:
- Raises:
ValueError – if no events are found matching the GPS time
Examples
>>> from gwosc.datasets import event_at_gps >>> event_at_gps(1187008882) 'GW170817' >>> event_at_gps(1187008882, tol=.1) ValueError: no event found within 0.1 seconds of 1187008882