next up previous contents
Next: WFDB: `rdsamp' Up: PhysioNet, PhysioBank, PhysioToolkit Previous: PhysioNet, PhysioBank, PhysioToolkit   Contents

MIT-BIH Arrhythmia Database

There are several very different bases in PhysioBank. We are going to begin with the Arrhythmia Database that can be downloaded from PhysioBank. We will work in the directory `/home/j/physionet'. In this database, the same base name characterizes a record; files with the same base name but different extensions can be needed. In the directory, we have three kind of extensions: .atr (indicating that it is an annotation file), .dat (indicating that the file contains data) and .hea (indicating that it is a header file). We download the files whose base name is `100' (a long ECG record) and `100s' ( a shorter version of `100'). Our directory contains: Now we can run Scilab and from the Scilab prompt we key

-->pwd
 ans  =
 
 /home/j/physionet   
 
-->unix_g('ls')
 ans  =
 
!100.atr   !
!          !
!100.dat   !
!          !
!100.hea   !
!          !
!100s.atr  !
!          !
!100s.dat  !
!          !
!100s.hea  !
The result indicates that the files we are properly located in /j/physionet. Probably it is time to see their content. We begin with the .hea files. We key:

-->unix_x('cat 100.hea')
It appears a nice window containing the next text:

100 2 360 650000
100.dat 212 200 11 1024 995 -22131 0 MLII
100.dat 212 200 11 1024 1011 20052 0 V5
# 69 M 1085 1629 x1
# Aldomet, Inderal
Of course, we only redirect the output of the command `cat' to a window created by Scilab. In the window, we can explore the content or search strings easily. If we see the content of `100s.hea' the result is similar

100s 2 360 21600
100s.dat 212 200(0) 11 1024 995 21537 0 MLII
100s.dat 212 200(0) 11 1024 1011 -3962 0 V5
# 69 M 1085 1629 x1
# Aldomet, Inderal
#Produced by xform from record 100, beginning at 0:0
Obviously, these files contain the information to read the data. A very precise documentation is included with the package. The lines beginning with `#' are comment lines that indicate the age and sex of the patient, the medication and other details.

The first line indicates the name of the file (`100' and `100s') and the number of signals (2 in both cases), the sampling frequency (360 in both cases) and the number of samples (650,000 and 21,600).

Finally, the other lines contain details about how the signals are coded.

If we try to do the same with .dat, we will obtain a terrible shambles. It is a binary file. We need some tools to extract the information. And obviously our operating system does not have the ability to understand the files. At this point we could decide to decode the files from Scilab. It would be relatively easy to get some results but it is not very recommendable. We can find some surprise. George Moody has been working for a long time and probably he reached a better result.

The next section explains how to read data with WFDB from inside Scilab.


next up previous contents
Next: WFDB: `rdsamp' Up: PhysioNet, PhysioBank, PhysioToolkit Previous: PhysioNet, PhysioBank, PhysioToolkit   Contents
j 2001-09-16