Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHG: Normalize spectra independent of padding #459

Merged
merged 3 commits into from
Mar 31, 2023

Conversation

tensionhead
Copy link
Contributor

Changes Summary

  • this implements Pascal's original power normalization intention: spectral power is independent of signal length/padding
  • added ft_compat parameter for freqanalysis --> mtmfft to get FT behavior if needed
  • no changes needed for mtmconvol as here the individual segments get not padded (modulo the edges)

Reviewer Checklist

  • Are testing routines present?
  • Do objects in the global package namespace perform proper parsing of their input?
  • Are all docstrings complete and accurate?
  • Is the CHANGELOG.md up to date?

- this implements Pascal's original power normalization intention
- added `ft_compat` parameter for mtmfft to get FT behavior if needed

Changes to be committed:
	modified:   syncopy/specest/freqanalysis.py
	modified:   syncopy/specest/mtmconvol.py
	modified:   syncopy/specest/mtmfft.py
	modified:   syncopy/tests/test_specest.py
@tensionhead tensionhead linked an issue Mar 31, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Mar 31, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.18 🎉

Comparison is base (39a220b) 68.77% compared to head (9c505fe) 68.95%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #459      +/-   ##
==========================================
+ Coverage   68.77%   68.95%   +0.18%     
==========================================
  Files          84       84              
  Lines       10125    10129       +4     
  Branches     2081     2083       +2     
==========================================
+ Hits         6963     6984      +21     
+ Misses       2628     2623       -5     
+ Partials      534      522      -12     
Impacted Files Coverage Δ
syncopy/specest/freqanalysis.py 66.06% <100.00%> (+0.60%) ⬆️
syncopy/specest/mtmconvol.py 93.93% <100.00%> (+6.84%) ⬆️
syncopy/specest/mtmfft.py 100.00% <100.00%> (ø)

... and 7 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tensionhead tensionhead added the FT compat Field Trip compatibility label Mar 31, 2023
Copy link
Collaborator

@dfsp-spirit dfsp-spirit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, and good idea to add an extra parameter for the FT behavior. I guess not everybody will want this.

@dfsp-spirit dfsp-spirit merged commit de07999 into dev Mar 31, 2023
@tensionhead tensionhead deleted the 299-fft-spectral-normalization-and-padding branch March 31, 2023 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FT compat Field Trip compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FFT spectral normalization and padding
2 participants