Skip to main content

Analysis package for actigraphy data

Project description

https://img.shields.io/badge/License-GPL%20v3-blue.svg https://gitlab.com/ghammad/pyActigraphy/badges/master/pipeline.svg?key_text=CI+tests https://img.shields.io/pypi/v/pyActigraphy.svg https://zenodo.org/badge/DOI/10.5281/zenodo.2537920.svg https://bestpractices.coreinfrastructure.org/projects/6933/badge https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg

pyActigraphy

Open-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-BT

    • CamNtech: Actiwatch 4 and MotionWatch 8

    • Condor Instrument: ActTrust 2

    • Daqtix: Daqtometer

    • Respironics: Actiwatch 2 and Actiwatch Spectrum (plus)

    • Tempatilumi (CE Brasil)

  • NEW read light exposure data recorded by the aforementioned devices (when available)

  • clean the raw data and mask spurious periods of inactivity

  • produce activity profile plots

  • visualize sleep agendas and compute summary statistics

  • calculate typical wake/sleep cycle-related variables:

    • Non-parametric rest-activity variables: IS(m), IV(m), RA

    • Activity or Rest fragmentation: kRA, kAR

    • Sleep regularity index (SRI)

  • NEW compute light exposure metrics (TAT, \(MLit^{500}\), summary statistics, …)

  • automatically detect rest periods using various algorithms (Cole-Kripke, Sadeh, …, Crespo, Roenneberg)

  • perform complex analyses:

    • Cosinor analysis

    • Detrended Fluctuation Analysis (DFA)

    • Functional Linear Modelling (FLM)

    • Locomotor Inactivity During Sleep (LIDS)

    • Singular Spectrum Analysis (SSA)

    • and much more…

Citation

We are very pleased to announce that the v1.0 version 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.1009514

pyLight

In the context of the Daylight Academy Project, The role of daylight for humans and 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 version v1.1 and higher.

A manuscript describing the pyLight module is available as a preprint.

Code and documentation

The pyActigraphy package is open-source and its source code is accessible online.

An online documentation of the package is also available here. It contains notebooks illustrating various functionalities of the package. Specific tutorials for the processing and the analysis of light exposure data with pyLight are also available.

Installation

In a (bash) shell, simply type:

  • For users:

pip3 install pyActigraphy

To update the package:

pip3 install -U pyActigraphy
  • For developers:

git clone git@github.com:ghammad/pyActigraphy.git
cd pyActigraphy/
git checkout develop
pip3 install -e .

Quick start

The following example illustrates how to calculate the interdaily stability with the pyActigraphy package:

>>> import pyActigraphy
>>> 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.5257020914453097

Contributing

There are plenty of ways to contribute to this package, including (but not limiting to):

  • report bugs (and, ideally, how to reproduce the bug)

  • suggest improvements

  • improve the documentation

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the GNU GPL-3.0 License - see the LICENSE file for details

Acknowledgments

  • Aubin Ardois @aardoi developed 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyActigraphy-1.1.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyActigraphy-1.1-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

Details for the file pyActigraphy-1.1.tar.gz.

File metadata

  • Download URL: pyActigraphy-1.1.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.12

File hashes

Hashes for pyActigraphy-1.1.tar.gz
Algorithm Hash digest
SHA256 a9009a9537a538b92d7edfb771dabcc2cc7ca2b60885ec4d68d2e1a1b48154ed
MD5 22a02d0b49dcf9f87260efc172f51a12
BLAKE2b-256 00004125310dfed82ebb00ee0bff8b5e331e6fd0f89be40c9b789b71d083a904

See more details on using hashes here.

File details

Details for the file pyActigraphy-1.1-py3-none-any.whl.

File metadata

  • Download URL: pyActigraphy-1.1-py3-none-any.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.12

File hashes

Hashes for pyActigraphy-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fd6f6d657fb0a77d538c22a9843c7e77a9ebec11aba57773ff01ad865b132757
MD5 449f9bc29c4cf6335e7912d50ff69923
BLAKE2b-256 6c70986f8179543eac5d265b479b096e51883c4a4ab5fe2d699aa79ca2938795

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page