Package for processing traces from a directory.
| traces.tracesMain | Main functionality: provide a processing of traces. |
| traces.tracesParam | Parameters for the package. |
| traces.tracesGetParam | Get the parameters. |
| traces.tracesDictOfTraces | Make the dictionaries of traces before processing. |
| traces.tracesGeneratorPath | Generators of traces and their informations. |
| traces.tracesTestParam | Test the validity of parameters. |
| traces.tracesTreatment | General methods for the processing. |
| traces.tracesDefineTreatments | Define the treatment of the traces. |
| traces.tracesFunctions | Provides some functions for the processing of traces. |
| traces.tracesWriter | Classes and methods to save the traces. |
| traces.tracesUtil | Some tools for the package. |
| traces.tracesExceptions | Classes of exceptions for the package. |
General workflow
The package traces provides some tools in order to extract traces from a directory and treat them:
General specification
Given:
- A ‘LoadDirectory’.
- A component.
- A set of stations.
- A set of dates.
- A new sampling rate.
- A ‘SaveDirectory’.
Make:
- Extract all the traces from the ‘LoadDirectory’ whose correspond to the component, the set of dates and the set of stations.
- For each station and each day, built a trace whose duration is one day by agglomerating the stub of traces (If values are not defined, they are replaced by zero).
- Make the treatment of the day-traces before resampling (should be defined by the users).
- Make the resampling of the day-traces.
- Make the treatment of the day-traces after resampling (should be defined by the users).
- Save the day-traces in the ‘SaveDirectory’ with architecture: SaveDirectory -> Component -> Year -> Day -> Station.
Optional functionality:
Before processing the traces, for each day, dictionaries (python type) are made (serialize with cPickle) and contains all necessary metadatas (station, starttime, frequency, component, etc..) for all the traces for ordering and make the processing.
If this operation have been already done, you can skip it by setting to False of a boolean parameter in the module traces.tracesParam.
Note
Very useful if only the treatment is changed.
Main restrictions of the specification
General architecture
Architecture of modules (prefix “traces” is omitted):
See also the tutorial
Whisper project: FP7 ERC Advanced grant 227507 (WHISPER).
Codes are develop for the Whisper project (Seismic ambient noise).
If you use this code, specify it is provide by: Whisper project FP7 ERC Advanced grant 227507 (WHISPER).
Author: Xavier Briand.
For questions, send email to xav.briand.whisper@gmail.com with subject begin exactly with [whisper].