childmindresearch / wristpy

https://childmindresearch.github.io/wristpy/
GNU Lesser General Public License v2.1
2 stars 1 forks source link

feat: Implementing GGIR autocalibration. #50

Closed frey-perez closed 1 month ago

frey-perez commented 2 months ago

Added calibration.py module to wristpy.processing. Implements GGIR's auto-calibration procedure.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.41%. Comparing base (c04e490) to head (8b77c89).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## development #50 +/- ## =============================================== + Coverage 99.16% 99.41% +0.25% =============================================== Files 6 7 +1 Lines 239 343 +104 =============================================== + Hits 237 341 +104 Misses 2 2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

frey-perez commented 1 month ago

@ReinderVosDeWael ready for you to look at again.

ReinderVosDeWael commented 1 month ago

I already was ;D

frey-perez commented 1 month ago

Somethings of note after last commit:

Had to put a mypy ignore command in the get_sampling_rate function because the function now only takes the polars Series and this caused a number of mypy errors. If this is improper I can try and refactor it with more type hinting or just take @Asanto32 suggestion and use the group by dynamic.

Not every test uses the create dummy measure function, some of the tests had pretty specific data and I thought it would be more difficult to understand the assembly of the test if it wasn't spelled out at the top, again happy to change this if necessary.