FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

FIX: Correct output of mlab._spectral_helper when scale_by_freq=False by e-q · Pull Request #4593 · matplotlib/matplotlib · GitHub

Repository navigation

FIX: Correct output of mlab._spectral_helper when scale_by_freq=False - #4593

Merged
tacaswell merged 1 commit into
matplotlib:masterfrom
e-q:fix4328
Jul 16, 2015
Merged

tacaswell merged 1 commit into
matplotlib:masterfrom
e-q:fix4328

Conversation

e-q commented Jul 6, 2015

Copy link
Copy Markdown
Contributor

Closes #4328

Copy link
Copy Markdown
Member

This causes all of the spectral tests to fail.

e-q commented Jul 6, 2015

Copy link
Copy Markdown
Contributor Author

True, didn't check the tests before submitting. In this case, the tests are in error.

Specifically, all of the failures are in test_psd_windowarray_scale_by_freq, which tests assert_allclose(spec_s, spec_n/self.Fs, atol=1e-08), where spec_s is computed with scale_by_freq=True and spec_n is computed with scale_by_freq=False. This equality is only true when using a flat window.

I've chosen to modify the tests to use a flat window, instead of the function's default, which I believe is a Hanning window. If, instead, we want to test with the Hanning window, the test can be modified to calculate the difference in window correction factors.

The tests now seem to pass on my machine, let's see what Travis thinks...

e-q commented Jul 6, 2015

Copy link
Copy Markdown
Contributor Author

Hmm, now the tests are failing by a factor of 100. I'll get back to this soon.

tacaswell added this to the proposed next point release milestone Jul 7, 2015

e-q commented Jul 9, 2015

Copy link
Copy Markdown
Contributor Author

There we go. I used the hanning window after all.

tacaswell added a commit that referenced this pull request Jul 16, 2015
FIX: Correct output of mlab._spectral_helper when scale_by_freq=False
tacaswell merged commit cefab28 into matplotlib:master Jul 16, 2015
e-q deleted the fix4328 branch July 16, 2015 20:08
QuLogic modified the milestones: next point release (1.5.0), proposed next point release (2.1) Oct 13, 2015
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL