Python-based open source package for actigraphy data analysis
.. image:: https://img.shields.io/badge/License-GPL%20v3-blue.svg :target: https://www.gnu.org/licenses/gpl-3.0 .. image:: https://gitlab.com/ghammad/pyActigraphy/badges/master/pipeline.svg?key_text=CI+tests :target: https://gitlab.com/ghammad/pyActigraphy/commits/master .. .. image:: https://gitlab.com/ghammad/pyActigraphy/badges/master/coverage.svg .. :target: https://gitlab.com/ghammad/pyActigraphy/commits/master .. image:: https://img.shields.io/pypi/v/pyActigraphy.svg :target: https://pypi.org/project/pyActigraphy .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.2537920.svg :target: https://doi.org/10.5281/zenodo.2537920 .. image:: https://bestpractices.coreinfrastructure.org/projects/6933/badge :target: https://bestpractices.coreinfrastructure.org/projects/6933 .. image:: https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg :target: CODE_OF_CONDUCT.md
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:
..
NEW read actigraphy data format from the MESA dataset <https://sleepdata.org/datasets/mesa>
, hosted by the National Sleep Research Resource <https://sleepdata.org>
.
NEW read actigraphy data files produced by the accelerometer <https://biobankaccanalysis.readthedocs.io/en/latest/index.html>
_ package that can be used to calibrate and convert raw accelerometer data recorded with:
..
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:
..
NEW compute light exposure metrics (TAT, :math:MLit^{500}
, summary statistics, ...)
automatically detect rest periods using various algorithms (Cole-Kripke, Sadeh, ..., Crespo, Roenneberg)
perform complex analyses:
We are very pleased to announce that the v1.0 <https://github.com/ghammad/pyActigraphy/releases/tag/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
In the context of the Daylight Academy Project, The role of daylight for humans <https://daylight.academy/projects/state-of-light-in-humans>
_ and
thanks to the support of its members, Dr. Mirjam Münch and Prof. Manuel Spitschan <https://github.com/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 <https://github.com/ghammad/pyActigraphy/releases/tag/v1.1>
and higher.
A manuscript describing the pyLight module is available as a preprint <https://osf.io/msk9n/>
_.
The pyActigraphy package is open-source and its source code is accessible online <https://github.com/ghammad/pyActigraphy>
_.
An online documentation of the package is also available here <https://ghammad.github.io/pyActigraphy/index.html>
.
It contains notebooks <https://ghammad.github.io/pyActigraphy/tutorials.html>
illustrating various functionalities of the package. Specific tutorials for the processing and the analysis of light exposure data with pyLight are also available.
In a (bash) shell, simply type:
.. code-block:: shell
pip3 install pyActigraphy
To update the package:
.. code-block:: shell
pip3 install -U pyActigraphy
.. code-block:: shell
git clone [email protected]:ghammad/pyActigraphy.git cd pyActigraphy/ git checkout develop pip3 install -e .
The following example illustrates how to calculate the interdaily stability with the pyActigraphy package:
.. code-block:: python
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
There are plenty of ways to contribute to this package, including (but not limiting to):
@ghammad <https://github.com/ghammad>
_ - Initial and main developer
@ReytMathilde <https://github.com/ReytMathilde>
_See also the list of contributors <https://github.com/ghammad/pyActigraphy/contributors>
_ who participated in this project.
This project is licensed under the GNU GPL-3.0 License - see the LICENSE <LICENSE>
_ file for details
@aardoi <https://github.com/aardoi>
_ developed the first version of the MTN class during his internship at the CRC, in May-August 2018.