Package: pyActigraphy
pyActigraphyOpen-source python package for actigraphy and light exposure data visualization and analysis.This package is meant to provide a comprehensive set of tools to:read native actigraphy data files with various formats:Actigraph: wGT3X-BTCamNtech: Actiwatch 4, 7, L(-Plus) and MotionWatch 8Condor Instrument: ActTrust 2Daqtix: DaqtometerRespironics: Actiwatch 2 and Actiwatch Spectrum (plus)Tempatilumi (CE Brasil)NEWread actigraphy data format from theMESA dataset, hosted by theNational Sleep Research Resource.NEWread actigraphy data files produced by theaccelerometerpackage that can be used to calibrate and convert raw accelerometer data recorded with:Axivity: AX3, device used by UK Biobank,Activinsights: GENEActiv, used by the Whitehall II study.NEWread light exposure data recorded by the aforementioned devices (when available)clean the raw data and mask spurious periods of inactivityproduce activity profile plotsvisualize sleep agendas and compute summary statisticscalculate typical wake/sleep cycle-related variables:Non-parametric rest-activity variables: IS(m), IV(m), RAActivity or Rest  fragmentation: kRA, kARSleep regularity index (SRI)NEWcompute light exposure metrics (TAT,\(MLit^{500}\), summary statistics, …)automatically detect rest periods using various algorithms (Cole-Kripke, Sadeh, …, Crespo, Roenneberg)perform complex analyses:Cosinor analysisDetrended Fluctuation Analysis (DFA)Functional Linear Modelling (FLM)Locomotor Inactivity During Sleep (LIDS)Singular Spectrum Analysis (SSA)and much more…CitationWe are very pleased to announce that thev1.0version of the pyActigraphy package has been published. So, if you find this package useful in your research, please consider citing:Hammad G, Reyt M, Beliy N, Baillet M, Deantoni M, Lesoinne A, et al. (2021) pyActigraphy: Open-source python package for actigraphy data visualization and    analysis. PLoS Comput Biol 17(10): e1009514.https://doi.org/10.1371/journal.pcbi.1009514pyLightIn the context of the Daylight Academy Project,The role of daylight for humansand
thanks to the support of its members, Dr. Mirjam Münch and Prof.Manuel Spitschan,
a pyActigraphy module for analysing light exposure data has been developed,pyLight.
This module is part of the Human Light Exposure Database and is included in pyActigraphy versionv1.1and higher.A manuscript describing thepyLightmodule is available as apreprint.Code and documentationThe pyActigraphy package is open-source and its source code is accessibleonline.An online documentation of the package is also availablehere.
It containsnotebooksillustrating various functionalities of the package. Specific tutorials for the processing and the analysis of light exposure data with pyLight are also available.InstallationIn a (bash) shell, simply type:For users:pip3installpyActigraphyTo update the package:pip3install-UpyActigraphyFor developers:gitclonegit@github.com:ghammad/pyActigraphy.gitcdpyActigraphy/gitcheckoutdeveloppip3install-e.Quick startThe following example illustrates how to calculate the interdaily stability
with the pyActigraphy package:>>>importpyActigraphy>>>rawAWD=pyActigraphy.io.read_raw_awd('/path/to/your/favourite/file.AWD')>>>rawAWD.IS()0.6900175913031027>>>rawAWD.IS(freq='30min',binarize=True,threshold=4)0.6245582891144925>>>rawAWD.IS(freq='1H',binarize=False)0.5257020914453097ContributingThere are plenty of ways to contribute to this package, including (but not limiting to):report bugs (and, ideally, how to reproduce the bug)suggest improvementsimprove the documentationAuthorsGrégory Hammad@ghammad-Initial and main developerMathilde Reyt@ReytMathildeSee also the list ofcontributorswho participated in this project.LicenseThis project is licensed under the GNU GPL-3.0 License - see theLICENSEfile for detailsAcknowledgmentsAubin Ardois@aardoideveloped the first version of the MTN class during his internship at the CRC, in May-August 2018.The CRC colleagues for their support, ideas, etc.