obsplus.load_dataset

obsplus.load_dataset(name, silent=False)

Get a loaded dataset.

Will ensure all files are downloaded and the appropriate data are loaded into memory.

Parameters:

name (Union[str, DataSet]) – The name of the dataset to load or a DataSet object. If a DataSet object is passed a copy of it will be returned.

Return type:

TypeVar(DataSetType, bound= DataSet)

Examples

>>> # --- Load an example dataset for testing
>>> import obsplus
>>> ds = obsplus.load_dataset('default_test')
>>> # If you plan to make changes to the dataset be sure to copy it first
>>> # The following will copy all files in the dataset to a tmpdir
>>> ds2 = obsplus.copy_dataset('default_test')
>>> # --- Use dataset clients to load waveforms, stations, and events
>>> cat = ds.event_client.get_events()
>>> st = ds.waveform_client.get_waveforms()
>>> inv = ds.station_client.get_stations()
>>> # --- get a fetcher for more "dataset aware" querying
>>> fetcher = ds.get_fetcher()