Skip to content

Commit

Permalink
scipy hanning
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasLecocq committed Jul 2, 2024
1 parent c4c4ffa commit 62e7f41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion msnoise/move2obspy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
2 changes: 1 addition & 1 deletion msnoise/s03compute_no_rotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:]))
Expand Down

0 comments on commit 62e7f41

Please sign in to comment.