=========================================
Physical Activity Analysis Toolbox (PAAT)
=========================================
.. image:: https://github.com/Trybnetic/paat/actions/workflows/python-test.yml/badge.svg
:target: https://github.com/Trybnetic/paat/actions/workflows/python-test.yml
:alt: Tests
.. image:: https://codecov.io/gh/Trybnetic/paat/branch/main/graph/badge.svg
:target: https://codecov.io/gh/Trybnetic/paat
:alt: Coverage
.. image:: https://readthedocs.org/projects/paat/badge/?version=latest
:target: https://paat.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://img.shields.io/pypi/pyversions/paat.svg
:target: https://pypi.python.org/pypi/paat/
:alt: Python Versions
.. image:: https://img.shields.io/github/license/trybnetic/paat.svg
:target: https://github.com/trybnetic/paat/blob/master/LICENSE.txt
:alt: License
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.13885749.svg
:target: https://doi.org/10.5281/zenodo.13885749
:alt: zenodo
The physical activity analysis toolbox (PAAT) is a comprehensive toolbox to analyze raw acceleration data. We developed all code mainly for analyzing ActiGraph data (GT3X files) in large sample study settings where manual annotation and analysis is not feasible. Most functions come along with scientific papers describing the methodology in detail. Even though, the package was and is primarily develop for analyzing ActiGraph data, we warmly welcome contributions for other clinical sensors as well!
Installation
============
The easiest way is to install *paat* directly from PyPI using pip:
.. code:: bash
pip install paat
For reproducible versions, see `zenodo <https://doi.org/10.5281/zenodo.13885749>`_.
Usage
=====
*PAAT* comprises several functions to work with raw data from ActiGraph devices. The following code snippet should give you a brief overview and idea on how to use this package. Further examples and more information on the functions can be found in the documentation.
It is also possible to use other packages such as `actipy <https://github.com/OxWearables/actipy>`_ or `SciKit Digital Health (SKDH) <https://github.com/pfizer-opensource/scikit-digital-health>`_ to load the data. The only prerequisite is that a pandas DataFrame with a TimeStamp index and the sampling frequency is provided. The pandas DataFrame should have raw acceleration data of the vertical axis ("Y" column), the sagittal axis ("X" column), and the frontal axis ("Z" column).
.. code-block:: python
# Load data from file
data, sample_freq = paat.read_gt3x('path/to/gt3x/file')
# Detect non-wear time
data.loc[:, "Non Wear Time"] = paat.detect_non_wear_time_hees2011(data, sample_freq)
# Detect sleep episodes
data.loc[:, "Time in Bed"] = paat.detect_time_in_bed_weitz2024(data, sample_freq)
# Classify moderate-to-vigorous and sedentary behavior
data.loc[:, ["MVPA", "SB"]] = paat.calculate_pa_levels(
data,
sample_freq,
mvpa_cutpoint=.069,
sb_cutpoint=.015
)
# Merge the activity columns into one labelled column. columns indicates the
# importance of the columns, later names are more important and will be kept
data.loc[:, "Activity"] = paat.create_activity_column(
data,
columns=["SB", "MVPA", "Time in Bed", "Non Wear Time"]
)
# Remove the other columns after merging
data = data[["X", "Y", "Z", "Activity"]]
Getting involved
================
The *paat* project welcomes help in the following ways:
* Making Pull Requests for
`code <https://github.com/trybnetic/paat/tree/master/paat>`_, `tests <https://github.com/trybnetic/paat/tree/master/tests>`_ or `documentation <https://github.com/trybnetic/paat/tree/master/doc>`_.
* Commenting on `open issues <https://github.com/trybnetic/paat/issues>`_ and `pull requests <https://github.com/trybnetic/paat/pulls>`_.
* Helping to answer `questions in the issue section <https://github.com/trybnetic/paat/labels/question>`_.
* Creating feature requests or adding bug reports in the `issue section <https://github.com/trybnetic/paat/issues/new>`_.
Authors and Contributers
========================
*paat* was mainly developed by
`Marc Weitz <https://github.com/trybnetic>`_ and `Shaheen Syed <https://github.com/shaheen-syed/>`_. For the full list of contributors have a look at `Github's Contributor summary <https://github.com/trybnetic/paat/contributors>`_.
Currently, it is maintained by `Marc Weitz <https://github.com/trybnetic>`_. In case you want to contact the project maintainers, please send an email to marc [dot] weitz [at] uit [dot] no
Acknowledgments
===============
This work was supported by the High North Population Studies at UiT The Arctic University of Norway.
Raw data
{
"_id": null,
"home_page": "https://github.com/Trybnetic/paat",
"name": "paat",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.13,>3.9",
"maintainer_email": null,
"keywords": "medical-informatics, physical-activity, health-science, actigraph, accelerometry",
"author": "Marc Weitz",
"author_email": "marc.weitz@uit.no",
"download_url": "https://files.pythonhosted.org/packages/5b/a3/0bb52b76671d2e3b4db0c8237e217cc74166eaed48746f3fdd5f6cabe68a/paat-1.0.0.tar.gz",
"platform": null,
"description": "=========================================\nPhysical Activity Analysis Toolbox (PAAT)\n=========================================\n\n.. image:: https://github.com/Trybnetic/paat/actions/workflows/python-test.yml/badge.svg\n :target: https://github.com/Trybnetic/paat/actions/workflows/python-test.yml\n :alt: Tests\n\n.. image:: https://codecov.io/gh/Trybnetic/paat/branch/main/graph/badge.svg\n :target: https://codecov.io/gh/Trybnetic/paat\n :alt: Coverage\n\n.. image:: https://readthedocs.org/projects/paat/badge/?version=latest\n :target: https://paat.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://img.shields.io/pypi/pyversions/paat.svg\n :target: https://pypi.python.org/pypi/paat/\n :alt: Python Versions\n\n.. image:: https://img.shields.io/github/license/trybnetic/paat.svg\n :target: https://github.com/trybnetic/paat/blob/master/LICENSE.txt\n :alt: License\n\n.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.13885749.svg\n :target: https://doi.org/10.5281/zenodo.13885749\n :alt: zenodo\n\nThe physical activity analysis toolbox (PAAT) is a comprehensive toolbox to analyze raw acceleration data. We developed all code mainly for analyzing ActiGraph data (GT3X files) in large sample study settings where manual annotation and analysis is not feasible. Most functions come along with scientific papers describing the methodology in detail. Even though, the package was and is primarily develop for analyzing ActiGraph data, we warmly welcome contributions for other clinical sensors as well!\n\n\nInstallation\n============\n\nThe easiest way is to install *paat* directly from PyPI using pip:\n\n.. code:: bash\n\n pip install paat\n\nFor reproducible versions, see `zenodo <https://doi.org/10.5281/zenodo.13885749>`_.\n\n\nUsage\n=====\n\n*PAAT* comprises several functions to work with raw data from ActiGraph devices. The following code snippet should give you a brief overview and idea on how to use this package. Further examples and more information on the functions can be found in the documentation.\n\nIt is also possible to use other packages such as `actipy <https://github.com/OxWearables/actipy>`_ or `SciKit Digital Health (SKDH) <https://github.com/pfizer-opensource/scikit-digital-health>`_ to load the data. The only prerequisite is that a pandas DataFrame with a TimeStamp index and the sampling frequency is provided. The pandas DataFrame should have raw acceleration data of the vertical axis (\"Y\" column), the sagittal axis (\"X\" column), and the frontal axis (\"Z\" column).\n\n.. code-block:: python\n\n # Load data from file\n data, sample_freq = paat.read_gt3x('path/to/gt3x/file')\n\n # Detect non-wear time\n data.loc[:, \"Non Wear Time\"] = paat.detect_non_wear_time_hees2011(data, sample_freq)\n\n # Detect sleep episodes\n data.loc[:, \"Time in Bed\"] = paat.detect_time_in_bed_weitz2024(data, sample_freq)\n\n # Classify moderate-to-vigorous and sedentary behavior\n data.loc[:, [\"MVPA\", \"SB\"]] = paat.calculate_pa_levels(\n data, \n sample_freq, \n mvpa_cutpoint=.069, \n sb_cutpoint=.015\n )\n\n # Merge the activity columns into one labelled column. columns indicates the\n # importance of the columns, later names are more important and will be kept\n data.loc[:, \"Activity\"] = paat.create_activity_column(\n data, \n columns=[\"SB\", \"MVPA\", \"Time in Bed\", \"Non Wear Time\"]\n )\n\n # Remove the other columns after merging\n data = data[[\"X\", \"Y\", \"Z\", \"Activity\"]]\n\n\nGetting involved\n================\n\nThe *paat* project welcomes help in the following ways:\n\n* Making Pull Requests for\n `code <https://github.com/trybnetic/paat/tree/master/paat>`_, `tests <https://github.com/trybnetic/paat/tree/master/tests>`_ or `documentation <https://github.com/trybnetic/paat/tree/master/doc>`_.\n* Commenting on `open issues <https://github.com/trybnetic/paat/issues>`_ and `pull requests <https://github.com/trybnetic/paat/pulls>`_.\n* Helping to answer `questions in the issue section <https://github.com/trybnetic/paat/labels/question>`_.\n* Creating feature requests or adding bug reports in the `issue section <https://github.com/trybnetic/paat/issues/new>`_.\n\n\nAuthors and Contributers\n========================\n\n*paat* was mainly developed by\n`Marc Weitz <https://github.com/trybnetic>`_ and `Shaheen Syed <https://github.com/shaheen-syed/>`_. For the full list of contributors have a look at `Github's Contributor summary <https://github.com/trybnetic/paat/contributors>`_.\n\nCurrently, it is maintained by `Marc Weitz <https://github.com/trybnetic>`_. In case you want to contact the project maintainers, please send an email to marc [dot] weitz [at] uit [dot] no\n\n\nAcknowledgments\n===============\n\nThis work was supported by the High North Population Studies at UiT The Arctic University of Norway.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A comprehensive toolbox to analyse and model raw physical activity data",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/Trybnetic/paat",
"Repository": "https://github.com/Trybnetic/paat"
},
"split_keywords": [
"medical-informatics",
" physical-activity",
" health-science",
" actigraph",
" accelerometry"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5b1fe5a2a8da0833deb8d6f85299fa5475f3da41adbf15d67753a695afc71559",
"md5": "522b2748b16086f4ab874deb8942ed83",
"sha256": "8535a9730363d15af533b4144baadb4d368c19f0870d38de1a57d666f67cb09c"
},
"downloads": -1,
"filename": "paat-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "522b2748b16086f4ab874deb8942ed83",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.13,>3.9",
"size": 10597576,
"upload_time": "2025-07-16T07:47:13",
"upload_time_iso_8601": "2025-07-16T07:47:13.445474Z",
"url": "https://files.pythonhosted.org/packages/5b/1f/e5a2a8da0833deb8d6f85299fa5475f3da41adbf15d67753a695afc71559/paat-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5ba30bb52b76671d2e3b4db0c8237e217cc74166eaed48746f3fdd5f6cabe68a",
"md5": "d4503c4c63fab412442eb8d9c0350eb7",
"sha256": "526f4f31b8cc00e1bde35f73f5d3182b59baba53cb99d527898e69d1b541f1b8"
},
"downloads": -1,
"filename": "paat-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "d4503c4c63fab412442eb8d9c0350eb7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.13,>3.9",
"size": 10589239,
"upload_time": "2025-07-16T07:47:15",
"upload_time_iso_8601": "2025-07-16T07:47:15.671466Z",
"url": "https://files.pythonhosted.org/packages/5b/a3/0bb52b76671d2e3b4db0c8237e217cc74166eaed48746f3fdd5f6cabe68a/paat-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-16 07:47:15",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Trybnetic",
"github_project": "paat",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "paat"
}