From 76f04bec6f86f8f8761c5454ef35cddce7c8fd51 Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Mon, 6 Jul 2015 10:20:25 +0200 Subject: [PATCH] [task] starting method to make PyLoT capable of restituting waveform data with given inventory xml files --- pylot/core/read/data.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pylot/core/read/data.py b/pylot/core/read/data.py index 95f3ee63..dd54f51b 100644 --- a/pylot/core/read/data.py +++ b/pylot/core/read/data.py @@ -4,7 +4,7 @@ import os from obspy.core import (read, Stream, UTCDateTime) -from obspy import readEvents +from obspy import readEvents, read_inventory from obspy.core.event import (Event, Catalog) from pylot.core.read import readPILOTEvent @@ -146,6 +146,13 @@ class Data(object): self.wfdata = self.getOriginalWFData().copy() self.dirty = False + def restituteWFData(self, fninventory): + st = self.getWFData() + inv = read_inventory(fninventory) + st.attach_response(inv) + pre_filt = (0.005, 0.006, 30.0, 35.0) # set in autoPyLoT.in + st.remove_response(output='VEL', pre_filt=pre_filt) + def getEvtData(self): return self.evtdata