Metadata-Version: 2.1
Name: pygt3x
Version: 0.4.2
Summary: Python module for reading GT3X/AGDC file format data
Home-page: https://github.com/actigraph/pygt3x
License: GPL-3.0-or-later
Author: Mark Fogle
Author-email: mark.fogle@theactigraph.com
Maintainer: Ali Neishabouri
Maintainer-email: ali.neishabouri@theactigraph.com
Requires-Python: >=3.8.1,<3.12
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Dist: numpy (>=1.21.2)
Requires-Dist: pandas (>=1.2.5)
Project-URL: Repository, https://github.com/actigraph/pygt3x
Description-Content-Type: text/markdown

# pygt3x
![Tests](https://github.com/actigraph/pygt3x/actions/workflows/tests.yml/badge.svg)

Python module for reading GT3X/AGDC file format data generated by ActiGraph devices.

## Example Usage

To read calibrated accelerometer data, you can use the code snippet below:

```python
from pygt3x.reader import FileReader
from pygt3x.calibration import CalibratedReader

# Read raw data and calibrate
# Dump to pandas data frame
with FileReader("FILENAME") as reader:
    calibrated_reader = CalibratedReader(reader)
    df = calibrated_reader.to_pandas()
    
    # After reading a file, idle sleep mode status can be obtained
    was_idle_sleep_mode_used = reader.idle_sleep_mode_activated
    print(df.head(5))
```

If your AGDC file contains temperature data, you can read it using:

```python
from pygt3x.reader import FileReader
from pygt3x.calibration import CalibratedReader

with FileReader("FILENAME") as reader:
    calibrated_reader = CalibratedReader(reader)
    df = calibrated_reader.temperature_to_pandas()
    print(df.head(5))
```
