Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2021 Oct 19;17(10):e1009514.
doi: 10.1371/journal.pcbi.1009514. eCollection 2021 Oct.

pyActigraphy: Open-source python package for actigraphy data visualization and analysis

Affiliations

pyActigraphy: Open-source python package for actigraphy data visualization and analysis

Grégory Hammad et al. PLoS Comput Biol. .

Abstract

Over the past 40 years, actigraphy has been used to study rest-activity patterns in circadian rhythm and sleep research. Furthermore, considering its simplicity of use, there is a growing interest in the analysis of large population-based samples, using actigraphy. Here, we introduce pyActigraphy, a comprehensive toolbox for data visualization and analysis including multiple sleep detection algorithms and rest-activity rhythm variables. This open-source python package implements methods to read multiple data formats, quantify various properties of rest-activity rhythms, visualize sleep agendas, automatically detect rest periods and perform more advanced signal processing analyses. The development of this package aims to pave the way towards the establishment of a comprehensive open-source software suite, supported by a community of both developers and researchers, that would provide all the necessary tools for in-depth and large scale actigraphy data analyses.

PubMed Disclaimer

Conflict of interest statement

The authors have declared that no competing interests exist.

Figures

Fig 1
Fig 1. Diagram of the code architecture.
Fig 2
Fig 2. Visualization example of average daily profiles obtained with pyActigraphy using example files included in the package.
Fig 3
Fig 3. Visualization example of actigraphy data, overlaid with periods (green: Nap, grey: Night, red: Device not worn) reported in the sleep diary example file included in the package.
Fig 4
Fig 4. Visualization example of actigraphy data, overlaid with periods scored as “active” (0) or “rest” (1) by Roenneberg’s algorithm [33] for two different settings (full line: Default parameter values, dash line: With a threshold set at 0.25 of the activity trend).

Similar articles

Cited by

References

    1. Ancoli-Israel S, Cole R, Alessi C, Chambers M, Moorcroft W, Pollak CP. The Role of Actigraphy in the Study of Sleep and Circadian Rhythms. Sleep. 2003;26(3):342–392. doi: 10.1093/sleep/26.3.342 - DOI - PubMed
    1. Oosterman JM, Van Someren EJW, Vogels RLCC, Van Harten B, Scherder EJAA. Fragmentation of the rest-activity rhythm correlates with age-related cognitive deficits. Journal of sleep research. 2009;18(1):129–35. doi: 10.1111/j.1365-2869.2008.00704.x - DOI - PubMed
    1. Van Someren EJW, Oosterman JM, Van Harten B, Vogels RL, Gouw AA, Weinstein HC, et al.. Medial temporal lobe atrophy relates more strongly to sleep-wake rhythm fragmentation than to age or any other known risk. Neurobiology of Learning and Memory. 2018; p. 0–1. - PubMed
    1. Lim ASP, Yu L, Costa MD, Leurgans SE, Buchman AS, Bennett DA, et al.. Increased Fragmentation of Rest-Activity Patterns Is Associated With a Characteristic Pattern of Cognitive Impairment in Older Individuals. Sleep. 2012;35(5):633–640. doi: 10.5665/sleep.1820 - DOI - PMC - PubMed
    1. Lim ASP, Kowgier M, Yu L, Buchman AS, Bennett DA. Sleep Fragmentation and the Risk of Incident Alzheimer’s Disease and Cognitive Decline in Older Persons. Sleep. 2013;36(7):1027–1032. doi: 10.5665/sleep.2802 - DOI - PMC - PubMed

Publication types