next up previous contents
Next: Interacting with Scilab Up: Applying PhysioNet tools to Previous: Reading an ASCII file   Contents

Subsections

Editing the result

In the previous chapter we were able to detect the QRS complexes of a recording created by a commercial equipment by using WFDB tools. Now we want to edit the result.

The whole picture

To do this, we need a viewer that allows deleting or adding QRS detections as well as reposition them if necessary. First of all, we are going to show the result, then we will explain the choices taken, as well as the process of installation. Once installed, the command is direct:

 
[j@localhost Code]$ wave -r ecg -a qrs

We indicate the record name (ecg) as well the annotation file qrs and a nice window appears. The result (sligthly modified) can be seen in the figure 3.1

Figure 3.1: Wave showing the result of sqrs on our file
\begin{figure}\begin{center}
\epsfig{file=figures/wave.ps,width=16cm,height=10cm }\end{center}\end{figure}

The result of the analysis seems very good. Let me stress that the signal is not good at all and that it was not even an WFDB signal in origin. Probably, no editing is necessary. In any case, editing the annotations with wave is a pleasure. Many subtle features are included (from defining your own set of annotations to measuring signal amplitudes, from acting as an interface to other programs to synchronizing several windows, from directly accessing recordings on the PhysioNet web server to annotating a recording from scratch). It is a wonderful program. You can follow an excellent tutorial at PhysioNet with the details. Wave is installed as a part of WFDB Software Package in Linux systems.

Differences between Gtkwave and Wave

[Editor's note]: The original contents of this section referred to previous versions of WAVE and GTKwave, and do not reflect the current state of either program. WAVE currently runs under FreeBSD, Linux, Mac OS X, and Solaris; GTKwave currently runs under Linux, Mac OS X, and MS Windows, and can be easily ported to any other platform supported by GTK 1.2. The two programs use different user interface toolkits, but provide nearly identical capabilities. The WAVE User's Guide, although written to document WAVE, also serves as a manual for GTKwave. The author's conclusion to this section is still apt:

In any case, if you are running Windows and you feel frustrated by not being able to use wave, turn a lemon into lemonade: install Linux.

Installation in Mandrake 9.0

Since the main inconvenience encountered with Wave is the difficulty in the installation, and the details in PhysioNet are directed to Red Hat, I will try to detail the procedure in Mandrake 9.0. Everything you need is included in the distribution except:

And now the procedure:

XView uses an editor called textedit (included in xview-clients). It is installed in /usr/openwin/bin/textedit. To call it from Wave, it is necessary to define it as EDITOR

 
[j@localhost Code]$ export EDITOR=/usr/openwin/bin/textedit
[j@localhost Code]$ wave -r ecg -a qrs

Some alternatives are to add /usr/openwin/bin to your PATH, or to copy textedit into a directory in your PATH, or to make a link from /usr/openwin/bin/textedit to a directory in your PATH; if you do any of these it will not be necessary to set EDITOR each time you plan to use 'textedit' within 'wave'.

Once made this arrangements, when you push the button Analyze and then Edit Menu you are asked to copy wavemenu in your own directory. Once you click on copy the menu (a very useful resource) appears edited with textedit. You can define any other editor (not necessarily textedit) to edit the menu.

Finally, when you press F1 in wave, nothing happens. To get help when you press F1, you can use the next command.

 
[j@localhost Code]$ xmodmap  -e "keysym F1 = Help"
[j@localhost Code]$ wave -r ecg -a qrs

Now, when you press F1 a help window appears.

At this moment we have installed Wave. It is time to enjoy it. If you are connected to the Internet and you type the command

 
[j@localhost Code]$ wave -r slpdb/slp01a -a st

then you have access to the record slp01a of the database slpdb with the annotation st, as if it had been downloaded to your computer. It is a sleep recording with a quantification of stages in epochs of 30 seconds. Believe or not, you can navigate through it from your own computer without downloading the recording.

Let's do the same with our recording:

 
[j@localhost Code]$ wave -r ecg -a qrs

And we can begin to practice with our own data.

In summary

It has been a long and challenging session. At this moment we have installed wave. We can follow the tutorial and edit our results. We can add or eliminate annotations, we can change the type of annotation or assign them to some specific signal. Once finished we will export the results to continue our analysis.

In the next chapter we are going to use Scilab to analyze the data.


next up previous contents
Next: Interacting with Scilab Up: Applying PhysioNet tools to Previous: Reading an ASCII file   Contents
j 2002-12-11