Analysis package for actigraphy data
Project description
pyActigraphy
Open-source python package for actigraphy 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
Condor Instrument: ActTrust 2
CamNtech: Actiwatch 4 and MotionWatch 8
Respironics: Actiwatch 2 and Actiwatch Spectrum (plus)
Daqtix: Daqtometer
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)
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…
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.
Installation
In a (bash) shell, simply type:
For users:
pip3 install pyActigraphy
To update the package:
pip3 install -U pyActigraphy
It is strongly recommended to use the latest version of the pyActigraphy package.
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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyActigraphy-1.0rc1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b8df197198f78fa8c1fffb9fff44a06d8b953e1d0b8700e00436b4ea2fd937f |
|
MD5 | d7ecbd0fc157594c55ffdb2db600319c |
|
BLAKE2b-256 | c6d156b22890cc1a91d154d31e8b3290a237f2a2cc7321d08124e85f266c5c74 |