The goal is to implement a function that will calculate the moving standard deviation of a measurement object and return a new, downsampled, measurement object. This moving standard deviation (std) 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_std function is necessary as part of the calibration and non-wear detection algorithms.
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
[x] The function will take as input an instance of the Measurement class and an integer defining the window length, in seconds.
[x] The function will implement a dynamically sized window based on the timestamps in Measurement.time and then take the std of each window.
[x] The result of the moving std will be a new instance of the Measurement class and this will be returned.
Description
The goal is to implement a function that will calculate the moving standard deviation of a measurement object and return a new, downsampled, measurement object. This moving standard deviation (std) 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_std function is necessary as part of the calibration and non-wear detection algorithms.
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