# tOLIet: Single-lead Thigh-based Electrocardiography Using Polimeric Dry Electrodes This repository contains a dataset of ECG signals acquired using an intelligent toilet system equipped with electrodes of various textures, as well as reference ECG recordings obtained from clinical-grade 12-lead systems. The data is intended for research purposes, enabling the development and validation of algorithms for ECG-based classification, recognition, and biometric identification. --- ## Dataset Structure ``` . ├── ECG_EXP/ # Experimental ECG signals from toilet sensors │ ├── 001.txt │ ├── 002.txt │ └── ... ├── ECG_REF/ # Reference clinical ECG signals (12 leads) │ ├── 001.XML │ ├── 002.XML │ └── ... ├── Script/ # Script │ ├──read_ecg_data.py # Script to read and preprocess experimental ECG │ ├──read_ref_data.py # Script to read and extract reference ECG │ ├──data_analysis.py # Wave detection (P, Q, R, S, T) ├── DataSet.csv # Subject metadata └── README.md # This file ``` --- ## File Descriptions ### `DataSet.csv` Contains metadata for each subject: - **ID**: Unique subject identifier - **Age**: Age (years) - **Weight**: Weight (kg) - **Height**: Height (cm) - **Gender**: M or F - **Observations_field**: Clinical or diagnostic notes ### `ECG_EXP/` Contains `.txt` files with experimental ECG data collected using four different electrode textures: - **A1**: Flat texture - **A2**: Sinusoidal texture - **A3**: Pyramidal texture - **A4**: Trapezoidal texture Each row corresponds to a time sample. Signals are converted from raw values to millivolts using `read_ecg_data.py`. ### `ECG_REF/` Contains `.XML` files with 10-second 12-lead ECG reference recordings: - Acquisition timestamp - Median heartbeat templates (per lead) - Raw signals (per lead) - Unit: microvolts (µV) --- ## Main Scripts ### `read_ecg_data.py` - Loads experimental `.txt` signals - Converts raw ADC values to mV - Returns subject data and signals from sensors A1–A4 ### `read_ref_data.py` - Parses `.XML` files - Extracts acquisition time, lead names, heartbeat templates, and 10-second raw signals ### `data_analysis.py` - Detects P, Q, R, S, and T wave positions based on template morphology - Assumes R peak is always located at index 200 within templates --- ## Usage Instructions 1. **Install required dependencies:** ```bash pip install biosppy numpy pandas xmltodict scipy ``` 2. **Read an experimental ECG signal:** ```python import read_ecg_data as red ecg_data = red.read_ecg("ECG_EXP/001.txt", result_from_dataset) ``` 3. **Read a reference ECG file:** ```python import read_ref_data as rrd ref_data = rrd.read_ref("ECG_REF/001.XML", "001") ``` 4. **Extract waveform peak positions:** ```python import data_analysis as da peaks = da.getAllPeaks(ecg_proc) ``` --- ## Notes - Templates assume the R peak is always centered at index 200. - Experimental ECG signals may require filtering due to noise. - Units: - Experimental ECG: converted to **mV** - Clinical reference ECG: recorded in **µV** --- ## Contact For questions, collaboration opportunities, or additional information, please contact: - **Name**: Aline Santos Silva - **Email**: [aline.s.silva@inesctec.pt] - **Affiliations**: INESC TEC – Institute for Systems and Computer Engineering, Technology and Science Faculty of Engineering, University of Porto (FEUP) IT – Instituto de Telecomunicações --- ## License This dataset is provided strictly for research purposes and may be subject to ethical approval. Redistribution is not permitted without explicit authorization from the authors.