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

rel_calib_stack: fix bug when using non-default windowing overlap fraction #1821

Merged
merged 2 commits into from Jun 21, 2017

Conversation

megies
Copy link
Member

@megies megies commented Jun 21, 2017

In signal.calibration.rel_calib_stack there's a bug in spectrum scaling when using a non-default window overlap fraction (default is 0.5, i.e. 50% overlap). This bug has been in there from the very beginning. So, all calculations ever made using this function with non-default overlap fraction are wrong.

Here's a plot from the regression test I added, showing how spectra are offset for different choices of window overlap fraction:

figure_1-1

The reason was that computation of how many windows will be computed did not account for used overlap. Fix is trivial, as the FFT helper routine returns all individual FFTs, we can just look at the shape of the FFT result.

I'll add a regression test and a fix.

@megies megies added .signal issues related to our signal processing functionalities bug confirmed bug labels Jun 21, 2017
@megies megies added this to the 1.1.0 milestone Jun 21, 2017
@megies megies self-assigned this Jun 21, 2017
@megies
Copy link
Member Author

megies commented Jun 21, 2017

CC @jwassermann @mbdb since you're using this..

In signal.calibration.rel_calib_stack there's a bug in spectrum scaling
when using a non-default window overlap fraction (default is 0.5, i.e.
50% overlap). This bug likely has been in there for ages.

The reason was that computation of how many windows will be computed did
not account for used overlap. Fix is trivial, as the FFT helper routine
returns all individual FFTs, we can just look at the shape of the FFT
result.
@megies megies merged commit 9f951c1 into master Jun 21, 2017
@megies megies deleted the fix_relcalstack branch June 21, 2017 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed bug .signal issues related to our signal processing functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant