Scores each epoch sleep ("S") or wake ("W") from the z-angle by
the van Hees et al. (2015) sustained-inactivity-bout rule: an interval with no
arm-posture change exceeding angle_thresh degrees for at least
time_thresh minutes is sustained inactivity (sleep). The output has the
same shape as sleep.cole.kripke, so it feeds
sleep.regularity.index, lids and the rest consumers
directly. Intersect it with rest.spt via sleep.from.spt.
Value
Character vector of "S"/"W", one per epoch. A day with
fewer than 10 posture changes is scored all "S" (sustained
inactivity, to be gated by the SPT window and wear time).
References
van Hees VT, Sabia S, Anderson KN, Denton SJ, Oliver J, Catt M, Abell JG, Kivimaki M, Trenell MI, Singh-Manoux A (2015). “A novel, open access method to assess sleep duration using a wrist-worn accelerometer.” PLoS ONE, 10(11), e0142533. doi:10.1371/journal.pone.0142533 .
