WAVE 's menu file

To understand where the command comes from, we need to inspect WAVE 's menu file. WAVE allows you to edit its menu file using any editor of your choice. By default, WAVE uses a simple Open Look text editor called textedit, which is included with the XView package used by WAVE . If you prefer to use another editor such as emacs, set and export the EDITOR environment variable before starting WAVE (you may wish to include this step in your .login or .cshrc). Most other UNIX applications that invoke an external text editor use the EDITOR environment variable in the same way.

Click left on the \ovalbox{\rule[-.3mm]{0cm}{2.5mm}\small\sf ~Edit menu~} button in the Analyze window.

Unless your WAVE menu has already been customized, WAVE pops up a notice as shown above. Click left on \ovalbox{\rule[-.3mm]{0cm}{2.5mm}\small\sf ~Copy~} to continue with this exercise. After a few seconds, the WAVE menu file appears (in an OpenWindows textedit window as in figure 3.1, unless you have specified a different editor by setting the EDITOR environment variable).

Figure 3.1: The beginning of WAVE 's menu file, in a textedit window.

The comments at the beginning of the WAVE menu file describe how it works. Each of the buttons in the Analyze window (except for those in the first three rows) corresponds to an entry in the menu file. The first part of the entry - up to the first tab character - specifies the label that appears on the button; the remainder of the entry specifies the command that is inserted into the Analysis Commands window if you click left on the button. As noted in the comments, certain strings that begin with `$' are recognized as menu variables and are interpreted by WAVE before being passed to the shell in the Analysis Commands window. In the case of the sqrs command that appears in the Mark QRS complexes entry, these strings are `$RECORD', `$START', `$END', and `$SIGNAL'. WAVE replaces `$RECORD' with the record name, as it appears in the Record field of the Load window. `$START' is the time of the `<' marker, shown in the Start field of the Analyze window; if no `<' marker has been defined, the Start field contains the string `beginning of record', and `$START' becomes 0. Similarly, `$END' is the time of the `>' marker, shown in the End field; if no `>' marker has been defined, the End field is `end of record', and `$END' is determined by the record length as encoded in the header file for the record (see header(5), in the WFDB Applications Guide). Finally, `$SIGNAL' is taken from the Signal field of the Analyze window; it specifies which signal is to be analyzed. (For applications that can analyze more than one signal, the string `$SIGNALS' is taken from the Signal list field.) Examine the commands defined in the default WAVE menu; they should give you an idea of what is possible.

George B. Moody (george@mit.edu)