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