Skip to content

Commit

Permalink
Add stub file
Browse files Browse the repository at this point in the history
  • Loading branch information
nx10 committed Aug 2, 2024
1 parent 2a5968f commit 65bc4be
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions actfast.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
"""`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.
"""

from os import PathLike
from pathlib import Path
from typing import Any, Dict, Union

def read(path: Union[str, Path, PathLike]) -> Dict[str, Any]:
"""Read a raw actigraphy file and return a dictionary with metadata and data.
The returned dictionary will contain the following:
- "format": str: File format, any of "Actigraph GT3X", "Axivity CWA", "GeneActiv BIN", "Genea BIN", "Unknown WAV", "Unknown SQLite".
- "metadata": Dict[str, Any]: Device specific key value pairs of metadata (e.g., device model, firmware version).
- "timeseries": Dict[str, Dict[str, Any]]: Device specific key value pairs of "timeseries name" -> {timeseries data}, e.g.:
- "high_frequency": Dict[str, Any]: High frequency timeseries data.
- "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": Dict[str, Any]: Low frequency timeseries data.
- Similar structure as high_frequency.
Args:
path (Union[str, Path, PathLike]): Path to the file.
Returns:
Dict[str, Any]: Dictionary with metadata and data.
Raises:
IOError: If the file is not found or corrupted.
"""
...

0 comments on commit 65bc4be

Please sign in to comment.