Commit d1850418 authored by Sebastian Heimann's avatar Sebastian Heimann
Browse files

speed up preprocessing with pre_downsample_deltat option

parent 7f399d39
......@@ -170,6 +170,7 @@ class WavePacketIFC(IFC):
fsmooth = Float.T(optional=True)
fsmooth_factor = Float.T(default=0.1)
pre_downsample_deltat = Float.T(optional=True)
def get_tpad(self):
return 4. / self.get_fsmooth()
......@@ -195,6 +196,10 @@ class WavePacketIFC(IFC):
trs_filt = []
for orig_tr in trs:
tr = orig_tr.copy()
if self.pre_downsample_deltat is not None:
tr.downsample_to(self.pre_downsample_deltat)
tr.bandpass(4, self.fmin, self.fmax, demean=True)
tr.ydata = tr.ydata**2
......@@ -249,6 +254,7 @@ class OnsetIFC(IFC):
fsmooth_factor = Float.T(optional=True)
fnormalize = Float.T(optional=True)
fnormalize_factor = Float.T(optional=True)
pre_downsample_deltat = Float.T(optional=True)
def get_tpad(self):
return 2. / self.get_fnormalize()
......@@ -288,6 +294,9 @@ class OnsetIFC(IFC):
trs_filt = []
for orig_tr in trs:
tr = orig_tr.copy()
if self.pre_downsample_deltat is not None:
tr.downsample_to(self.pre_downsample_deltat)
tr.highpass(4, self.fmin, demean=True)
tr.lowpass(4, self.fmax, demean=False)
tr.ydata = tr.ydata**2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment