Repository navigation
FIX: Fix incorrect behavior for snip when smoothing or using filter_order > 2 - #94
Conversation
Subtle difference between pybaselines and ROOT for filter order 4, which isn't really easy to figure out, so ignoring higher orders for now.
Filters should use the smoothed data rather than only using the smoothed data in the comparison replacement.
Outer indices for filters > 2 were incorrectly at 0 and -1 rather than i += (order//2) * (i // (order//2)). Also modified end indexing to always use `num_y - i` rather than `-i`, just for readability.
|
Unrelated to this PR, but the min dependancy test is giving the following warning for I guess when sparse matrices are used, they don't like zeros within the weights from masking during the W @ P calc; I remember I had to add a shim for the 2D aspls version years ago to add eps to avoid the same warning. Not sure it's worth addressing since sparse matrices are only used if the scipy version is < 1.12, and the min versions will get bumped before the next release. According to SPEC 0, technically scipy 1.15 is the oldest I should be supporting, so maybe I could start following that? |
Description
Closes issue #93. Fixes 2 bugs in snip that were found when adding validation tests against ROOT's implementation, which was written by Morháč':
i +- (order//2) * (i / (order//2)), ie. 0 and2i, rather thani +- (order//2) * (i // (order//2)).Added a validation test against data files output by ROOT's implementation. Also added a docstring example for snip since I was here, to finally start following up on #48.
Type of Pull Request
Pull Request Checklist
if applicable.