class documentation

The base superclass for Savers

Method disable3ccheck See the disablecompcheck method
Method disablecompcheck Disabling the check of components availability.
Method disableresample Disable resampling after it has been enabled with enableresample
Method enableresample Enable data resample to sps before saving
Method enablermscheck When enabled will check SNR (by the RMS) of data before save
Method enablespikecheck Enable large amplitude check before the reference phase
Method enableTimeWindowCheck Enable a time window check for the downloaded data.
Method work The main working method.
Instance Variable parameters Set of current SAVER parameter
Static Method _decimate_resolver Undocumented
Method __init__ Undocumented
Method __initParameters Undocumented
Method _associate Associate each trace to a single event in the list.
Method _check_minimun_window_size Undocumented
Method _cleanids Remove from the stream the traces that have no evid tag or that have its _f_evid attribute listed in the ids variable
Method _collect Undocumented
Method _ensure_all_components Undocumented
Method _ensure_minimun_rms Undocumented
Method _ensure_no_spike Undocumented
Method _extract This is the main class of a new Saver.
Method _fix_event_headers Undocumented
Method _fix_station_headers Undocumented
Method _makechoice Undocumented
Method _reqmode List the channels orientation that are listed in request for network and station.
Method _resample_data Undocumented
Instance Variable _debug Undocumented
def disable3ccheck(self):

See the disablecompcheck method

def disablecompcheck(self):

Disabling the check of components availability.

Normaly requests that does not have all components are discarded. If disabled, data for stations missing requested components will be accepted to be further processed.

def disableresample(self):

Disable resampling after it has been enabled with enableresample

def enableresample(self, sps):

Enable data resample to sps before saving

Parameters
sps:floatA new sampling rate value to ressample data to.
def enablermscheck(self, window, ratio):

When enabled will check SNR (by the RMS) of data before save

Any traces with SNR ratio < than ratio will not be saved.

Parameters
window:floatThe window size in seconds before and after the reference phase to check
ratio:floatThe minimum ratio to save data windows
def enablespikecheck(self, window, ratio):

Enable large amplitude check before the reference phase

When enabled it will reject requests where any of traces has a large amplitude before the reference fase. Diferently than the rms check this will use the (max-min)/2 ABS amplitude in the window before and after the reference phase to discard bad data.

Parameters
window:floatA window in seconds to check for large amplitudes.
ratio:floatA minimum ratio to save the data.
def enableTimeWindowCheck(self, prephase, postphase):

Enable a time window check for the downloaded data.

When this option is enabled the saver will not save traces that does not have at leasr prephase and postphase seconds before and after the reference phase.

Parameters
prephase:floatAmount of seconds before the reference phase (value is considered to be absolute)
postphase:floatAmount of seconds after the reference phase (value is considered to be absolute)
def work(self, folder, key, request, stream):

The main working method.

You should not call this directly. It is used by the downloader.

parameters =

Set of current SAVER parameter

@staticmethod
def _decimate_resolver(from_sps, to_sps):

Undocumented

def __init__(self, debug=False):
def __initParameters(self):

Undocumented

def _associate(self, stream, request):

Associate each trace to a single event in the list.

def _check_minimun_window_size(self, stream, request):

Undocumented

def _cleanids(self, reason, stream, ids):

Remove from the stream the traces that have no evid tag or that have its _f_evid attribute listed in the ids variable

def _collect(self, items, pattern):

Undocumented

def _ensure_all_components(self, stream, request):

Undocumented

def _ensure_minimun_rms(self, stream, request):

Undocumented

def _ensure_no_spike(self, stream, request):

Undocumented

def _extract(self, folder, key, request, stream):

This is the main class of a new Saver.

When writting a new saver you are responsible to implement this method. This method will receive the destination folder, the key of the request corresponding to the Stream, the request element and the stream with data.

You should write it to the folder.

Parameters:

folder: str
Where you should write the data to
key : str
The key of the request being saved
request : request
The whole request, request[key] is the one being saved
stream : obspy.Stream
The data to be saved.
Returns
intThe number of files written
def _fix_event_headers(self, stream, request):
def _fix_station_headers(self, stream, request):
def _makechoice(self, stream, items):

Undocumented

def _reqmode(self, request, Net, Sta):

List the channels orientation that are listed in request for network and station.

Parameters
request:tupleA request tuple
Net:strThe network code string
Sta:strThe station code string
Returns
strA string with the orientations listed in request for net and sta.
def _resample_data(self, stream, request):

Undocumented

_debug =

Undocumented