childmindresearch / wristpy

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

Task: Implement moving_mean in core/computations.py #26

Closed Asanto32 closed 3 months ago

Asanto32 commented 3 months ago

Description

The goal is to implement a function that will calculate the moving mean of a measurement object and return a new, downsampled, measurement object. This moving mean will be implemented using a dynamic time window; we will use the exact time stamps and not the number of samples to find the window size corresponding to the desired window length, in seconds. The moving_mean function is necessary as all metrics are analyzed at an epoch level, not on a per-sample level. The moving_mean function is essentially a non-overlapping sliding window.

The inputs of the function will be a Measurement object, containing the specific sensor data that we want to downsample, the epoch_length (int) that provides the number of seconds that defines the window size. The function returns a new Measurement object with the downsampled sensor data and the new, corresponding time information.

Tasks

Freeform Notes

No response