Parses and visualizes data from a .seg file that contains Plethysmography, Pulse Rate, SpO2, Abdomen and Thorax expansion. Tested with files from Contec RS10. Comes with a small example dataset. Note that expansion signals are high-pass filtered in the ResMonPlus software, so the display will be slightly different.
The recording files are structured into 1-second segments, each containing multiple blocks of data. Each segment starts with a header and is followed by specific blocks of data.
Each segment has the following structure:
-
Segment Header
- Size: 4 bytes
- Content:
FF FF
(2 bytes) + Block Number (2 bytes)
-
Data Segments
- Abdomen Segment
- Size: 200 bytes
- Data Type:
uint16
(100 values)
- Thorax Segment
- Size: 200 bytes
- Data Type:
uint16
(100 values)
- Flow Segment
- Size: 200 bytes
- Data Type:
uint16
(100 values)
- spO2 Segment
- Size: 25 bytes
- Data Type:
uint8
(25 values)
- PR Segment
- Size: 25 bytes
- Data Type:
uint8
(25 values)
- Pleth Segment
- Size: 60 bytes
- Data Type:
uint8
(60 values)
- Unknown Segment
- Size: 3 bytes - Please contribute if you uncover their use.
- Abdomen Segment
- Python 3.x
- NumPy
- Matplotlib
- Clone the repository:
git clone https://github.com/StepUp-Solutions/ContecSEGParser.git
- Install the required packages:
pip install numpy matplotlib
- Edit the FILE_NAME variable in the beginning of the file.
- Run the script:
python segparser.py
This project is licensed under the MIT License. See the LICENSE file for details.
Maintained by @chgayot at StepUp Solutions For any custom development need, do not hesitate to contact us.