Previous topic

Module tracesFunctions

Next topic

Module tracesUtil

This Page

Classes and methods to save the traces.

Module tracesWriter

Inheritance diagram of WriterTraces, WriterOneTraceNpy, WriterOneTraceMat

class traces.tracesWriter.WriterTraces(param)

Provide a method getNameDirAndFileSave() to get the path directory and the file name for save the traces.

Parameter :

param : obj

Object with attributes FormatTraceSave, SaveDirectory, ComponentStation.

getNameDirAndFileSave(Date, Station)

Return a path directory dependent of the date and a file name dependent of the station.

tryMakeDirectories(DirSave)

Write all the directories defined in the path directory with right 770 if they do not exist.

Parameter :
DirSave: str

The path directory.

Note

If it is not possible, catch the exception and print a message. (Try twice for concurrency problems.)

writeOneTrace()

Abstract method, not implemented.

printFileSave(DirSave, FileSave)
class traces.tracesWriter.WriterOneTraceNpy(param)
Parameter :

param : obj

Object with attributes FormatTraceSave, SaveDirectory, ComponentStation.

writeOneTrace(DirSave, FileSave, Trace)

Save a trace with the file path given and the format numpy (.npy).

Parameters :
Trace: numpy array

The trace to be saved.

DirSave: str

Directory name to save the trace.

FileSave: str

File name of the trace saved.

(Try twice to save the trace for concurrency problems.)

class traces.tracesWriter.WriterOneTraceMat(param)
Parameter :

param : obj

Object with attributes FormatTraceSave, SaveDirectory, ComponentStation.

writeOneTrace(DirSave, FileSave, Trace)

Save a trace with the file path given and the format matlab (.mat).

Parameters :
Trace: numpy array

The trace to be saved.

DirSave: str

Directory name to save the trace.

FileSave: str

File name of the trace saved.

(Try twice to save the trace for concurrency problems.)

Note

The field in the matlab structure for the array of the trace is ‘trace’.


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].