get_segments

gwosc.timeline.get_segments(flag, start, end, host='https://gwosc.org', session=None, pagesize=None)

Return the [start, end) GPS segments for this flag

Parameters:
flag

name of flag, e.g. 'H1_DATA'

start

the GPS start time of your query

end

the GPS end time of your query

host='https://gwosc.org'

the URL of the remote GWOSC server

session=None

HTTP session to use for making requests, defaults to using a new session for each API call

pagesize=None

the number of results per page

Returns:

segments – a list of [a, b) GPS segments

Return type:

list of (int, int) tuples