FieldStudyDataTools is a Python package developed to support data processing for the Sensors Field Study 2025 conducted at Curtin University, Perth, Australia by the Healthy Digital Child research group.
The package provides a set of modules for:
- Resampling raw accelerometer data (from SENS devices)
- Clearning and resampling outputs from the following classification algorithms:
- ActiMotus
- ActiPASS
- SENS
- Cleaning and resampling video annotation data
- Aligning and merging accelerometer data with video annotations
The workflow implemented in this package follows these steps:
Raw 12.5 Hz SENS accelerometer data (thigh-worn) were classified into postures and movements using:
- ActiMotus (via SENS web application)
- ActiPASS (offline processing software)
- SENS algorithm (via SENS web application)
Outputs from each algorithm are in 1-second resolution before further processing.
For further details on the ActiMotus algorithm, please visit the ActiMotus GitHub repository.
For further details on the ActiPASS algorithm, please visit the ActiPASS GitHub repository.
To enable integration across data sources, the following resampling strategy is applied:
-
Raw accelerometer data (12.5 Hz → 30 Hz)
Cubic spline interpolation. -
SENS classified data (5 sec → 1 Hz)
Interval expansion using forward fill, where each 5-second classification is assigned to all corresponding 1-second timestamps within that interval. -
Classified data (1 Hz → 30 Hz)
Projection onto a 30 Hz timeline using nearest-neighbour temporal matching, where each 30 Hz timestamp is assigned the label of the closest 1-second observation. -
Video annotations (30 Hz → 1 Hz and 5-sec)
Aggregation using majority vote within each 1-second or 5-second interval.
The resampled raw accelerometer data, posture and movement classified accelerometer data, and video annotation data are combined based on participant ID and timestamps.
All datasets undergo standardised timestamp processing prior to merging:
- Timestamps are parsed as naive local time (Australia/Perth)
- Data are sorted and duplicate timestamps are removed
- Datasets are aligned to a common start time where applicable
The 30 Hz dataset is constructed using the video annotation data as the master timeline. Raw accelerometer data and classification outputs are merged using nearest-neighbour matching with ±17 milliseconds tolerance.
The 1 Hz dataset is constructed using the ActiPASS data as the master timeline. ActiMotus, SENS, and video data are merged using nearest-neighbour matching with ±500 milliseconds tolerance.
The 5-second dataset is constructed by merging SENS classified data with video annotation data. Video annotation data define the master timeline and SENS classified data are merged using nearest-neighbour matching with ±2.5 seconds tolerence.
This process results in:
-
30 Hz dataset containing:
- Raw accelerometer data
- ActiMotus classifications
- ActiPASS classifications
- SENS classifications
- Video annotations
-
1 Hz dataset containing:
- ActiMotus classifications
- ActiPASS classifications
- SENS classifications
- Video annotations
-
5-second dataset containing:
- SENS classifications
- Video annotations
Install using pip install fieldstudydatatools.
fieldstudydatatools is distributed under the terms of the MIT license.