MIT-LCP / physionet

A collection of tools for working with the PhysioNet repository.
http://physionet.org/
MIT License
69 stars 17 forks source link

The range of milivolt (mV) unit in PTB Diagnostic ECG Database #131

Open serkankavak opened 3 years ago

serkankavak commented 3 years ago

I am working on PTB Diagnostic ECG Database and I came out with a controversy for the signals I read. I am using Python wfdb library to read the records. I realized that the milivolt (mV) range of the signals are different if i use wfdb library or if I plot it from the website (physionet ATM). I used the first 10 seconds of the record "patient015/s0152lre" as an example and here is the plot if I use wfdb:

import wfdb
import matplotlib.pyplot as plt
record = wfdb.rdrecord('s0152lre', 
                        channel_names=['i', 'ii',
                                       'iii', 'avr',
                                       'avl', 'avf',
                                       'v1','v2',
                                       'v3','v4',
                                       'v5', 'v6',],
                        sampfrom=0, sampto=10000, 
                        pn_dir='ptbdb/patient015/')
wfdb.plot_wfdb(record=record, title='Patient 1',figsize=(20,20))

mine

For example, here you can see that Lead i starts from about -4.50 mV or lead aVL starts from about -3.50 mV. However, if I want to plot the same graph from the website (physionet ATM), the result is different. The plot from the website:

chart

For the plot from the website, It looks like each lead has an offset value to start from 0 mV. For example, the first peak in lead i goes to -3 mV in my plot but it goes a bit further than +1mV in the website plot. Which way is the better to plot the raw signal? I am not professional for analysis of ECG graphs but as far as I understand normal ECG signals are in the range of +- 1.5mV. Do i need to give an offset value for each signal so that the signal can be within this range?

briangow commented 3 years ago

The plot from the PhysioBank ATM doesn't indicate where 0 mV is. Within the ATM if you select "Show samples as text" under the Toolbox dropdown you will see that the voltages align with what you are getting from the python WFDB package. Also, in the project page for this database (https://www.physionet.org/content/ptbdb/1.0.0/) it states that the range for the conversion is +/- 16.4 mV.