class Saver(object):
Known subclasses: fetchtool.Savers.MSSaver, fetchtool.Savers.QSaver, fetchtool.Savers.SacSaver
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 | enable |
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 |
Undocumented |
| Method | __init__ |
Undocumented |
| Method | __init |
Undocumented |
| Method | _associate |
Associate each trace to a single event in the list. |
| Method | _check |
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 |
Undocumented |
| Method | _ensure |
Undocumented |
| Method | _ensure |
Undocumented |
| Method | _extract |
This is the main class of a new Saver. |
| Method | _fix |
Undocumented |
| Method | _fix |
Undocumented |
| Method | _makechoice |
Undocumented |
| Method | _reqmode |
List the channels orientation that are listed in request for network and station. |
| Method | _resample |
Undocumented |
| Instance Variable | _debug |
Undocumented |
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.
Enable data resample to sps before saving
| Parameters | |
sps:float | A new sampling rate value to ressample data to. |
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:float | The window size in seconds before and after the reference phase to check |
ratio:float | The minimum ratio to save data windows |
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:float | A window in seconds to check for large amplitudes. |
ratio:float | A minimum ratio to save the data. |
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:float | Amount of seconds before the reference phase (value is considered to be absolute) |
postphase:float | Amount of seconds after the reference phase (value is considered to be absolute) |
The main working method.
You should not call this directly. It is used by the downloader.
Remove from the stream the traces that have no evid tag or that have its _f_evid attribute listed in the ids variable
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 | |
int | The number of files written |