Parsers
actimotus.Sens
dataclass
Parses SENS accelerometer data from binary files.
This class handles the extraction of raw accelerometer data from SENS .bin
files. It reads the binary structure, validates the file format, and optionally
normalizes the raw integer values to gravitational units (g).
Attributes:
| Name | Type | Description |
|---|---|---|
normalize |
bool
|
If |
from_bin
from_bin(path: str | Path) -> pd.DataFrame
Reads and decodes a Sens binary file into a DataFrame.
This method validates the file extension and existence before parsing. It handles path conversion automatically.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | Path
|
The file path to the source |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
A DataFrame containing the parsed accelerometer data. If |
DataFrame
|
is |
Examples:
>>> parser = Sens(normalize=True)
>>> df = parser.from_bin("data/sensor_01.bin")