dataset_type

gwosc.datasets.dataset_type(dataset, host='https://gwosc.org', session=None, pagesize=None)

Returns the type of the named dataset

Parameters:
dataset

The name of the dataset to match

host='https://gwosc.org'

the URL of the GWOSC host to query

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:

type – the type of the dataset, one of ‘run’, ‘event’, or ‘catalog’

Return type:

str

Raises:

ValueError – if this dataset cannot be matched

Examples

>>> from gwosc.datasets import dataset_type
>>> dataset_type("O1")
'run'