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
Presumably shifted uncertainty result for FIRuncFilter for non-stationary uncertainty #183
Comments
Thanks for pointing this out. Could you extend your example above with an application of IIRuncFilter to see how that behaves in that situation? |
One first thing while starting to code on that should be implementing a test, that reveals that erroneous behaviour. |
I will do that. However, I am not fully certain, what's the best way to achieve this. The revised
Yes! However, as long as the |
Then we should simply push towards releasing as soon as possible. Or do we need a backport of this bug fix to 1.x anyway? |
I think, now that I have implemented a fix in PR #184 , we should release that in 1.x. But we should rewrite some tests after the initial 2.0.0 release. |
In cases of non-stationary uncertainty (
king="diag"
), the output ofFIRuncFilter
returns an uncertainty-result, that seems to be shifted.Looking into the code, this is very likely caused by the equations to calculate
UncCov
: L.182 + L.186 + L.190 + L.192. Here,theta
andUlow
are multiplied. However, for values intheta
it holdstheta[i+1]
refers to an earlier point in time thantheta[i]
- while inUlow
it is reversed. Therefore, during the multiplication values are combined, that do not correspond in their time-order. To fix this,theta
probably needs to be reversed, to achieve correct (time-ascending) order.It seems like this misbehaviour is not covered by tests or examples so far. Therefore a suitable test/example should be introduced (Maybe against some MC-method). A comparison with the upcoming
IIRuncFilter
could also be an option.Environment
MWE showing comparison with MC-result
Output of MWE
Current situation:
Expected result:
Note
The effect becomes especially obvious for long filter lengths and if the signal gets appended by many zeros.
The text was updated successfully, but these errors were encountered: