Skip to content

Commit

Permalink
hann for 1.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasLecocq committed Dec 21, 2022
1 parent fd3ccd3 commit d241f7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions msnoise/move2obspy.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ def smooth(x, window='boxcar', half_win=3):
# to apply the window at the borders
s = np.r_[x[window_len - 1:0:-1], x, x[-1:-window_len:-1]]
if window == "boxcar":
w = scipy.signal.boxcar(window_len).astype('complex')
w = scipy.signal.windows.boxcar(window_len).astype('complex')
else:
w = scipy.signal.hanning(window_len).astype('complex')
w = scipy.signal.windows.hann(window_len).astype('complex')
y = np.convolve(w / w.sum(), s, mode='valid')
return y[half_win:len(y) - half_win]

Expand Down

0 comments on commit d241f7a

Please sign in to comment.