Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f84da20

Browse filesBrowse files
authored
Merge pull request #9753 from jklymak/spectralorder
FIX: Detrending before windowing _spectral_helper
2 parents c9c3a74 + e661d26 commit f84da20
Copy full SHA for f84da20

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎lib/matplotlib/mlab.py

Copy file name to clipboardExpand all lines: lib/matplotlib/mlab.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,8 +720,8 @@ def _spectral_helper(x, y=None, NFFT=None, Fs=None, detrend_func=None,
720720
if not same_data:
721721
# if same_data is False, mode must be 'psd'
722722
resultY = stride_windows(y, NFFT, noverlap)
723-
resultY = apply_window(resultY, window, axis=0)
724723
resultY = detrend(resultY, detrend_func, axis=0)
724+
resultY = apply_window(resultY, window, axis=0)
725725
resultY = np.fft.fft(resultY, n=pad_to, axis=0)[:numFreqs, :]
726726
result = np.conj(result) * resultY
727727
elif mode == 'psd':

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.