childmindresearch / wristpy

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

Task: Implement angle_relative_to_horizontal metric in metrics.py #29

Closed frey-perez closed 3 months ago

frey-perez commented 3 months ago

Description

The goal is the implementation of a angle_relative_to_horizontal (angle-z) function in metrics.py, which as the name suggests will calculate the angle between the horizontal plane, the acceleration vector. The wristpy package will rely on this metric for accurately assessing spatial orientation and movement patterns. Having accurate spatial orientation data will be a critical component of behavioral assessments and sleep-wake cycle evaluation down the line.

The input of the function will be a Measurement object containing the accelereation data and timestamps. The acceleration data will be an ndarray of shape # of samples x 3 cols (x,y,z axis). The timestamps will be a 1D Polars series of datetime.datetime objects. The output will be a new Measurement object in which the value of the measurements will be an ndarray of angle-z values, and the time attribute will be the unaltered from the input.

Tasks

Freeform Notes

No response