Skip to main content

No project description provided

Project description

actfast Fast actigraphy data reader

actfast is a Python package for reading raw actigraphy data of various devices and manufacturers. It is designed to be fast, lightweight, memory efficient, and suitable for reading large datasets.

Supported formats & devices

The package currently supports the following formats:

Format Manufacturer Device Implementation status
GT3X Actigraph wGT3X-BT
BIN GENEActiv GENEActiv
CWA Axivity AX3, AX6
BIN Genea Genea
BIN Movisens Movisens
WAV Axivity Axivity Use general-purpose WAV audio file reader
AGD/SQLite Actigraph ActiGraph Use general-purpose SQLite reader
AWD Philips Actiwatch Use general-purpose CSV reader
MTN Philips Actiwatch Use general-purpose XML reader
CSV Any Any Use general-purpose CSV reader
XLS, XLSX, ODS Any Any Use general-purpose Excel reader

The scope of this package is limited to reading raw sensor data. It does not read CSV or other standard file formats commonly used by various manufacturers. Use general-purpose libraries to read these files.

The package is designed to be easily extensible to support new formats and devices. If you have a non-standard device format that is not supported yet, please open an issue and attach a sample file. We will do our best to add support for it.

Installation

Install from PyPI via:

pip install actfast

Or, install the latest development version from GitHub via:

pip install git+https://github.com/childmindresearch/actfast.git

Tested devices

This package has been extensively tested with data captured by the following devices:

Device Firmware
ActiGraph wGT3X-BT 1.9.2
GENEActiv 1.2 Ver06.17 15June23

Similar devices might work, but have not been tested. Please open an issue and attach a sample file if you encounter any issues.

Usage

The package provides a single function, read, which reads an actigraphy file and returns a dictionary:

import actfast

subject1 = actfast.read("data/subject1.gt3x")

The returned dictionary has the following structure:

{
    "format": "Actigraph GT3X",  # file format, any of "Actigraph GT3X", "Axivity CWA", "GeneActiv BIN", "Genea BIN", "Unknown WAV", "Unknown SQLite"
    "metadata": {
        # device specific key value pairs of metadata (e.g., device model, firmware version)
    },
    "timeseries": {
        # device specific key value pairs of "timeseries name" -> {timeseries data}, e.g.:
        "high_frequency": {
            "datetime": # 1D int64 numpy array of timestamps in nanoseconds (Unix epoch time)
            # other data fields are various device specific sensor data, e.g.:
            "acceleration": # 2D numpy array (n_samples x 3) of acceleration data (x, y, z)
            "light": # 1D numpy array of light data
            "temperature": # temperature data
            # ...
        },
        "low_frequency": {
            # similar structure as high_frequency
        }
    },

Architecture & usage considerations

All supported formats seem to be constructed as streams of variable-length, variable-content records. While this stream of records is easy to write for the manufacturers, it is not ideal for vectorized operations. actfast collects data in contiguous arrays.

Consider reading large datasets once and storing them in a more efficient format (e.g., Parquet, HDF5) for subsequent analysis. This will always speed up data reading and enable streaming data processing.

License

This package is licensed under the MIT License. See the LICENSE file for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

actfast-1.1.2.tar.gz (84.9 kB view details)

Uploaded Source

Built Distributions

actfast-1.1.2-cp38-abi3-win_amd64.whl (248.5 kB view details)

Uploaded CPython 3.8+Windows x86-64

actfast-1.1.2-cp38-abi3-win32.whl (237.7 kB view details)

Uploaded CPython 3.8+Windows x86

actfast-1.1.2-cp38-abi3-musllinux_1_2_x86_64.whl (562.7 kB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ x86-64

actfast-1.1.2-cp38-abi3-musllinux_1_2_i686.whl (585.7 kB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ i686

actfast-1.1.2-cp38-abi3-musllinux_1_2_armv7l.whl (653.3 kB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARMv7l

actfast-1.1.2-cp38-abi3-musllinux_1_2_aarch64.whl (559.5 kB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

actfast-1.1.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (395.0 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

actfast-1.1.2-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (438.6 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ s390x

actfast-1.1.2-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (449.9 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ppc64le

actfast-1.1.2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (397.9 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARMv7l

actfast-1.1.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (386.9 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

actfast-1.1.2-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl (416.7 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.5+ i686

actfast-1.1.2-cp38-abi3-macosx_11_0_arm64.whl (349.9 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

actfast-1.1.2-cp38-abi3-macosx_10_12_x86_64.whl (364.3 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file actfast-1.1.2.tar.gz.

File metadata

  • Download URL: actfast-1.1.2.tar.gz
  • Upload date:
  • Size: 84.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.1

File hashes

Hashes for actfast-1.1.2.tar.gz
Algorithm Hash digest
SHA256 cc7d2c52343cbe11f16f8535c09e147094f0e5c718a159b15b3e78d285e5da87
MD5 815ae8ba4b04ad84ab6f0378dc3fc2a9
BLAKE2b-256 bc57730510e9ae8f8034106debdb66efabc7b0c6732d2b32ce524947f47d230b

See more details on using hashes here.

File details

Details for the file actfast-1.1.2-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: actfast-1.1.2-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 248.5 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.1

File hashes

Hashes for actfast-1.1.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2929a74afc6bef3f680bd5b7a3b2f88062dd961173e24882558b7482ea64fd76
MD5 168ad7c901112b1ef1fb4df616bb7456
BLAKE2b-256 34f4d87ca14238c5f1084c33dd9ddbe2bda7660359fee2490b43bfdb00f5140a

See more details on using hashes here.

File details

Details for the file actfast-1.1.2-cp38-abi3-win32.whl.

File metadata

  • Download URL: actfast-1.1.2-cp38-abi3-win32.whl
  • Upload date:
  • Size: 237.7 kB
  • Tags: CPython 3.8+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.1

File hashes

Hashes for actfast-1.1.2-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 38eed2ea59fc7ebaa51e430576e4a190196d40bdeb84106b966e75869549f3f9
MD5 7de578e0f521dadb7eb19bf8d637155f
BLAKE2b-256 f8fa05107063c4b1693875a83314e6199d807282ce04f793e9df2b7e1775cc5e

See more details on using hashes here.

File details

Details for the file actfast-1.1.2-cp38-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for actfast-1.1.2-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c9a4e31fa5e72f9562f90ae6983b932ada1bd6bd3f106b04c78e21a694f014b1
MD5 9841e448aedfe54b835bf3856da053e6
BLAKE2b-256 665cbd3ce86e5059efc87383c3a2c10de0db502caaf3b39262e561e2db2ead26

See more details on using hashes here.

File details

Details for the file actfast-1.1.2-cp38-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for actfast-1.1.2-cp38-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 af2db66c7232e2d08b577f58f0bd3d65a6b58a37e5b781306ea9a82a7783ba23
MD5 1e78f8e7d7cd633d269e443f206827bc
BLAKE2b-256 9ffa1b277e2bdbd45101b4fa23abb7d8d87e931ce2559721b2e304f9a5eb9a1a

See more details on using hashes here.

File details

Details for the file actfast-1.1.2-cp38-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for actfast-1.1.2-cp38-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 ae395b88bbdddfd66eea50e7efb8c2234124f25243ff9c3a172ee28522e3455b
MD5 d26fd4f6de5a5333e0f036742da05d20
BLAKE2b-256 32a36662cc8a5faaa8d857486be5eac6479148dd56f8127a5d17d8d43757badd

See more details on using hashes here.

File details

Details for the file actfast-1.1.2-cp38-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for actfast-1.1.2-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 7fec12f8d69d012f88cef8c928b7d5875fc425495d6a6774f0330a0dbedf0431
MD5 e31cacc56b74d4df2402227cbc1a4a66
BLAKE2b-256 925fab6602938161ea7b76018b9822b2df118bee82d1fd5f27510e0cd3f6a5f1

See more details on using hashes here.

File details

Details for the file actfast-1.1.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for actfast-1.1.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 364adb792f7f85a8941c994adbddc9405f0aaa2bd80b4568f87bebcab0d4e202
MD5 567869bb0cc40633591cc7a221f4001b
BLAKE2b-256 8796da948e360dcfec67c502788e54cc0b4f0df29547de8a4c4dbd2454c61670

See more details on using hashes here.

File details

Details for the file actfast-1.1.2-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for actfast-1.1.2-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 82a39572510605726298bb11fd21ff8a0c8d370b144577d0647331c577438091
MD5 95922a5c4949b15e9e772c22e8762931
BLAKE2b-256 906c00a66fbfeab28ae50e705b0fdcd3365363beb4cd6c2af384228c7cb918d5

See more details on using hashes here.

File details

Details for the file actfast-1.1.2-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for actfast-1.1.2-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 5bcb1219f733ecb01d44a56d07399146becdf1c9e7f7b48cd8fc913aedc07aa2
MD5 5bccf822f0b3038be1f93b6bef4aa88d
BLAKE2b-256 57eb4a455ad0e279d371bbaa5cd0b9c62f014463f6c8e8b059c11454c547eead

See more details on using hashes here.

File details

Details for the file actfast-1.1.2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for actfast-1.1.2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 6afa0e8f78a049adf5db70ee8a6fdcb9d3f3770caac8a49f33a7dbfa0c61ecda
MD5 c941e9b19eb44334b4725ee4a5bb111a
BLAKE2b-256 956c584680f282bd3f23fb0aa33cbf3eb806f126faf5a0682df8c25826f467d4

See more details on using hashes here.

File details

Details for the file actfast-1.1.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for actfast-1.1.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c829b32c22876704dd751a5e0082a1d6e23863859d7dcb6f9fd78819177e25dd
MD5 73d34d9e91a22058c41a7d53dde73f13
BLAKE2b-256 9013343a3bd3c8ef39bfd3a6766eeb9f8985779e3f067c0aa1c7610c58c04502

See more details on using hashes here.

File details

Details for the file actfast-1.1.2-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for actfast-1.1.2-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 aac80e41fa67a01d5193be6358a5120444bc63925a6183bc345797799a91f076
MD5 ca9742abfdd7e79f3bf7cd6bfd02e66c
BLAKE2b-256 6e3bf4eaa90effc49ea91557b93762c623834ed2bf01b49a627b64f38481d8ff

See more details on using hashes here.

File details

Details for the file actfast-1.1.2-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for actfast-1.1.2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9400e3f32caf0753042830bdb11be806959b7e90a653dbe1dc5fdc0d74d1a49e
MD5 f31729f8283fcb2b2a436490bf0b08fc
BLAKE2b-256 336918b982878bdda1ad8beeea7015d69b4b7777e25a0cbb801319a7c6482bc4

See more details on using hashes here.

File details

Details for the file actfast-1.1.2-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for actfast-1.1.2-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 cc80c248a260fd98ad2ca116812b398c78e6bb293c0a4a2a9d219f9746c85721
MD5 a7ea3b1a4f803e9487649e7b4bd91184
BLAKE2b-256 9e79dfad85a51b824c2645d228bcb1f7aaa8a4c11aedab2bde6e053be54f24be

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page