This is a generic sleep-wake cycle detection algorithm for analyzing unlabeled week-long actigraphy data. Researchers who studies physical activities can also use this toolbox to segment the long sequences for better data structures.
This algorithm has been validated against event markers using data from MESA Sleep. The mathemtaical detail of this algorithm and the validation process can be found here: https://royalsocietypublishing.org/doi/epdf/10.1098/rsos.231468
Chen Shanshan and Sun Xinxin. Validating CircaCP: a generic sleep–wake cycle detection algorithm for unlabelled actigraphy data. Royal Society Open Science. 11:5, May 2024.