Skip to content

fix: fixed calculation of differences#74

Draft
manuba95 wants to merge 2 commits intofloodlight-sports:developfrom
manuba95:fix/differences
Draft

fix: fixed calculation of differences#74
manuba95 wants to merge 2 commits intofloodlight-sports:developfrom
manuba95:fix/differences

Conversation

@manuba95
Copy link
Contributor

@manuba95 manuba95 commented Jun 6, 2022

This fixes the unwanted behavior of the numpy gradient and diff functions to replace the first/last value of a NaN-free sequence with a NaNs. The differentiated data now has values where the original data has values and vice versa. This is achieved by the same approach we used to get the filterable sequences for the low pass filter.
Additionally, a minor bug in the call of the numpy diff function was fixed.

@draabe
Copy link
Contributor

draabe commented Jun 8, 2022

Hi, thanks for pointing this out.

As we are having similar considerations in the filter functions or ApEn calculation, I think this requires a bigger refactor for
1.) generalizing the functionality for sequence-finding (refactoring the private _get_filterable_and_short_sequences function) and
2.) column- and sequence wise application of functions.

So I'm making this a draft for now and put this on the priority list for the next major update!

@draabe draabe marked this pull request as draft June 8, 2022 15:14
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.

2 participants