[task] starting method to make PyLoT capable of restituting waveform data with given inventory xml files
This commit is contained in:
parent
a08c9e91e0
commit
76f04bec6f
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user