From 62e7f4190d2feffd9511e66e06368dbba6dd7006 Mon Sep 17 00:00:00 2001 From: tlecocq Date: Tue, 2 Jul 2024 14:51:35 +0200 Subject: [PATCH] scipy hanning --- msnoise/move2obspy.py | 2 +- msnoise/s03compute_no_rotation.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/msnoise/move2obspy.py b/msnoise/move2obspy.py index c41527b..5a98971 100644 --- a/msnoise/move2obspy.py +++ b/msnoise/move2obspy.py @@ -267,7 +267,7 @@ def whiten2(fft, Nfft, low, high, porte1, porte2, psds, whiten_type): taper[high:] *= 0 taper *= taper - hann = scipy.signal.hanning(porte2 - porte1 + 1) # / float(porte2-porte1) + hann = scipy.signal.windows.hanning(porte2 - porte1 + 1) # / float(porte2-porte1) for i in range(fft.shape[0]): if whiten_type == "PSD": diff --git a/msnoise/s03compute_no_rotation.py b/msnoise/s03compute_no_rotation.py index f133727..351abd4 100644 --- a/msnoise/s03compute_no_rotation.py +++ b/msnoise/s03compute_no_rotation.py @@ -377,7 +377,7 @@ def main(loglevel="INFO"): # TODO should not hardcode 4 percent! wlen = int(0.04 * data.shape[1]) - taper_sides = scipy.signal.hanning(2 * wlen + 1) + taper_sides = scipy.signal.windows.hanning(2 * wlen + 1) taper = np.hstack( (taper_sides[:wlen], np.ones(data.shape[1] - 2 * wlen), taper_sides[len(taper_sides) - wlen:]))