wadpac / GGIR

Code corresponding to R package GGIR
https://wadpac.github.io/GGIR/
Apache License 2.0
94 stars 60 forks source link

Option to specify or auto-detect desired order of sleep 'guider' methods to be used #1156

Closed vincentvanhees closed 2 weeks ago

vincentvanhees commented 2 months ago

This is something I currently do not have time/funding to work on, but it would be good to have in the future.

At the moment we specify one sleep detection method and if that fails there is some hard-coded backup mechanism that is a bit tailored to wrist-worn sensors. For example: If sleeplog is used but missing => use HDCZA => If could also not be derived then use L5+/- 12 hours.

However, this is not logical. For example, if we specify guider "NotWorn" then the fall back option would be L5+/- 12 hours, while maybe we want this to be HDCZA for studies with wrist placement. Or another example, if we specify HDCZA and it is clear from the data that sensor was not worn during the night then it may be best to fall back on "NotWorn".

To address this I think we need:

vincentvanhees commented 2 months ago

Commit link above shows my fix for this issue in relation to NotWorn guider.

Or another example, if we specify HDCZA and it is clear from the data that sensor was not worn during the night then it may be best to fall back on "NotWorn".

This is actually not needed, because HDCZA can already consider nonwear to be part of SPT.

vincentvanhees commented 1 month ago

re-open because I am currently making further updates to this.