Skip to content
annemarieUPublic

About

The Effect of Using Wearables on Patient Engagement in Post‑Stroke Rehabilitation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Sensor-S Wearable Signal Quality Pipeline

Description

The Sensor-S study investigates stroke rehabilitation and patient engagement using wearable devices. This repository accompanies the iWOAR short paper and contains preprocessing pipelines and data quality assessment functions for wearable sensor data collected in Sensor-S.

The repository includes preprocessing and quality assessment code for the following modalities from the Samsung Galaxy Watch6:

  • Heart rate
  • Skin temperature
  • Steps
  • ECG

In addition, the repository includes preprocessing code for the Dexcom G7 continuous glucose monitoring (CGM) sensor:

  • Interstitial glucose (IGLU)

The main focus of this repository is to transform raw wearable data into cleaned, quality-assessed signals that can be used for subsequent biomarker extraction and analysis.

Repository Structure

The main package is located in the folder:

samsung6_prep/

This folder is structured as a Python package and contains modality-specific preprocessing and quality assessment functions.

samsung6_prep/

├── ecg/
├── igluc/
├── heartrate/
├── steps/
├── temp/
├── utils/
└── plotting/

Modality-specific folders

Each modality folder contains preprocessing and quality assessment functions for the corresponding signal:

  • ecg/: ECG preprocessing functions and quality assessment functions
  • igluc/: IGLU preprocessing functions and quality assessment functions
  • heartrate/: Heart rate preprocessing functions and quality assessment functions
  • steps/: Step count preprocessing functions and quality assessment functions
  • temp/: Skin temperature preprocessing functions and quality assessment functions

Each modality folder contains a file named: <modality>_functions.py The ecg/ folder additionally contains: biosppy_functions.py This file contains adapted functions from the biosppy package.

Utility and plotting folders

The repository also contains the following helper folders:

  • utils/: Functions for loading and saving data whiches uses the data loader class
  • plotting/: Modality-specific plotting functions

The plotting/ folder contains files named: <modality>_plotting.py

Pipeline Script

The main preprocessing workflow is implemented in: pipeline.py This script executes the preprocessing pipeline for the Sensor-S wearable data. It applies modality-specific preprocessing steps, quality checks, and artifact handling procedures where applicable.

Environment Setup

This project uses https://python-poetry.org/ for dependency management.

The Python environment is defined by:

pyproject.toml
poetry.lock

The environment targets Python 3.10 to 3.13 and includes the analysis stack required for preprocessing, signal processing, plotting, and quality assessment.

Installation

  • Install the project dependencies using Poetry: poetry install
  • Activate the virtual environment: poetry shell
  • Run a script inside of the enviroment: poetry run python <script>.py

Data

This repository does not contain any patient data.

Due to privacy and data protection requirements, raw and processed Sensor-S study data are not included in this repository. The code is intended to be applied to locally available Sensor-S data using the expected internal data structure.

Code Usage

The preprocessing functions are organized by modality and can be imported from the corresponding package folders. The recommended entry point for running the full preprocessing workflow is: pipeline.py

For development and testing, modality-specific functions can also be called directly from the respective folders.

Notes on Preprocessing

The preprocessing pipeline includes modality-specific steps such as:

  • Physiological boundary checks
  • Noise filtering
  • Artifact and outlier detection
  • Interpolation or exclusion of invalid segments
  • Quality metric calculation
  • Biomarker-oriented feature preparation

The available preprocessing steps differ between modalities because ECG, heart rate, skin temperature, steps, and CGM data have different signal characteristics and artifact patterns.

Citation

If you use this repository, please cite the accompanying iWOAR short paper:

License

About

The Effect of Using Wearables on Patient Engagement in Post‑Stroke Rehabilitation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages