Skip to content

Commit

Permalink
[FIX] : Importing gaussian from 'scipy.signal' raises an error in Sci…
Browse files Browse the repository at this point in the history
…Py >= 1.13.0. Call 'scipy.signal.windows.gaussian' instead.
shaupert committed Aug 8, 2024
1 parent 0f9e1d5 commit e434362
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion maad/sound/spectral_subtraction.py
Original file line number Diff line number Diff line change
@@ -175,7 +175,7 @@ def remove_background(Sxx, gauss_win=50, gauss_std=25, beta1=1, beta2=1,
mean_profile = np.mean(Sxx, 1)

# White Top Hat (to remove non uniform background) = i - opening(i)
selem = signal.gaussian(gauss_win, gauss_std)
selem = signal.windows.gaussian(gauss_win, gauss_std)
noise_profile = morphology.grey_opening(mean_profile, structure=selem)

# Remove the artefact at the end of the spectrum (2 highest frequencies)

0 comments on commit e434362

Please sign in to comment.