obspy.clients.fdsn.mass_downloader.download_helpers.ClientDownloadHelper

class ClientDownloadHelper(client, client_name, restrictions, domain, mseed_storage, stationxml_storage, logger)[source]

Bases: object

Parameters:
  • client (obspy.clients.fdsn.client.Client) – An initialized FDSN client.

  • client_name (str) – The name of the client. Only used for logging.

  • restrictions (Restrictions) – The non-domain related restrictions for the query.

  • domain (Domain subclass) – The domain definition.

  • mseed_storage – The MiniSEED storage settings.

  • stationxml_storage – The StationXML storage settings.

  • logger – An active logger instance.

Public Methods

discard_stations

Discard all stations part of any of the already existing client download helper instances.

download_mseed

Actually download MiniSEED data.

download_stationxml

Actually download the StationXML files.

filter_stations_based_on_minimum_distance

Removes stations until all stations have a certain minimum distance to each other.

get_availability

Queries the current client for information on what stations are available given the spatial and temporal restrictions.

prepare_mseed_download

Prepare each Station for the MiniSEED downloading stage.

prepare_stationxml_download

Prepare each Station for the StationXML downloading stage.

sanitize_downloads

Should be run after the MiniSEED and StationXML downloads finished.

Private Methods

Warning

Private methods are mainly for internal/developer use and their API might change without notice.

ClientDownloadHelper._check_downloaded_data()[source]

Read the downloaded data, set the proper status flags and remove data that does not meet the QC criteria. It just checks the downloaded data for minimum length and gaps/overlaps.

Returns the downloaded_bytes and the discarded_bytes.

ClientDownloadHelper._parse_miniseed_filenames(filenames, restrictions)[source]
ClientDownloadHelper._remove_failed_and_ignored_stations()[source]

Removes all stations that have no time interval with either exists or downloaded status.

Special Methods

ClientDownloadHelper.__bool__()[source]
ClientDownloadHelper.__delattr__(name, /)

Implement delattr(self, name).

ClientDownloadHelper.__dir__()

Default dir() implementation.

ClientDownloadHelper.__eq__(value, /)

Return self==value.

ClientDownloadHelper.__format__(format_spec, /)

Default object formatter.

ClientDownloadHelper.__ge__(value, /)

Return self>=value.

ClientDownloadHelper.__getattribute__(name, /)

Return getattr(self, name).

ClientDownloadHelper.__gt__(value, /)

Return self>value.

ClientDownloadHelper.__hash__()

Return hash(self).

ClientDownloadHelper.__init__(client, client_name, restrictions, domain, mseed_storage, stationxml_storage, logger)[source]
ClientDownloadHelper.__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

ClientDownloadHelper.__le__(value, /)

Return self<=value.

ClientDownloadHelper.__len__()[source]
ClientDownloadHelper.__lt__(value, /)

Return self<value.

ClientDownloadHelper.__ne__(value, /)

Return self!=value.

ClientDownloadHelper.__new__(**kwargs)
ClientDownloadHelper.__reduce__()

Helper for pickle.

ClientDownloadHelper.__reduce_ex__(protocol, /)

Helper for pickle.

ClientDownloadHelper.__repr__()

Return repr(self).

ClientDownloadHelper.__setattr__(name, value, /)

Implement setattr(self, name, value).

ClientDownloadHelper.__sizeof__()

Size of object in memory, in bytes.

ClientDownloadHelper.__str__()[source]
ClientDownloadHelper.__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).