obspy.io.gse2.paz.attach_paz
- attach_paz(tr, paz_file)[source]
Attach tr.stats.paz AttribDict to trace from GSE2 paz_file
This is experimental code, nevertheless it might be useful. It makes several assumption on the gse2 paz format which are valid for the geophysical observatory in Fuerstenfeldbruck but might be wrong in other cases.
Attaches to a trace a paz AttribDict containing poles zeros and gain. The A0_normalization_factor is set to 1.0.
- Parameters
tr – An ObsPy trace object containing the calib and gse2 calper attributes
paz_file – path to pazfile or file pointer
>>> from obspy.core import Trace >>> import io >>> tr = Trace(header={'calib': .094856, 'gse2': {'calper': 1}}) >>> f = io.StringIO( ... """CAL1 RJOB LE-3D Z M24 PAZ 010824 0001 ... 2 ... -4.39823 4.48709 ... -4.39823 -4.48709 ... 3 ... 0.0 0.0 ... 0.0 0.0 ... 0.0 0.0 ... 0.4""") >>> attach_paz(tr, f) >>> print(round(tr.stats.paz.sensitivity / 10E3) * 10E3) 671140000.0