removed duplicate detranding of the spectrogram

This commit is contained in:
Félix Boisselier
2024-01-09 10:40:45 +00:00
parent a7cd005f5b
commit 16fabdc895

View File

@@ -61,7 +61,6 @@ def compute_spectrogram(data):
window = np.kaiser(M, 6.) window = np.kaiser(M, 6.)
def _specgram(x): def _specgram(x):
x -= np.mean(x) # Detrending by subtracting the mean value
return spectrogram(x, fs=Fs, window=window, nperseg=M, noverlap=M//2, return spectrogram(x, fs=Fs, window=window, nperseg=M, noverlap=M//2,
detrend='constant', scaling='density', mode='psd') detrend='constant', scaling='density', mode='psd')