{"id":24527218,"url":"https://github.com/ghammad/pyactigraphy","last_synced_at":"2025-05-16T16:09:53.190Z","repository":{"id":33981842,"uuid":"161155962","full_name":"ghammad/pyActigraphy","owner":"ghammad","description":"Python-based open source package for actigraphy data analysis","archived":false,"fork":false,"pushed_at":"2025-03-27T13:42:24.000Z","size":80740,"stargazers_count":146,"open_issues_count":30,"forks_count":30,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-16T16:09:18.805Z","etag":null,"topics":["actigraphy","actimetry","circadian","open-source","physical-activity","python","rest-activity-rhythms","sleep"],"latest_commit_sha":null,"homepage":"https://ghammad.github.io/pyActigraphy","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghammad.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-12-10T10:15:54.000Z","updated_at":"2025-05-10T01:14:07.000Z","dependencies_parsed_at":"2023-02-16T18:15:37.774Z","dependency_job_id":"3e9fc8bc-65e2-441a-8f13-20b1edcde10e","html_url":"https://github.com/ghammad/pyActigraphy","commit_stats":{"total_commits":526,"total_committers":3,"mean_commits":"175.33333333333334","dds":0.0513307984790875,"last_synced_commit":"d045c069dd762290b8002f4f9584ace41741e0ba"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghammad%2FpyActigraphy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghammad%2FpyActigraphy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghammad%2FpyActigraphy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghammad%2FpyActigraphy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghammad","download_url":"https://codeload.github.com/ghammad/pyActigraphy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254564188,"owners_count":22092123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actigraphy","actimetry","circadian","open-source","physical-activity","python","rest-activity-rhythms","sleep"],"created_at":"2025-01-22T06:17:12.001Z","updated_at":"2025-05-16T16:09:53.172Z","avatar_url":"https://github.com/ghammad.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: https://img.shields.io/badge/License-GPL%20v3-blue.svg\n  :target: https://www.gnu.org/licenses/gpl-3.0\n.. image:: https://gitlab.com/ghammad/pyActigraphy/badges/master/pipeline.svg?key_text=CI+tests\n  :target: https://gitlab.com/ghammad/pyActigraphy/commits/master\n.. .. image:: https://gitlab.com/ghammad/pyActigraphy/badges/master/coverage.svg\n..   :target: https://gitlab.com/ghammad/pyActigraphy/commits/master\n.. image:: https://img.shields.io/pypi/v/pyActigraphy.svg\n  :target: https://pypi.org/project/pyActigraphy\n.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.2537920.svg\n  :target: https://doi.org/10.5281/zenodo.2537920\n.. image:: https://bestpractices.coreinfrastructure.org/projects/6933/badge\n  :target: https://bestpractices.coreinfrastructure.org/projects/6933\n.. image:: https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg\n  :target: CODE_OF_CONDUCT.md\n\n\n**pyActigraphy**\n================\nOpen-source python package for actigraphy and light exposure data visualization and analysis.\n\n\nThis package is meant to provide a comprehensive set of tools to:\n\n* read native actigraphy data files with various formats:\n\n  * Actigraph: wGT3X-BT\n  * CamNtech: Actiwatch 4, 7, L(-Plus) and MotionWatch 8\n  * Condor Instrument: ActTrust 2\n  * Daqtix: Daqtometer\n  * Respironics: Actiwatch 2 and Actiwatch Spectrum (plus)\n  * Tempatilumi (CE Brasil)\n\n..\n\n* **NEW** read actigraphy data format from the `MESA dataset \u003chttps://sleepdata.org/datasets/mesa\u003e`_, hosted by the `National Sleep Research Resource \u003chttps://sleepdata.org\u003e`_.\n\n* **NEW** read actigraphy data files produced by the `accelerometer \u003chttps://biobankaccanalysis.readthedocs.io/en/latest/index.html\u003e`_ package that can be used to calibrate and convert raw accelerometer data recorded with:\n\n  * Axivity: AX3, device used by UK Biobank,\n  * Activinsights: GENEActiv, used by the Whitehall II study.\n\n..\n\n* **NEW** read light exposure data recorded by the aforementioned devices (when available)\n\n* clean the raw data and mask spurious periods of inactivity\n\n* produce activity profile plots\n\n* visualize sleep agendas and compute summary statistics\n\n* calculate typical wake/sleep cycle-related variables:\n\n  * Non-parametric rest-activity variables: IS(m), IV(m), RA\n  * Activity or Rest  fragmentation: kRA, kAR\n  * Sleep regularity index (SRI)\n\n..\n\n* **NEW** compute light exposure metrics (TAT, :math:`MLit^{500}`, summary statistics, ...)\n\n* automatically detect rest periods using various algorithms (Cole-Kripke, Sadeh, ..., Crespo, Roenneberg)\n\n* perform complex analyses:\n\n  * Cosinor analysis\n  * Detrended Fluctuation Analysis (DFA)\n  * Functional Linear Modelling (FLM)\n  * Locomotor Inactivity During Sleep (LIDS)\n  * Singular Spectrum Analysis (SSA)\n  * and much more...\n\nCitation\n========\n\nWe are very pleased to announce that the `v1.0 \u003chttps://github.com/ghammad/pyActigraphy/releases/tag/v1.0\u003e`_ version of the pyActigraphy package has been published. So, if you find this package useful in your research, please consider citing:\n\n  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\n\npyLight\n=======\n\nIn the context of the Daylight Academy Project, `The role of daylight for humans \u003chttps://daylight.academy/projects/state-of-light-in-humans\u003e`_ and\nthanks to the support of its members, Dr. Mirjam Münch and Prof. `Manuel Spitschan \u003chttps://github.com/spitschan\u003e`_,\na pyActigraphy module for analysing light exposure data has been developed, **pyLight**.\nThis module is part of the Human Light Exposure Database and is included in pyActigraphy version `v1.1 \u003chttps://github.com/ghammad/pyActigraphy/releases/tag/v1.1\u003e`_ and higher.\n\nWhen using this module, please consider citing:\n\n  Hammad, G., Wulff, K., Skene, D. J., Münch, M., \u0026 Spitschan, M. (2024). Open-Source Python Module for the Analysis of Personalized Light Exposure Data from   Wearable Light Loggers and Dosimeters. LEUKOS, 20(4), 380–389. https://doi.org/10.1080/15502724.2023.2296863\n\nCode and documentation\n======================\n\nThe pyActigraphy package is open-source and its source code is accessible `online \u003chttps://github.com/ghammad/pyActigraphy\u003e`_.\n\n\nAn online documentation of the package is also available `here \u003chttps://ghammad.github.io/pyActigraphy/index.html\u003e`_.\nIt contains `notebooks \u003chttps://ghammad.github.io/pyActigraphy/tutorials.html\u003e`_ illustrating various functionalities of the package. Specific tutorials for the processing and the analysis of light exposure data with pyLight are also available.\n\nInstallation\n============\n\nFor the time being, :code:`pyActigraphy` has been tested for :code:`python\u003e=3.7 \u0026 python\u003c=3.9`. Dependencies will be installed automatically.\n\nBefore installing python packages, it is often advised to create a virtual environment:\n\n#. Via `venv \u003chttps://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment\u003e`_ (Linux/Mac OS)\n#. Via `miniconda \u003chttps://www.anaconda.com/docs/getting-started/miniconda/main\u003e_` (Linux/Mac OS/Windows)\n\nInstalling pyActigraphy (alone)\n-----------------------\n  \nWithin a virtual env, in a Terminal (Linux/Mac OS) or in an Anaconda Prompt (if you installed miniconda/anaconda), simply type:\n  \n* For users:\n  \n.. code-block:: shell\n  \n  python -m pip install numba==0.57.1\n  python -m pip install pyActigraphy\n  \nTo update the package:\n  \n.. code-block:: shell\n  \n  python -m pip install -U pyActigraphy\n  \n  \n* For developers:\n  \n.. code-block:: shell\n\n  python -m pip install numba==0.57.1\n  git clone git@github.com:ghammad/pyActigraphy.git\n  cd pyActigraphy/\n  git checkout develop\n  python -m pip install -e .\n\n\nInstalling pyActigraphy+Jupyter (tutorials)\n--------------------------------------------------\n\nThe `pyActigraphy` package provides a series of tutorial `notebooks \u003chttps://ghammad.github.io/pyActigraphy/tutorials.html\u003e`_. These `Jupyter notebooks \u003chttps://jupyter.org/\u003e`_ (file extension: .ipynb) are part of the package but can also be downloaded from the `Github repository \u003chttps://github.com/ghammad/pyActigraphy/tree/master/docs/source/\u003e`_.\nIn order to interactively run these tutorials, one needs to install the Jupyter Notebook application.\n\nWhile users are encouraged to install and tailor these tools to their needs, a simpler one-stop-shop solution consists in using `Anaconda \u003chttps://www.anaconda.com/docs/main\u003e`_.\n\nInstructions:\n\n#. Download and install `Anaconda Distribution \u003chttps://www.anaconda.com/docs/getting-started/anaconda/install\u003e`_\n#. Via the **Anaconda Prompt** (Windows) or a **Terminal** (Mac OS, Linux):\n\n   #. Create a virtual environment:\n\n   .. code-block:: shell\n  \n     conda create -n pyActi39 python=3.9\n\n\n   #. Activate the newly created environment:\n\n   .. code-block:: shell\n\n     conda activate pyActi39\n\n\n   #. Install the `Numba \u003chttps://numba.readthedocs.io/en/stable/index.html\u003e`_ package which is a dependency of :code:`pyActigraphy`:\n\n   .. code-block:: shell\n\n     python -m pip install numba==0.57.1\n\n   #. Install :code:`pyActigraphy`:\n\n   .. code-block:: shell\n\n     python -m pip install pyActigraphy\n\n#. Launch the Jupyter Notebook via the Anaconda Navigator:\n\n   #. Via the application menu (On Windows)\n   #. Via a **Terminal** (On Mac OS/Linux only):\n\n   .. code-block:: shell\n\n     anaconda-navigator\n\n   .. warning::\n      \n      Once the navigator is running, **before** launching the Jupyter Notebook app, select the **pyActi39** environment (instead of :code:`base (root)`)\n\n   .. image:: docs/source/img/anaconda-navigator-instructions.png\n      :width: 600\n\n#. Download the tutorial `notebooks \u003chttps://github.com/ghammad/pyActigraphy/tree/master/docs/source/\u003e`_:\n\n   * `pyActigraphy-Intro.ipynb \u003chttps://github.com/ghammad/pyActigraphy/blob/cce641bb09bd1ac1912aa5eb09894ed152844475/docs/source/pyActigraphy-Intro.ipynb\u003e`_\n   * `pyActigraphy-Batch.ipynb \u003chttps://github.com/ghammad/pyActigraphy/blob/cce641bb09bd1ac1912aa5eb09894ed152844475/docs/source/pyActigraphy-Batch.ipynb\u003e`_\n   * `pyActigraphy-Masking.ipynb \u003chttps://github.com/ghammad/pyActigraphy/blob/cce641bb09bd1ac1912aa5eb09894ed152844475/docs/source/pyActigraphy-Masking.ipynb\u003e`_\n   * `pyActigraphy-SSt-log.ipynb \u003chttps://github.com/ghammad/pyActigraphy/blob/cce641bb09bd1ac1912aa5eb09894ed152844475/docs/source/pyActigraphy-SSt-log.ipynb\u003e`_\n   * `pyActigraphy-Sleep-Algorithms.ipynb \u003chttps://github.com/ghammad/pyActigraphy/blob/cce641bb09bd1ac1912aa5eb09894ed152844475/docs/source/pyActigraphy-Sleep-Algorithms.ipynb\u003e`_\n   * `pyActigraphy-Sleep-Diary.ipynb \u003chttps://github.com/ghammad/pyActigraphy/blob/cce641bb09bd1ac1912aa5eb09894ed152844475/docs/source/pyActigraphy-Sleep-Diary.ipynb\u003e`_\n   * `pyActigraphy-StateTransitionProb.ipynb \u003chttps://github.com/ghammad/pyActigraphy/blob/cce641bb09bd1ac1912aa5eb09894ed152844475/docs/source/pyActigraphy-StateTransitionProb.ipynb\u003e`_\n\n#. Via the Jupyter interface, navigate to the tutorial notebooks you previously downloaded and simply launch them.\n\n#. Voilà. Good luck.\n\n\nQuick start\n===========\n\nThe following example illustrates how to calculate the interdaily stability\nwith the pyActigraphy package:\n\n.. code-block:: python\n\n  \u003e\u003e\u003e import pyActigraphy\n  \u003e\u003e\u003e rawAWD = pyActigraphy.io.read_raw_awd('/path/to/your/favourite/file.AWD')\n  \u003e\u003e\u003e rawAWD.IS()\n  0.6900175913031027\n  \u003e\u003e\u003e rawAWD.IS(freq='30min', binarize=True, threshold=4)\n  0.6245582891144925\n  \u003e\u003e\u003e rawAWD.IS(freq='1H', binarize=False)\n  0.5257020914453097\n\n\nContributing\n============\n\nThere are plenty of ways to contribute to this package, including (but not limiting to):\n\n* report bugs (and, ideally, how to reproduce the bug)\n* suggest improvements\n* improve the documentation\n\nAuthors\n=======\n\n* **Grégory Hammad** `@ghammad \u003chttps://github.com/ghammad\u003e`_ - *Initial and main developer*\n* **Mathilde Reyt** `@ReytMathilde \u003chttps://github.com/ReytMathilde\u003e`_\n\nSee also the list of `contributors \u003chttps://github.com/ghammad/pyActigraphy/contributors\u003e`_ who participated in this project.\n\nLicense\n=======\n\nThis project is licensed under the GNU GPL-3.0 License - see the `LICENSE \u003cLICENSE\u003e`_ file for details\n\nAcknowledgments\n===============\n\n* **Aubin Ardois** `@aardoi \u003chttps://github.com/aardoi\u003e`_ developed the first version of the MTN class during his internship at the CRC, in May-August 2018.\n* The CRC colleagues for their support, ideas, etc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghammad%2Fpyactigraphy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghammad%2Fpyactigraphy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghammad%2Fpyactigraphy/lists"}