digitraceslab / niimpy

Python module for analysis of behavorial data
https://digitraceslab.github.io/niimpy/
MIT License
12 stars 7 forks source link

Standard duration units #275

Closed rantahar closed 7 months ago

rantahar commented 1 year ago

How should we standardize duration units?

The mHealth total sleep time measure includes a value and a unit. The units can range from picoseconds to years. For total sleep time anything from minute to years could make sense.

Options:

Maybe I would go with the second. It's relatively simple while still helping the user.

rantahar commented 1 year ago

The mHealth reader should normalize the durations to a single unit for each file read.

rantahar commented 1 year ago

In preprocessing we get duration columns as TimeDelta. These come directly from subtracting DateTime objects. Using them here as well would make sense.

rantahar commented 7 months ago

Solved in PR #300