Make some tests on margin and chunki with more care.
@@ -34,7 +34,7 @@ class PhaseShiftRecording(BasePreprocessor):
The phase shifted recording object
"""
name = 'phase_shift'
- def __init__(self, recording, margin_ms=50., inter_sample_shift=None):
+ def __init__(self, recording, margin_ms=10., inter_sample_shift=None):
if inter_sample_shift is None:
assert "inter_sample_shift" in recording.get_property_keys(), "'inter_sample_shift' is not a property!"
sample_shifts = recording.get_property("inter_sample_shift")
@@ -99,7 +99,7 @@ phase_shift.__doc__ = PhaseShiftRecording.__doc__
def apply_fshift_sam(sig, sample_shifts, axis=0):
sig_f = np.fft.rfft(sig, axis=axis)
omega = np.linspace(0, np.pi, sig_f.shape[axis])
- # broadcast omega and sample_shifts
+ # broadcast omega and sample_shifts depend the axis
if axis == 0:
shifts = omega[:, np.newaxis] * sample_shifts[np.newaxis, :]
else:
