Skip to content
/ paat Public

The physical activity analysis toolbox (PAAT) is a comprehensive toolbox to analyse raw acceleration data.

License

Notifications You must be signed in to change notification settings

Trybnetic/paat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Physical Activity Analysis Toolbox (PAAT)

Note: This package is currently under development and the API might change anytime!
Tests Coverage Documentation Status License

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

At the moment, the easiest way to install paat directly from GitHub by running:

pip install git+https://github.com/Trybnetic/paat.git

Usage

For now, several functions to work with raw data from ActiGraph devices are implemented while others are still work in progress. 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.

# 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_syed2021(data, sample_freq)

# Detect sleep episodes
data.loc[:, "Sleep"] = paat.detect_sleep_weitz2022(data, sample_freq)

# Classify moderate-to-vigorous and sedentary behavior
data.loc[:, ["MVPA", "SB"]] = paat.calculate_pa_levels(data, sample_freq)

# 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", "Sleep", "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:

Authors and Contributers

paat was mainly developed by Marc Weitz and Shaheen Syed. For the full list of contributors have a look at Github's Contributor summary.

Currently, it is maintained by Marc Weitz. 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.

About

The physical activity analysis toolbox (PAAT) is a comprehensive toolbox to analyse raw acceleration data.

Topics

Resources

License

Stars

Watchers

Forks

Languages