} tag at the beginning of the line, since \WAVE{} uses this tag
to identify the browser interface command within the menu file.) Consult the
documentation for your browser to see what commands will be needed. (The {\tt
-remote} option is used by Firefox, Mozilla, Netscape, and Opera; Galeon and
Konqueror use variations on this approach, and other browsers will
probably require different methods.) Browsers that do not support any means of
remote control are best avoided (since the only way to use them is to start a
new browser for each new URL, a very inefficient solution).
\index{Galeon}\index{Konqueror}\index{Mozilla}\index{Netscape}\index{Opera}\index{web browser}
\chapter{Printing from \WAVE{}}
\label{ch:printing}
\section{Standard methods for printing}
There are three standard ways to print annotated signals from \WAVE{}.
The first is the easiest:
\index{format!of printed output}
\begin{itemize}
\item
From the {\sf File} menu, select {\sf Print}. This produces a ``chart
recorder'' format copy of the contents of the signal window, as shown
in figure~\ref{fig:chart1}
\begin{latexonly}
(page~\pageref{fig:chart1}).
\end{latexonly}
\end{itemize}
The other two methods require that you first mark the region to be
printed using the `{\tt <}' and `{\tt >}' markers, or by entering the
time interval in the {\sf Start} and {\sf End} fields of the {\sf
Analyze} window. You may also arrange the {\sf Signal list} so that
it contains the signals you wish to print, in the desired top-to-bottom order.
After this preparation, you are ready to print:
\begin{itemize}
\item
Click on \button{Print chart} in the {\sf Analyze} window to produce a
``chart recording'' as shown in figure~\ref{fig:chart2}.
\begin{htmlonly}
\begin{rawhtml}
\end{rawhtml}
\end{htmlonly}
\begin{figure}
\begin{latexonly}
\fbox{\centerline{\epsfig{file=chart2,width=.9\linewidth}}}
\end{latexonly}
\begin{htmlonly}
........................................................................_
\end{htmlonly}
\caption{``Chart recording'' made using {\sf Print chart} from the
{\sf Analyze} window.}
\label{fig:chart2}
\end{figure}
\item
Click on \button{Print full disclosure} in the {\sf Analyze} window
to produce the highly compact format shown in figure~\ref{fig:full-disclosure}.
\end{itemize}
\begin{htmlonly}
\begin{rawhtml}
\end{rawhtml}
\end{htmlonly}
\begin{figure}
\begin{latexonly}
\fbox{\centerline{\epsfig{file=fulldisc,width=.9\linewidth}}}
\end{latexonly}
\begin{htmlonly}
........................................................................_
\end{htmlonly}
\caption{Plot made using {\sf Print full disclosure} from the
{\sf Analyze} window.}
\label{fig:full-disclosure}
\end{figure}
In addition to these three methods, you may also want to try the
method described in
\hyperref{Printing a Log}
{section~}
{, page~\pageref{sec:printing-log}, }
{sec:printing-log}
for printing a
\WAVE{} log together with charts of the signals and annotations for each
entry in it.
\index{resolution!of printed output}
In each case, printing is performed by spawning a {\tt pschart} or
\index{analysis commands window@{\sf Analysis Commands} window}
{\tt psfd} process in the {\sf Analysis Commands} window (after saving
any edits). Since these commands reread the signals, the output
generally has much higher resolution than is possible on screen.
If you are unable to print from \WAVE{}, your printer may not be set
up. See
\hyperref{Printer Setup}
{section~}
{, page~\pageref{sec:printer-setup} }
{sec:printer-setup}
for instructions.
\section{Creating custom formats for printing}
\label{sec:custom-printing}
\index{menu file}
\index{pschart command@{\tt pschart} command}
\index{psfd command@{\tt psfd} command}
Since \WAVE{}'s printing facilities are implemented through its menu
file, you have complete control over the format of the output, simply
by editing the menu file as in the previous chapter. Both
\htmladdnormallink{{\tt pschart}}{../wag/pschar-1.htm}
(used to produce ``chart recorder'' output) and
\htmladdnormallink{{\tt psfd}}{../wag/psfd-1.htm}
(used to produce ``full disclosure'' output) are highly flexible and
can be configured to produce almost any reasonable format by inserting
the appropriate options in the commands given in \WAVE{}'s menu file.
You may change the predefined commands or add new ones as you wish.
\index{Print tag in menu file@{\tt } tag in menu file}
In the menu file, the special tag ``{\tt }'' identifies the
command that runs when you select {\sf Print} from the {\sf File}
menu. You can change this command as you wish, but don't change the
``{\tt }'' tag itself.
A few of the most commonly-used options (usable with either {\tt
pschart} or {\tt psfd}) are listed below. For further details on
these and other options, see
\htmladdnormallink{{\tt pschart(1)}}{../wag/pschar-1.htm} and
\htmladdnormallink{{\tt psfd(1)}}{../wag/psfd-1.htm},
in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm}.
(You can also get a brief summary of the many available options by typing {\tt
pschart~-h} and {\tt psfd~-h}.)
\begin{description}
\index{printer!resolution}
\index{resolution!of printed output}
\item[{\tt -d} \textit{n}]
Optimize for use with a printer with a resolution of \textit{n} dots
per inch (default: 300 dpi, the typical resolution for low-end laser
printers). This option has no effect on the output scale, and need
not be correct for your printer; it does, however, affect the amount
of detail rendered and the thickness of the lines that are drawn.
\item[{\tt -E}]
\index{PostScript}
Generate EPSF format, suitable for inclusion in another PostScript
file. (I used this option when preparing the {\tt pschart} and {\tt
psfd} plots in this guide). The default format is PostScript, but
\emph{not} EPSF, for two reasons. First, a legal EPSF plot must fit
entirely on one page, but {\tt pschart} and {\tt psfd} are frequently
used to produce multi-page plots. Second, an EPSF plot may be
rescaled if it is included in another document, and the scales printed
at the bottom of the plot will be incorrect if this happens (as is the
case in the plots reproduced in this guide).
\item[{\tt -g}]
Print a grid (using {\tt pschart}) or a set of time axes (using {\tt
psfd}).
\item[{\tt -l}]
Label the signals in the plot margins.
\item[{\tt -L}]
Print in ``landscape'' orientation (default: portrait orientation).
The charts made by selecting {\sf Print} from the {\sf File} menu are
printed using this option.
\item[{\tt -M}\textit{n}]
The numeric argument \textit{n} attached to this option (there should
be no whitespace between {\tt -M} and \textit{n}) controls where
annotations appear relative to the signals, and the appearance of the
marker bars. Unless you display annotations as a signal in \WAVE{}, you
may wish to use the option {\tt -M\$DISPMODE} in the menu file --
if you do so, then your printed output will show annotations and
marker bars the same way that \WAVE{} does.
\item[{\tt -P} \textit{pagesize}]
Use this option to print on non-standard paper, or to make a plot that
fits in a smaller space. The default \textit{pagesize} is set when
{\tt psfd} and {\tt pschart} are compiled. For the precompiled
binaries distributed with \WAVE{}, the default is {\tt letter} (US
letter size paper, 8.5 x 11 inches, or 216 x 279 mm). In most of the
rest of the world, the standard is {\tt A4} (210 x 297 mm). You can
specify pagesize as ``{\tt letter}'', ``{\tt A4}'', or a number of
other popular sizes, or as ``\textit{width}x\textit{height}'', where
\textit{width} and \textit{height} are the dimensions in millimeters.
I used this option to prepare figure~\ref{fig:chart1}
\begin{latexonly}
(on page~\pageref{fig:chart1})
\end{latexonly}
in a relatively compact form; if you print
a figure like it with the default page size, there will be
considerable empty space between the plot itself and the page headers
and footers.
\item[{\tt -t} \textit{n}]
This option sets the time scale, in mm/sec. Defaults are 12.5 mm/sec
for {\tt pschart}, and 2.5 mm/sec for {\tt psfd}. For {\tt pschart},
you might wish to use the option {\tt -t \$TSCALE} in the menu
file, so that your charts will be printed at the same time scales you
choose for \WAVE{}'s signal window.
\item[{\tt -v} \textit{n}]
\index{amplitude scale!on printed output}
This option sets the amplitude scale, in mm/mV. Defaults are 5 mm/mV
for {\tt pschart}, and 1 mm/mV for {\tt psfd}. For {\tt pschart},
you might wish to use the option {\tt -v \$VSCALE} in the menu
file, so that your charts will be printed at the same amplitude scales you
choose for \WAVE{}'s signal window.
\end{description}
\index{PostScript}
\index{printer!non-PostScript}
This list of options only hints at what is possible using {\tt
pschart} and {\tt psfd}. There are many other options described in
the {\tt man} pages, and it is also possible to redefine the
PostScript primitives used by these programs (for example, to change
the appearance of the grid, or to plot in color on a color-capable
printer) by modifying their PostScript prolog files. It is also
possible to replace these programs entirely (for example, with your
own applications for printing on a non-PostScript printer) if desired,
simply by editing \WAVE{}'s menu file.
\chapter{Calibration}
\label{ch:calibration}
\index{calibration}\index{display calibration}\index{signal!calibration}
\begin{htmlonly}
\index{adus (analog/digital converter units)}
\end{htmlonly}
\begin{latexonly}
\index{adus (analog/digital converter units)|textbf}
\end{latexonly}
\index{physical units}
\index{units!physical}\index{units!ADC}
By \emph{calibration}, we refer to the information needed to establish
the true amplitudes of signals.
There are two distinct aspects of calibration. First is \emph{signal
calibration}, the process of establishing the relationship between the
sample values in analog-to-digital converter units (\emph{adus}) and
the physical units of the signals (millivolts, millimeters of mercury,
etc.). Second is \emph{display calibration}, the process of determining
standard scales for displaying various types of signals (e.g., 10
mm/mV, 1 mm/10 mmHg).
\section{Signal calibration}
\index{header file}\index{gain}\index{signal!gain}\index{signal!baseline}
\index{baselines}
If your signals come from standard databases (see
\hyperref{System Requirements}
{Appendix~}
{, page~\pageref{app:system-requirements}}
{app:system-requirements}),
signal
calibration is usually not a concern. Briefly, the \emph{header file} for each
database record contains calibration information for each signal. This
information includes (for each signal) the gain (the number of adus per
physical unit), the baseline (the sample value that corresponds to zero
physical units), the type of physical unit, and the type of signal. (Not all
header files contain all of this information, but \WAVE{} can make
reasonable guesses about any of it that may be missing in most cases.)
If you have digitized your own signals, however, you should generally calibrate
them before processing them further. \WAVE{} makes it easy to do so,
provided that you have recorded signals with known amplitudes. The procedure
is:
\begin{itemize}
\item
Use \WAVE{} to display the uncalibrated signals.
\index{calibration pulse}
\item
Find a calibration pulse (or a segment with known amplitudes). Mark samples
of the low and high amplitude phases using the `{\tt <}' and `{\tt >}' markers
respectively.
\begin{figure}
\centerline{\epsfig{file=calibrate}}
\caption[Signal calibration.]{Signal calibration using \WAVE{}.
Signal 3 (ABP) has been selected (note that all of the other signal
numbers have been removed from the {\sf Signal list}). The `{\tt <}'
and `{\tt >}' markers bracket a step in the recorded calibration
pulse near the center of the signal window. In the {\sf Analyze}
window, we have clicked on \button{Calibrate}, and the result of doing
so appears in the {\sf Analysis Commands} window.}
\label{fig:calibration}
\index{calibration}
\begin{htmlonly}
\index{analysis commands window@{\sf Analysis Commands} window}
\end{htmlonly}
\begin{latexonly}
\index{analysis commands window@{\sf Analysis Commands} window|textit}
\end{latexonly}
\end{figure}
\item
Set the {\sf Signal list} field in the {\sf Analyze} window to match
the signal(s) you have marked. You can calibrate more than one signal
at a time if suitable calibration pulses for each signal are present
between the `{\tt <}' and `{\tt >}' markers. Be sure to remove any
other signals from the {\sf Signal list}.
\item
Click left on \button{Calibrate} in the {\sf Analyze} window, and
answer any questions that appear in the {\sf Analysis Commands}
window. These questions will always appear if the header file for the
record does not contain signal descriptions or physical unit
specifications; some or all of the questions may not appear if the
signal type and calibration pulse type are already known.
\item
Repeat the previous steps for any other signals that require calibration.
\item
Close and reopen the record. (\WAVE{} does not adjust the display scales
until this has been done.)
\end{itemize}
\index{signal!calibration}\index{calibration!signal}
Figure~\ref{fig:calibration} illustrates signal calibration using a
record from the MIMIC Database. In this case, the type of signal
(ABP) is known from an entry in the {\tt WFDBCAL} file (not shown here),
so that {\tt calsig} is able to determine the physical units of the
signal (mmHg). Since a variety of calibration pulses are used for ABP
signals, the {\tt WFDBCAL} file does not specify the pulse levels, which
{\tt calsig} has asked us to enter (in this case, we have entered
{\tt 60} and {\tt 120}). Based on this information, {\tt calsig}
determines the offset and gain needed to convert raw sample values for
signal 3 into ABP measurements in mmHg. {\tt calsig} then makes
the appropriate changes to the header file for the current record.
When \WAVE{} or another WFDB application next opens this record, the ABP
signal will be properly calibrated.
\index{calsig command@{\tt calsig} command}
By default, {\tt calsig} generates an amplitude histogram of the
samples between the `{\tt <}' and `{\tt >}' markers. It then
identifies the low and high amplitude portions of the calibration
pulse by searching for the two largest distinct modes in this
amplitude histogram. For this reason, {\tt calsig} works best if
the segment bounded by the `{\tt <}' and `{\tt >}' markers includes at
least a few samples of both the high and low amplitude phases. Avoid
placing either marker immediately next to the transition point between
the phases if possible. If {\tt calsig} fails to find two distinct
peaks in the amplitude histogram, it will produce an error message;
if this happens, adjust the positions of the markers and try again.
In some cases (for example, if the calibration pulse is a sawtooth, as
in the RESP signal at the bottom of figure~\ref{fig:calibration}),
this strategy may fail, no matter where the markers are placed. In
such cases, try again with {\tt calsig}'s {\tt -q} or {\tt -Q}
options to use one of its alternate algorithms. (These are less
robust since they depend on differential rather than integrative
measurements, but they can be used in a pinch.)
For further information on signal calibration, see
\htmladdnormallink{{\tt calsig(1)}}{../wag/calsig-1.htm},
in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm}.
\section{Display calibration}
\index{display calibration}\index{calibration!display}
Display calibration is performed by \WAVE{} in several steps:
\begin{itemize}
\index{resolution!of display}
\index{dpi option for WAVE@{\tt -dpi} option for \WAVE{}}
\index{command-line options!{\tt -dpi}}\index{options!{\tt -dpi}}
\item
First, \WAVE{} determines the display resolution (either
from the {\tt -dpi} com\-mand-line option if possible, otherwise from the
{\tt Wave.Dpi} resource if possible, or by querying the X server if
neither the command-line option nor the resource was specified).
\index{scales!time}\index{scales!amplitude}\index{time scale}
\index{amplitude scale}\index{View window@{\sf View} window}
\item
Next, \WAVE{} determines what scales to use for time and amplitude. You
can set these using the \amenubutton{Time scale:} and \amenubutton{Amplitude
scale:} menu buttons in the {\sf View} window. The amplitude scale refers to
standard ECG signals; the default scales (10 mm/mV and 25 mm/sec) are those
used for standard ECG chart recordings. If you choose a non-standard amplitude
scale, \WAVE{} sets its magnification factor to the ratio between that
scale and 10 mm/mV.
\item
Finally, if any of the signals to be displayed are not ECGs, \WAVE{} checks
the WFDB calibration file (named by the {\tt WFDBCAL} environment variable) for
entries that specify the standard display scales for those signals. \WAVE{}
multiplies these scales by its magnification factor (see above) in order to
determine the final display scales.
\end{itemize}
\index{signal!type}\index{calibration file}
\index{WFDBCAL environment variable}\index{environment variables!WFDBCAL}
\index{Load window@{\sf Load} window}
In general, it is not necessary to do anything to make \WAVE{} display
common signals at reasonable scales. If you have a previously undefined signal
type, or you need to change the size of a particular type of signal relative to
that of an ECG, however, simply edit a copy of the WFDB calibration file, reset
{\tt WFDBCAL}, and restart \WAVE{}. (If you wish, you need not exit and
restart \WAVE{}; instead, give the copy a different name, then change the
{\sf Calibration file} item in the {\sf Load} window to match. Any changes are
effective only when the signal window is redrawn.) See
\htmladdnormallink{{\tt wfdbcal(5)}}{../wag/wfdbca-5.htm},
in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm},
for details.
If the display calibration appears incorrect for all signals, the X
server may be supplying incorrect information about the display size
to \WAVE{}. This problem can be diagnosed by setting the time and amplitude
scales to their default values (nominally 25 mm/sec and 10 mm/mV),
and displaying the default grid (0.5 mV x 0.2 s). If the grid
intervals are not 5 mm in each direction, follow the procedure in
\hyperref{``How can I get correct display scales?''}
{section~}
{, page~\pageref{faq:display-scales}}
{faq:display-scales}.
\chapter{Customizing \WAVE{}}
In the previous chapters, we saw how \WAVE{}'s {\sf Analyze} window
can be modified by editing the \WAVE{} menu file. This chapter
describes several other ways in which \WAVE{} can be customized.
\section{Using the {\sf View} window}
\begin{latexonly}
In section~\ref{sec:selecting-annotation}, we briefly opened the
{\sf View} window (see figure~\ref{fig:view-window},
page~\pageref{fig:view-window}) in order to turn on the marker bar
display. Open the {\sf View} window again, and examine the other
controls in it.
\end{latexonly}
\begin{htmlonly}
Earlier, we briefly opened the {\sf View} window (see
figure~\ref{fig:view-window}) in order to turn on the marker bar
display. Open the {\sf View} window again, and examine the other
controls in it.
\end{htmlonly}
Three important controls are located along the bottom edge of the window.
\button{Redraw} makes \WAVE{} refresh the signal window, and also closes the
{\sf View} window You should click on \button{Redraw} in order to see the
effects of any changes you make in the {\sf View} window. The other two
buttons in this group are described below.
Along the top of the window, just below the title bar, is a row of
on/off controls used to turn on various optional display elements.
These controls appear depressed (darker than the background) when they
are `on'. The first four of these ({\sf subtype}, {\sf `chan' field},
{\sf `num' field}, and {\sf `aux' field}) control the display of
secondary fields in the annotations. If any of these controls are
`on', the corresponding fields are displayed below each annotation
mnemonic, in the order shown in the {\sf View} window.
\index{amplitude scale}
\index{time scale}
The \amenubutton{Time scale:} and \amenubutton{Amplitude scale:}
menu buttons allow you to choose any of a wide range of standard
scales for the signal (and {\sf Scope}) windows. Click right on
the \button{$\nabla$} to open the menu.
The \amenubutton{Draw:} menu offers the choice of displaying {\sf all
signals} (the default) or {\sf listed signals only} (i.e., those named
in the {\sf Signal list} in the {\sf Analyze} window). By choosing to
display {\sf listed signals only}, you may rearrange the signals
within in the signal window. By listing a signal in two or more
entries in the signal list, you can arrange to have that signal drawn
in two or more locations; this can be useful for making side-by-side
comparisons of a signal against several others. You may also find
it useful to remove one or more signals from the signal list in order
to reduce crowding in the signal window; this technique is nearly essential
if the record has more than about 12 signals. (You can also change
the spacing between signals uniformly by resizing \WAVE{}'s main window.)
\index{format!of annotation display}
The \amenubutton{Show annotations:} menu offers three ways to display
annotations: {\sf centered} (the default), {\sf attached to signals},
and {\sf as a signal}. If you choose {\sf attached to signals}, the
{\tt chan} field of each annotation specifies the signal number to
which the annotation is attached, and the annotation is displayed
slightly above this signal. (Any annotations that have {\tt
chan} fields that are not valid signal numbers for the current record
are displayed at the center of the signal window.) If you choose {\sf
as a signal}, the {\tt num} field of each annotation is taken as the
amplitude of a signal at the time of the annotation, and \WAVE{} draws
this signal in the center of the signal window by connecting the
amplitude/time pairs specified by the annotations with straight line
segments.
\index{format!of time display/entry}
\index{absolute time}
\index{elapsed time}
\index{time!display mode}
The \amenubutton{Time display:} menu provides three alternatives for
display of times in the lower corners of the signal window: {\sf
elapsed} (the default), {\sf absolute}, and {\sf in sample intervals}.
Elapsed time measures the interval in hours, minutes, and seconds from
the beginning of the record. Absolute time (i.e., time of day and
date) is not defined for all records. If it is available, choosing
{\sf absolute} from this menu will cause \WAVE{} to show absolute times
in the signal window, using the color \WAVE{} uses for annotations;
otherwise, \WAVE{} switches to {\sf elapsed} time display. Times may
also be displayed {\sf in sample intervals} (counting from the
beginning of the record) for any record; these may
be recognized in the signal window by the `{\sf s}' prefix.
\index{format!of grid display}
The choice you make from the \amenubutton {Grid display:} menu
determines how \WAVE{} draws the background grid in the signal window.
The grid intervals are fixed in time and amplitude units. At the
default scales (25 mm/sec, 10 mm/mV) the default grid ({\sf 0.2 s x
0.5 mV}) has 5 mm intervals if the display is properly calibrated.
(If this is not the case, see
\hyperref{``How can I get correct display scales?''}
{section~}
{, page~\pageref{faq:display-scales}}
{faq:display-scales}.)
If you change the time or
amplitude scales, the grid intervals change size to match, so that you
always have a visual cue about the display scale if you leave the grid
display on. If you choose a very small time scale (i.e., one that
permits \WAVE{} to display a large amount of data in the signal window),
the grid may appear solid grey; in this case, you may wish to choose
``{\sf 1 m x 0.5 mV}'' from this menu (so that the vertical grid lines
appear at 1-minute intervals), or `{\sf 0.5 mV}'' (thereby suppressing
the vertical grid lines), or even ``{\sf no grid}''. At relatively
large scales, where it may be useful to have a finer grid, choose
``{\sf 0.04 s x 0.1 mV}''. To display highly time-compressed data
with fine horizontal grid lines, choose ``{\sf 1 m x 0.1 mV}''.
If you make changes in the {\sf View} window and wish to discard them
before clicking on \button{Redraw}, you may do so by clicking on
\button{Undo changes}. This button does not restore the initial
values if you have registered earlier changes by using
\button{Redraw}; to do this, you must restart \WAVE{}.
If, on the other hand, you have made changes in the {\sf View} window
and wish to have \WAVE{} start up with these settings, click on
\button{Save as new defaults}. Note that \WAVE{} saves the current
state of the signal window \emph{as it appears when you click on}
\button{Save as new defaults}; if you haven't made your changes
effective using \button{Redraw}, they won't be saved.
\subsection{Highly time-compressed displays}
At highly compressed time scales (defined as any scale of 125 mm per minute or
less), \WAVE{} normally suppresses the grid display, even if you have specified
a default grid display for use at other time scales. To change this behavior,
select the desired grid display mode, click on \button{Redraw}, and then on
\button{Save as new defaults} \emph{while viewing signals at 125 mm/min or
less}.
\subsection{Low-rate records}
Low-rate records (defined as those that are sampled at rates of 10 Hz or less)
are displayed by default at a time scale of 5 mm per minute. To change this
default, simply change to the desired scale (all of the standard scales are
available in any case) click on \button{Redraw}, and then on
\button{Save as new defaults} \emph{while a low-rate record is open}.
\section{Resizing the signal and {\sf Scope} windows}
\WAVE{}'s main window, which contains the signal window, may be resized
using the resize ``handles'' provided by your window manager. If you
are using an Open Look window manager such as {\tt olwm} or {\tt
olvwm}, as recommended, the resize handles are at the corners of the
window. To use them, move the pointer over a resize handle; when the
pointer changes shape, click left and drag it to the desired location.
(\WAVE{} adjusts the window width to the nearest multiple of one
second.) If you use \button{Save as new defaults} in the {\sf View}
window, as described above, the new window size will be the default
for future sessions.
The {\sf Scope} window may be resized in the same way, but its default
(initial) size may not be changed.
\section{\WAVE{}~environment variables}
\index{environment variables!list of}
\WAVE{} uses many environment variables; they are listed in this section
roughly in order of importance. Many of them need not be set at all, since
\WAVE{} uses reasonable default values in most cases. Those that are set
must be set on the \WAVE{} host.
\index{WAVE host@\WAVE{} host}
For general information on how to set
environment variables, see the discussion of the
\hyperref{{\tt DISPLAY} variable}
{{\tt DISPLAY} variable in section~}
{, page~\pageref{sec:setting-display}}
{sec:setting-display}.
\begin{description}
\index{DISPLAY environment variable}\index{environment variables!DISPLAY}
\item[{\tt DISPLAY}]
The name of the X server and display you are using (see
\hyperref{the worksheet}
{section~}
{, page~\pageref{worksheet}}
{worksheet}).
If not set, \WAVE{} will not be able to open windows on your display
unless your display is attached to the \WAVE{} host directly (not via
network connection).
\index{WFDB environment variable}\index{environment variables!WFDB}
\item[{\tt WFDB}]
The database path (see
\htmladdnormallink{{\tt setwfdb(1)}}{../wag/setwfd-1.htm},
in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm}.
If not set, \WAVE{} can find database files only in the locations
specified by the compiled-in default database path, which normally
includes the current directory and the {\tt /usr/database} directory
(on the \WAVE{} host), and PhysioBank's archives at
\begin{htmlonly}
\htmladdnormallink{\tt http://physio\-net.\-org/\-physio\-bank/\-data\-base}{http://physionet.org/physiobank/database/}
\end{htmlonly}
\begin{latexonly}
{\tt http://physio\-net.\-org/\-physio\-bank/\-data\-base}
\end{latexonly}
(if the Internet is accessible from the \WAVE{} host).
\index{WFDBCAL environment variable}\index{environment variables!WFDBCAL}
\item[{\tt WFDBCAL}]
The WFDB calibration file (see
\htmladdnormallink{{\tt setwfdb(1)}}{../wag/setwfd-1.htm} and
\htmladdnormallink{{\tt wfdbcal(5)}}{../wag/wfdbca-5.htm},
in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm},
and
\hyperref{Calibration}
{chapter~}
{, page~\pageref{ch:calibration}}
{ch:calibration}).
If not set, \WAVE{} reads a default calibration file specified when
the WFDB library was compiled. If the calibration file cannot be
read, \WAVE{} may not scale signals other than ECGs correctly.
\index{WAVEMENU environment variable}\index{environment variables!WAVEMENU}
\item[{\tt WAVEMENU}]
The name of \WAVE{}'s
\hyperref{menu file}
{menu file (see section~}
{, page~\pageref{sec:menu-file}}
{sec:menu-file}).
If not set, \WAVE{} uses {\tt wavemenu}
in the current directory if possible; otherwise, it uses \WAVE{}'s
default menu ({\tt \$MENUDIR/wavemenu.def}).
\index{PATH environment variable}\index{environment variables!PATH}
\index{SHELL environment variable}\index{environment variables!SHELL}
\index{analysis commands window@{\sf Analysis Commands} window}
\item[{\tt SHELL}]
The command interpreter used within the {\sf Analysis Commands} window. If
not set, \WAVE{} uses {\tt /bin/sh} (the Bourne shell). Other shell-related
variables, such as {\tt PATH}, are also significant when \WAVE{} is running
commands within the {\sf Analysis Commands} window.
\index{EDITOR environment variable}\index{environment variables!EDITOR}
\item[{\tt EDITOR}]
The name of the text editor to be used for modifying \WAVE{}'s menu
file. If not set, \WAVE{} uses {\tt textedit}.
\index{URLV environment variable}\index{environment variables!URLV}
\item[{\tt URLV}]
The name of the web browser to be used for viewing LINK annotation
attachments and some of \WAVE{}'s on-line help; normally, {\tt URLV}
should be one of {\tt galeon}, {\tt konqueror}, {\tt mozilla}, {\tt netscape},
or {\tt opera}. If not set, \WAVE{} uses Mozilla. See
\hyperref{\WAVE{} and the Web}
{section~}
{, page~\pageref{sec:web},}
{sec:web}
for details.
\index{Galeon}\index{Konqueror}\index{Mozilla}\index{Netscape}\index{Opera}
\index{web browser}
\index{PRINTER environment variable}\index{environment variables!PRINTER}
\index{PostScript}
\item[{\tt PRINTER}]
The name of a PostScript printer accessible to the \WAVE{} host, to be
used for paper output. If not set, \WAVE{} uses the default printer.
\index{PSPRINT environment variable}\index{environment variables!PSPRINT}
\item[{\tt PSPRINT}]
\index{lpr command@{\tt lpr} command}
The command needed to print PostScript from the standard input. If
not set, \WAVE{} uses the command {\tt lpr} (or {\tt lpr -P\$PRINTER},
if {\tt PRINTER} is set).
\index{TEXTPRINT environment variable}\index{environment variables!TEXTPRINT}
\item[{\tt TEXTPRINT}]
The command needed to print ordinary text from the standard input. If
not set, \WAVE{} uses the command {\tt lpr} (or {\tt lpr -P\$PRINTER},
if {\tt PRINTER} is set).
\index{ANNTAB environment variable}\index{environment variables!ANNTAB}
\index{annotation!table of definitions}
\item[{\tt ANNTAB}]
The name of a file that contains custom annotation definitions (see
the discussion of
\hyperref{{\tt Wave.Anntab}}
{{\tt Wave.Anntab} in section~}
{, page~\pageref{anntab}}
{anntab}
for details). If not set, \WAVE{} uses standard annotation definitions
only.
\end{description}
The environment variables below are not needed unless the \WAVE{} binary
distribution, or XView,
\index{XView}
has been installed in non-standard directories:
\begin{description}
\index{on-line help}
\index{HELPPATH environment variable}\index{environment variables!HELPPATH}
\item[{\tt HELPPATH}]
The path for XView spot help; if not set, \WAVE{} initializes it to
{\tt /usr/lib/help}. \WAVE{}'s own spot help is in
{\tt \$HELPDIR/wave}, which is appended to the end of {\tt HELPPATH}
by \WAVE{}.
\index{HELPDIR environment variable}\index{environment variables!HELPDIR}
\item[{\tt HELPDIR}]
The directory in which \WAVE{}'s help directory is located; if not set,
\WAVE{} uses {\tt /usr/help}.
\index{MENUDIR environment variable}\index{environment variables!MENUDIR}
\item[{\tt MENUDIR}]
The name of the directory that contains \WAVE{}'s default menu file;
if not set, \WAVE{} uses {\tt /usr/lib}.
\index{RESDIR environment variable}\index{environment variables!RESDIR}
\item[{\tt RESDIR}]
The name of the directory in which system-wide default X11 resource files
are kept; if not set, \WAVE{} uses {\tt /usr/lib/X11/app-defaults}.
See the {\tt man} page for \WAVE{} for information about other
directories that are searched for resource files.
\end{description}
\section{X11 resources for \WAVE{}}
\label{sec:resources}
\index{resources}\index{X11 resources}
You can control many aspects of \WAVE{}'s appearance and behavior by
setting its resources. If you are not familiar with this concept, refer to an
introductory book on using the X Window System, such as Quercia and O'Reilly's
{\it X Window System User's Guide}. Since \WAVE{} is built using the XView
toolkit,
\index{XView}
all of the resources listed in the {\tt man} page for {\tt xview}
can be used with \WAVE{} (type `{\tt man xview}' for details).
If your system doesn't have an XView {\tt man} page, refer to the copy provided
with the \WAVE{} distribution
(\htmladdnormallink{{\tt xview.7}}{../wag/xview-7.htm}).
In addition, the \WAVE{}-specific resources listed below may also be set.
The standard way to change default values of X11 resources is to
define them in a file named {\tt .Xdefaults} (note the initial `{\tt
.}') in your home directory. \WAVE{} does this when you use
\button{Save as new defaults} in the {\sf View} panel.
If you use \WAVE{} on workstations with different display capabilities, you can
create custom resource settings for each one by moving these resource
definitions from {\tt .Xdefaults} to {\tt .Xdefaults-{\it hostname}} (where
{\it hostname} specifies the system to which the display is attached).
\begin{description}
\index{annotation!marker bars}\index{marker bars}
\item[{\tt Wave.AllowDottedLines}]
This resource specifies if \WAVE{} is allowed to render dotted lines. \WAVE{}
normally draws annotation marker bars as dotted lines, and may use dotted
lines for other display elements on black-and-white displays for clarity.
Some X servers do not properly render dotted lines, however; if you
observe irregular or missing annotation marker bars, change the value of
this resource from `{\tt True}' to `{\tt False}' (by editing {\tt .Xdefaults}).
\label{anntab}
\index{ANNTAB environment variable}\index{environment variables!ANNTAB}
\index{annotation!table of definitions}
\item[{\tt Wave.Anntab}]
This resource specifies the name of a file that contains a table of
annotation definitions. The environment variable {\tt ANNTAB} can also be used
to specify this filename; the resource overrides the environment variable
if both are set. The file contains one-line entries of the form
\begin{verbatim}
15 % Funny looking beat
\end{verbatim}
in which the first field specifies the (numeric) annotation code in
the range between 1 and {\tt ACMAX} inclusive (see {\tt
/usr/include/wfdb/ecgcodes.h} for a list of predefined codes and for
the definition of {\tt ACMAX}); the second field (`{\tt \%}' in the
example) is a mnemonic (used in annotation display and entry), and the
remainder of the entry is a description of the intended use of the
annotation code (which appears next to the mnemonic in the {\sf Type}
field and menu of the {\sf Annotation Template} window). Lines in the
annotation table that begin with `{\tt \#}' are treated as comments
and ignored. It is not necessary to specify an annotation table when
editing an existing annotation file unless previously undefined
annotation types are to be added to it during the editing process,
although it is generally harmless to do so.
\index{resolution!of display}
\index{display resolution}\index{resolution}
\index{dpi option for WAVE@{\tt -dpi} option for \WAVE{}}
\index{command-line options!{\tt -dpi}}\index{options!{\tt -dpi}}
\item[{\tt Wave.Dpi}]
This resource specifies the display resolution in dots per inch in the form
{\it mm}{\tt x}{\it nn}, where {\it mm} is the horizontal resolution and {\it
nn} is the vertical resolution. Normally, the resolution is known to the X
server, and it is unnecessary to specify this resource. If your X server is
misinformed, \WAVE{}'s calibrated display scales will be incorrect; the best
solution is to specify the resolution using a server option such as the {\tt
-dpi} option supported by MIT's X11 servers, since this will solve problems
common to any other applications that require calibrated scales as well. Not
all X11 servers support such an option, however, so this option is available
as a work-around. The command-line option {\tt -dpi} overrides the resource
if both are specified.
\index{graphics mode}
\index{display mode}
\index{g option for WAVE@{\tt -g} option for \WAVE{}}
\index{command-line options!{\tt -g}}\index{options!{\tt -g}}
\index{m option for WAVE@{\tt -m} option for \WAVE{}}
\index{command-line options!{\tt -m}}\index{options!{\tt -m}}
\index{O option for WAVE@{\tt -O} option for \WAVE{}}
\index{command-line options!{\tt -O}}\index{options!{\tt -O}}
\index{S option for WAVE@{\tt -S} option for \WAVE{}}
\index{command-line options!{\tt -S}}\index{options!{\tt -S}}
\item[{\tt Wave.GraphicsMode}]
This resource specifies the graphics mode used by \WAVE{}; it can be
overridden using the {\tt -g}, {\tt -m}, {\tt -O}, or {\tt -S} options. The
legal values are 1 (monochrome mode), 2 (overlay greyscale mode), 4
(shared color mode), 6 (shared grey mode), and 8 (overlay color mode).
\label{setting-colors}
\index{colors!signal window}
\item[{\tt Wave.SignalWindow.\{Grey|Color\}.}{\it element}]
These resources specify the colors to be used on greyscale or color
displays. The {\tt Color.}{\it *} resources are used only if the display is
color-capable and neither greyscale nor monochrome mode has been
specified. {\it element} is one of {\tt Background}, {\tt Grid}, {\tt
Cursor}, {\tt Annotation}, or {\tt Signal}. The defaults are:
\begin{center}
\begin{tabular}{lll}
{} & {\tt Grey} & {\tt Color} \\ \hline
{\tt Background} & white & white \\
{\tt Grid} & grey75 & grey90 \\
{\tt Cursor} & grey50 & orange red \\
{\tt Annotation} & grey25 & yellow green \\
{\tt Signal} & black & blue \\
\end{tabular}
\end{center}
\item[{\tt Wave.SignalWindow.Mono.Background}]
In monochrome mode, the background is normally white, and all other
elements are normally black. The reverse can be obtained by setting this
resource to `{\tt black}'. (There is at least one X server for which this
fails.)
\index{Scope window@{\sf Scope} window}
\index{colors!scope window}
\item[{\tt Wave.Scope.\{Grey|Color\}.\{Foreground|Background\}}]
These resources specify the colors to be used in the {\sf Scope}
window on greyscale or color displays. The {\tt Foreground} color is
used for the waveform and the time display; by default, it matches the
color used for signals in the signal window (see the previous item).
Some X servers do not allow the background color of the {\sf Scope}
window to be set, because of the color map animation and stippled
erasing techniques used.
\item[{\tt Wave.Scope.Mono.Background}]
This resource can be used to invert the foreground and background of
the {\sf Scope} window when \WAVE{} is running in monochrome mode.
This does not work for all X servers.
\index{signal!window!dimensions}\index{window!size}
\item[{\tt Wave.SignalWindow.\{Height\_mm|Width\_mm\}}]
These resources specify the preferred dimensions (in millimeters) for the
signal window. The defaults are 120 and 250 respectively.
\index{font!in signal window}\index{annotation!display font}
\item[{\tt Wave.SignalWindow.Font}]
This resource specifies the font used to display annotations and time marks in
the signal window. The default is `{\tt fixed}'.
\index{EDITOR environment variable}\index{environment variables!EDITOR}
\item[{\tt Wave.TextEditor}]
This resource specifies the name of the text editor invoked by \WAVE{} to
permit you to edit \WAVE{}'s log and analysis menu files. The default is
{\tt textedit} (the OpenLook visual editor). You may override this resource
by using the environment variable {\tt EDITOR}, which is also used by many
other UNIX applications that invoke editors.
\item[{\tt Wave.View.{\it showoption}}]
These resources specify which of the {\sf Show:} options at the top of the
{\sf View} window are enabled by default. {\it showoption} is one of {\tt
Subtype}, {\tt Chan}, {\tt Num}, {\tt Aux}, {\tt Markers}, {\tt SignalNames},
{\tt Baselines}, or {\tt Level}. The values of these
resources are `{\tt True}' or `{\tt False}'.
\index{amplitude scale}
\index{time scale}
\item[{\tt Wave.View.{\it menuname}}]
These resources specify the positions of the initial choices in the
corresponding {\sf View} menus, where the top item on each menu is in
position 0, the one below it is in position 1, etc. {\it menuname} is
one of {\tt TimeScale}, {\tt AmplitudeScale}, {\tt SignalMode}, {\tt
AnnotationMode}, {\tt AnnotationOverlap}, {\tt TimeMode}, or {\tt GridMode}.
For example, to set the initial time scale to 50 mm/sec (the item at position
13 in the \amenubutton{Time Scale:} menu), set {\tt Wave.View.TimeScale} to 13.
\item[{\tt Wave.View.CoarseGridMode}]
This resource specifies the initial grid display mode to be used at highly
compressed time scales (125 mm/minute or less). The possible values are the
same as those for {\tt Wave.View.GridMode}. The default is 0 (no grid);
recommended alternatives are 5 (1 m x 0.5 mV) or 6 (1 m x 0.1 mV).
\item[{\tt Wave.View.CoarseTimeScale}]
This resource specifies the initial time scale to be used for low-rate
records (those sampled at 10 Hz per signal or less). The possible values are
the same as those for {\tt Wave.View.TimeScale}. The default is 5
(corresponding to 5 mm per minute).
\end{description}
\index{XView}
\index{xrm option for WAVE@{\tt -xrm} option for \WAVE{}}
\index{command-line options!{\tt -xrm}}\index{options!{\tt -xrm}}
\index{default option for WAVE@{\tt -default} option for \WAVE{}}
\index{command-line options!{\tt -default}}\index{options!{\tt -default}}
In addition to the usual ways of setting X resources, it is possible
to set any of those listed above, as well as any of the generic XView
resources, by using the {\tt -xrm} or {\tt -default} options on the
command line when starting \WAVE{}. For example, you can set the background
color of the signal window using a command such as
\begin{verbatim}
wave -r 100s -xrm Wave.SignalWindow.Color.Background:lightblue
\end{verbatim}
\appendix
\chapter{Summary of \WAVE{}~controls}
This appendix contains an entry for each of \WAVE{}'s controls.
The entries appear according to the position of the controls in
left-to-right order within each window or menu. The {\sf Annotation
Template}, {\sf Search Template}, and {\sf Scope} window controls are
listed separately at the end.
\index{help}\index{on-line help}
This information is also available as spot help for each control
(point to the control and press the \keycap{HELP} key, or the \keycap{F1}
key if your keyboard does not have a \keycap{HELP} key).
\section{\WAVE{}'s main window}
\begin{figure}[h]
\centerline{\epsfig{file=main-control-panel}}
\end{figure}
\begin{description}
\index{File menu@{\sf File} menu}
\item[\menubutton{File}]
This button opens the {\sf File} menu, containing
selections for loading, saving, printing, analyzing, and logging
database files. (See
\hyperref{File menu}
{section~}
{, page~\pageref{sec:file-menu}}
{sec:file-menu}.)
\index{View window@{\sf View} window}
\item[\button{View...}]
This button pops up the {\sf View} window, which allows you to choose
(or merely examine) display scales, grid styles, and annotation,
signal, and time display styles. Changes are not effective until the
signal window is redrawn. (See
\hyperref{View window}
{section~}
{, page~\pageref{sec:view-window}}
{sec:view-window}.)
\index{Edit menu@{\sf Edit} menu}
\item[\menubutton{Edit}]
The {\sf Edit} menu allows you to specify if annotation
editing is to be allowed or forbidden. By default, editing is forbidden when
\WAVE{} starts up. (See
\hyperref{Edit menu}
{section~}
{, page~\pageref{sec:edit-menu}}
{sec:edit-menu}.)
\index{Properties menu@{\sf Properties} menu}
\item[\menubutton{Properties}]
This button brings up the {\sf Properties} menu, with selections for obtaining
information about the current signal and annotation files and about this
version of \WAVE{}. (See
\hyperref{Properties menu}
{section~}
{, page~\pageref{sec:prop-menu}}
{sec:prop-menu}.)
\index{Find window@{\sf Find} window}
\index{search}\index{annotation!searching for}
\item[\button{{\tt <} Search}]
This button recenters the signal window on the previous occurrence of
an annotation or marker that matches the entry in the {\sf Search for}
field of the {\sf Find} window, if any. If no match is found, a
notice is posted, but the signal window is not recentered. If the
{\sf Search for} field is empty, any annotation or marker will be
counted as a match.
\item[\button{\tt <<}]
This button scrolls the signal window towards the beginning of the record, by
an amount equal to the width of the signal window (i.e., a full screen).
\item[\button{\tt <}]
This button scrolls the signal window towards the beginning of the record, by
an amount equal to half of the width of the signal window.
\index{Find window@{\sf Find} window}
\index{search}\index{annotation!searching for}
\item[\button{Find...}]
This button opens the
\hyperref{{\sf Find} window}
{{\sf Find} window (see section~}
{, page~\pageref{sec:find-window})}
{sec:find-window},
which allows you to specify what
portion of the current record should be displayed next. You may set a specific
start or end time, or you may specify an annotation to be searched for by
\button{{\tt <} Search} and \button{Search {\tt >}} buttons.
\item[\button{\tt >}]
This button scrolls the signal window towards the end of the record, by an
amount equal to half of the width of the signal window.
\item[\button{\tt >>}]
This button scrolls the signal window towards the end of the record, by an
amount equal to the width of the signal window (i.e., a full screen).
\index{search}\index{annotation!searching for}
\item[\button{Search {\tt >}}]
This button recenters the signal window on the next occurrence of an annotation
or marker that matches the entry in the {\sf Search for} field of the {\sf
Find} window, if any. If no match is found, a notice is posted, but the signal
window is not recentered. If the {\sf Search for} field is empty, any
annotation or marker will be counted as a match.
\index{on-line help}\index{Help Topics window@{\sf Help Topics} window}
\item[\button{Help}]
This button pops up the
\hyperref{{\sf Help Topics} window}
{{\sf Help Topics} window (see section~}
{, page~\pageref{sec:help-topics-window})}
{sec:help-topics-window},
containing buttons that name
several subjects for which extensive on-line help is available. Choosing a
topic allows you to browse through or print the associated help file in a
scrollable text window.
\index{annotator name!default}
\index{Quit button@{\sf Quit} button}
\item[\button{Quit}]
\WAVE{} exits when you press this button, after saving your edits if any.
If your input file would be overwritten as a result of saving your edits, it is
first renamed by prefixing its annotator name with an underscore (`{\tt \_}').
If you have entered annotations but have not specified an annotator, the name
by which you invoked this program (normally, `{\tt wave}') is used for the
annotator name.
\end{description}
\section{The {\sf File} menu}
\index{File menu@{\sf File} menu}
\label{sec:file-menu}
Open this menu using \menubutton{File} in \WAVE{}'s main window.
\begin{description}
\index{Load window@{\sf Load} window}
\index{record!name}\index{annotator name}\index{calibration file}
\index{database path}
\item[{\sf Load}]
This selection pops up the
\hyperref{{\sf Load} window}
{{\sf Load} window (see section~}
{, page~\pageref{sec:load-window})}
{sec:load-window},
in which you can enter a new record or
annotator name, or change the name of the calibration file or the value of
the database path within this window.
\index{title bar!unsaved edit indicator}
\index{annotation file!backup}
\item[{\sf Save}]
If there are unsaved edits, this selection saves them. The annotator name in
the title bar is marked with parentheses if there are unsaved edits. Only one
level of backup is preserved, so you will overwrite the original annotation
file if it is in the current directory and you open the same annotator more
than once.
\index{printing!signal window contents}
\index{screen dump}
\item[{\sf Print}]
This selection prints the contents of the signal window on paper. The output
is made from the original signal files, and therefore is of better quality than
a screen dump would be. Your edits, if any, are saved before printing, so that
the output reflects any changes you have made.
\index{printing!commands}
\item[{\sf Print setup}]
This selection pops up the
\hyperref{{\sf Print setup} window}
{{\sf Print setup} window (see section~}
{, page~\pageref{sec:print-setup-window})}
{sec:print-setup-window},
showing the commands \WAVE{} uses
to print PostScript and text data from the standard input.
\index{menu file}
\index{Analyze window@{\sf Analyze} window}
\index{WAVEMENU environment variable}\index{environment variables!WAVEMENU}
\index{action buttons}
\item[{\sf Analyze}]
This selection pops up the
\hyperref{{\sf Analyze} window}
{{\sf Analyze} window (see section~}
{, page~\pageref{sec:analyze-window})}
{sec:analyze-window}
containing a customizable set of action buttons, and the {\sf Analysis
Commands} window (a {\tt cmdtool}-style terminal emulator). The names
of the action buttons and their assigned actions are read
from \WAVE{}'s menu file (by default, this is {\tt wavemenu}, if it exists in the current
directory, otherwise {\tt /usr/lib/wavemenu.def}; the default may be
overridden by setting the environment variable {\tt WAVEMENU}
\index{environment variables!WAVEMENU}
\index{WAVEMENU environment variable}
to the name of a different file). The buttons are usually
configured to perform various analysis functions on the current
record; read the default menu file for details.
\index{log file}
\index{pschart command@{\tt pschart} command}
\item[{\sf Log}]
This selection pops up the
\hyperref{{\sf Log} window}
{{\sf Log} window (see section~}
{, page~\pageref{sec:log-window})}
{sec:log-window},
which allows you to name a log file,
and to record in that file the current record name, the time of the
samples at the center of the signal window, and (optionally) a
one-line comment. Log files may be used as scripts for
\htmladdnormallink{{\tt pschart}}{../wag/pschar-1.htm}.
You may write to as many log files in a single session as you choose,
and you may accumulate entries from multiple sessions in a single log
file.
\end{description}
\section{The {\sf Load} window}
\index{Load window@{\sf Load} window}
\begin{figure}[h]
\centerline{\epsfig{file=load-window}}
\end{figure}
\label{sec:load-window}
Open this window by selecting {\sf Load} from the \menubutton{File} menu.
\index{record!name}
\begin{description}
\item[{\sf Record}]
Specifies the name of the record to be viewed. The initial value of this field
is the name of the record that you specified on the command line. To view
another record, select this field and enter another record name.
\index{annotator name}
\item[{\sf Annotator}]
Specifies the name of the annotator whose annotations are shown. If you
specified an annotator on the command line, the annotator name is the initial
value of this field; otherwise, the field is initially empty. Fill in or
change this field to view or edit a different set of annotations.
\index{record!reloading}
\item[\button{Reload}]
Press this button to reload the current record. This is intended to be used
if an external process has modified the record (e.g., by writing annotations,
or by recalibrating a signal) since it was loaded into \WAVE{}.
\index{calibration file}
\item[{\sf Calibration file}]
Specifies the name of the WFDB calibration file (a text file containing
information on the relative scales of many types of signals).
Initially, this field contains the value of the {\tt WFDBCAL}
environment variable.
\index{environment variables!WFDBCAL}\index{WFDBCAL environment variable}
You should include path information in this field only if the WFDB
calibration file is not found in the WFDB path.
\index{database path}
\index{WFDB environment variable}\index{environment variables!WFDB}
\item[{\sf WFDB path}]
Specifies the search path for \WAVE{}'s input files.
Initially, this field contains the value of the {\tt WFDB} environment
variable.
\index{environment variables!WFDB}\index{WFDB environment variable}
Components are
directory names, separated by colons (`:'). An empty component (either an
initial or final colon, or two consecutive colons) specifies the current
directory.
\end{description}
\section{The {\sf Print setup} window}
\index{Print setup window@{\sf Print setup} window}
\begin{figure}[h]
\centerline{\epsfig{file=print-setup-window}}
\end{figure}
\label{sec:print-setup-window}
Open this window by selecting {\sf Print setup} from the
\menubutton{File} menu.
\begin{description}
\item[{\sf PostScript print command}]
\WAVE{} supplies any PostScript data to be printed
(such as the chart generated when you choose
{\sf Print} from the \menubutton{File} menu) to the standard input
of this command.
\item[{\sf Text print command}]
\WAVE{} supplies any text to be printed (such as
on-line help) to the standard input of this
command.
\end{description}
\index{PRINTER environment variable}\index{environment variables!PRINTER}
\index{PSPRINT environment variable}\index{environment variables!PSPRINT}
\index{TEXTPRINT environment variable}\index{environment variables!TEXTPRINT}
The initial settings in the {\sf Print setup} window are determined by
the environment variables {\tt PSPRINT} and {\tt TEXTPRINT}; if
either of these variables is not set, the corresponding command is
determined by the {\tt PRINTER} environment variable (see
\hyperref{Setting up a printer for \WAVE{}}
{section~}
{, page~\pageref{sec:printer-setup}}
{sec:printer-setup}).
You may change these commands (for example, to specify
use of a different printer). When executing commands from its menu
file, \WAVE{} replaces the strings {\tt \$PSPRINT} and {\tt
\$TEXTPRINT} with the corresponding commands from the {\sf Print
setup} window (see
\hyperref{Menu Variables}
{appendix~}
{, page~\pageref{ch:menu-variables}}
{ch:menu-variables}).
\section{The {\sf Analyze} window}
\index{Analyze window@{\sf Analyze} window}
\begin{figure}[h]
\centerline{\epsfig{file=analyze-window}}
\end{figure}
\label{sec:analyze-window}
Open this window by selecting {\sf Analyze} from the \menubutton{File} menu.
\begin{description}
\item[\button{\tt <}]
This button shifts the segment to be analyzed toward the beginning of the
record, by an amount equal to the length of the segment if possible.
\index{region of interest}
\index{marker!{\tt <}}
\index{elapsed time}\index{time!elapsed}
\item[{\sf Start (elapsed)}]
This field specifies (as elapsed time from the beginning of the
record) the beginning of the segment to be analyzed. You may
enter a time directly in this field, or you may insert a `{\tt <}' marker using
the standard procedure for inserting annotations.
\index{marker!{\tt >}}
\item[{\sf End (elapsed)}]
This field specifies the end of the segment to be analyzed. You may enter a
time directly in this field, or you may insert a `{\tt >}' marker using the
standard procedure for inserting annotations.
\item[\button{\tt >}]
This button shifts the segment to be analyzed toward the end of the
record, by an amount equal to the length of the segment.
\index{signal!number}
\item[{\sf Signal}]
This field specifies the selected signal. You may enter a signal number
directly in this field, or you may point to a signal, depress the
\keycap{Shift} key, and click left to select the signal. In the \WAVE{}
menu file, the symbol `{\tt \$SIGNAL}' refers to the signal number of the
selected signal; this symbol usually specifies a signal to be analyzed. The
name of the selected signal appears to the right of its signal number. The
uppermost signal displayed by \WAVE{} is signal 0.
\index{absolute time}\index{time!absolute}
\item[{\sf From}]
This field specifies the absolute time (and date, if defined) of the
beginning of the segment to be analyzed. The value in this field is
updated automatically whenever the value in the {\sf Start (elapsed)}
field changes, and vice versa. The {\sf From} field is disabled if
the current record's header does not define the absolute time of the
beginning of the record.
\item[{\sf To}]
This field specifies the absolute time (and date, if defined) of the
end of the segment to be analyzed. The value in this field is updated
automatically whenever the value in the {\sf End (elapsed)} field
changes, and vice versa. The {\sf To} field is disabled if the
current record's header does not define the absolute time of the
beginning of the record.
\index{signal!list}
\item[{\sf Signal list}]
This field specifies the signal list (a list of signal numbers, separated by
spaces). In the \WAVE{} menu file, the symbol `{\tt \$SIGNALS}' refers to
the signal list; this symbol usually appears where a list of signals to be
analyzed is required. To change the signal list, either type into this field,
or point to a signal, press and hold the \keycap{Control} key (to add the
signal to the list) or the \keycap{$\Diamond$} (or \keycap{Alt}) key (to
delete the first occurrence of the signal from the list), and click left.
\index{Scope window@{\sf Scope} window}
\item[\button{Show scope window}]
This button pops up \WAVE{}'s
\hyperref{{\sf Scope} window}
{{\sf Scope} window (see section~}
{, page~\pageref{sec:scope-window}}
{sec:scope-window},
which can be used to display a signal in `oscilloscope' mode.
\index{analysis commands window@{\sf Analysis Commands} window}
\item[\button{Show command window}]
This button pops up the {\sf Analysis Commands} window, a terminal
emulator that receives commands generated
by selecting most of the other buttons in this window, and that displays any
text output of those commands. You may type commands directly into the window.
\index{EDITOR environment variable}\index{environment variables!EDITOR}
\index{textedit command@{\tt textedit} command}\index{menu file}
\item[\button{Edit menu}]
This button allows you to edit the \WAVE{} menu file, which
configures the analysis buttons in the {\sf Analyze} window, using the
text editor named in the {\tt EDITOR} environment variable
(or {\tt textedit} if {\tt EDITOR} is not set). After you have saved your
changes, select \button{Reread menu} to reconfigure this window.
\item[\button{Reread menu}]
Select this button to reconfigure the {\sf Analyze} window after you
have made changes to the menu file (most easily done by
using \button{Edit menu}) or after changing records.
\item[\button{Reload}]
This button causes \WAVE{} to reload the current annotation file. If a process
is in progress in the {\sf Analysis Commands} window, \WAVE{} defers reloading
until the process is finished.
\end{description}
\index{menu file}
\index{action buttons}
The remaining buttons in the {\sf Analyze} window perform actions
determined by the \WAVE{} menu file. If the environment variable {\tt
WAVEMENU} is set, it names that file; otherwise, the \WAVE{} menu file
is {\tt wavemenu} (if it exists in the current directory) or {\tt
/usr/lib/wavemenu.def}.
\section{The {\sf Log} window}
\index{Log window@{\sf Log} window}
\begin{figure}[h]
\centerline{\epsfig{file=log-window}}
\end{figure}
\label{sec:log-window}
Open this window by selecting {\sf Log} from the \menubutton{File} menu.
\index{log file}
\begin{description}
\item[{\sf File}]
This field names the current log file.
\item[\button{Load}]
Press this button to load (or reload) the log file if an external process
(such as one started from the {\sf Analyze} window, or an editor started using
the \button{Edit} button in the {\sf Log} window) creates or modifies the
log file.
\item[{\sf Description}]
This field contains the description associated with the current log entry.
\item[{\sf Delay}]
This slider controls the interval between display updates when a log
review is in progress.
\index{marker!{\tt :}}
\item[\button{Add}]
This button adds the current record name, the time corresponding to the
center of the signal window, and the contents of the description field, as an
entry in the log file; it also inserts an index mark (`{\tt :}') in the center
of the signal window.
\item[\button{Replace}]
This button replaces the description attached to the current log entry with the
current contents of the description field. It does not create a new entry (use
the \button{Add} button for that purpose).
\item[\button{Delete}]
This button deletes the current entry from the log. This button also causes
\WAVE{} to display the next log entry if it exists.
\index{EDITOR environment variable}\index{environment variables!EDITOR}
\item[\button{Edit}]
This button opens the current log file using the text editor named in the
\index{environment variables!EDITOR}\index{EDITOR environment variable}
\index{textedit command@{\tt textedit} command}
{\tt EDITOR} environment variable (or {\tt textedit} if {\tt EDITOR} is not
set). Save your edits, exit from the editor, and click on the \button{Load}
button in the {\sf Log} window before attempting to make changes to the log
using \button{Add}, \button{Replace}, or \button{Delete}.
\item[\button{\tt |<}]
This button causes \WAVE{} to ``rewind'' the log (i.e., to show the first
log entry).
\item[\button{\tt <<}]
This button causes \WAVE{} to begin reviewing each entry in the log file in
reverse order, pausing 5 seconds between entries. While a review is in
progress, only the \button{Pause} button is enabled.
\item[\button{\tt <}]
This button causes \WAVE{} to show the previous log entry.
\item[\button{Pause}]
This button causes \WAVE{} to stop the review of the log file that was begun
by \button{\tt <<} or \button{\tt >>}. The \button{Pause} button is disabled
unless a review is in progress.
\item[\button{\tt >}]
This button causes \WAVE{} to show the next log entry.
\index{log file!review}
\item[\button{\tt >>}]
This button causes \WAVE{} to begin reviewing each entry in the log file,
pausing 5 seconds between entries. While a review is in progress, only the
\button{Pause} button is enabled.
\item[\button{\tt >|}]
This button causes \WAVE{} to ``fast forward'' the log (i.e., to show the last
log entry).
\end{description}
\section{The {\sf View} window}
\index{View window@{\sf View} window}
\begin{figure}[h]
\centerline{\epsfig{file=view-window}}
\end{figure}
\label{sec:view-window}
Open this window using \button{View...} in \WAVE{}'s main window.
\index{annotation!mnemonic}
\index{annotation!subtyp@{\tt subtyp}}
\index{subtyp in annotation@{\tt subtyp} in annotation}
\index{annotation!chan@{\tt chan}}
\index{chan in annotation@{\tt chan} in annotation}
\index{annotation!num@{\tt num}}
\index{num in annotation@{\tt num} in annotation}
\index{annotation!aux@{\tt aux}}
\index{aux in annotation@{\tt aux} in annotation}
\index{signal!names}
\index{signal!baselines}
\index{baselines}
\index{marker bars}
\index{signal!levels}
\begin{description}
\item[{\sf Show}]
Toggle these options by selecting them. Multiple annotation fields are shown
in the following arrangement:
\begin{quote}
{\it annotation mnemonic}\\
{\it subtype}\\
{\tt chan} {\it field}\\
{\tt num} {\it field}\\
{\tt aux} {\it field}
\end{quote}
{\sf Signal names} and {\sf baselines} are defined in the header file for the
current record. {\sf Markers} show the precise locations of all annotations.
{\sf Levels} show the amplitudes of each signal at the time indicated by the
pointer, whenever a mouse button is depressed. The {\sf Level} window
appears at this time.
\index{time scale}\index{scales!time}
\item[\amenubutton{Time scale:}]
Set the horizontal scale for the signal and {\sf Scope} windows by
selecting one of the choices.
\index{scales!amplitude}
\index{amplitude scale}
\item[\amenubutton{Amplitude scale:}]
Set the vertical scale for the signal and {\sf Scope} windows by
selecting one of the choices.
\end{description}
\index{grid}\index{resolution!of display}
\index{display calibration}\index{calibration!display}
\index{dpi option for WAVE@{\tt -dpi} option for \WAVE{}}
\index{command-line options!{\tt -dpi}}\index{options!{\tt -dpi}}
You can check the calibration of the display by enabling the 0.2 s x 0.5 mV
grid, and then by measuring the spacing of the grid lines. If the spacing is
incorrect, your X server does not know the actual display resolution. See your
X server documentation if this is the case, or use the {\tt -dpi} option when
starting \WAVE{} (start \WAVE{} with no arguments for instructions).
\begin{description}
\index{signal!display mode}
\index{signal!number}
\index{signal!list}
\item[\amenubutton{Draw:}]
Use this control to toggle \WAVE{}'s signal display mode. By default,
\WAVE{} displays all signals in order of signal number, with signal 0 at the
top of the signal window. If you select {\sf listed signals only}, \WAVE{}
displays only those signals that appear in the signal list (in the {\sf
Analyze} window, from top to bottom in the order in which they appear
in the signal list).
\index{format!of annotation display}
\index{annotation!display mode}
\index{chan in annotation@{\tt chan} in annotation}
\index{num in annotation@{\tt num} in annotation}
\item[\amenubutton{Show annotations:}]
Use these menu buttons to choose how annotations are to be displayed. By
default, \WAVE{} displays annotations in the center of the signal window.
If you select {\sf attached to signals}, each annotation appears near the
signal specified by its {\tt chan} field. If you select {\sf as a signal},
\WAVE{} draws a signal derived from the {\tt num} fields of any annotations
in the window, in place of the standard annotation display. The right-hand
menu button allows you to choose if the full texts of closely-spaced
annotations should be shown even if they overlap (if you choose {\sf allow
overlap}). By default, the texts are truncated after the first character if
they would overlap, to improve legibility.
\index{format!of time display/entry}
\index{time!display mode}
\index{absolute time}
\index{elapsed time}
\item[\amenubutton{Time display:}]
By default, \WAVE{} displays elapsed time from the beginning of the record
in {\sf hh:mm:ss} format. Use this control to select display of absolute time
(if defined for the record), or to display time in sample intervals. If you
select absolute time display, you may enter absolute times in the {\sf Find}
window.
\index{format!of grid display}
\index{grid}
\item[\amenubutton{Grid:}]
Use this menu button to select a grid style, or to suppress the grid display.
\item[\button{Undo changes}]
This button cancels any changes you have made to the {\sf View} window
settings and restores the indicators to reflect the current settings.
\item[\button{Redraw}]
This button causes \WAVE{} to accept any changes you have made in the {\sf
View} window. Pressing \button{Redraw} dismisses the {\sf View} window and
refreshes the signal window.
\index{Xdefaults file@{\tt .Xdefaults} file}
\item[\button{Save as new defaults}]
This button preserves the current settings within the {\sf View}
window in your home {\tt .Xdefaults} file.
\end{description}
\section{The {\sf Edit} menu}
\index{Edit menu@{\sf Edit} menu}
\label{sec:edit-menu}
Open this menu using \menubutton{Edit} in \WAVE{}'s main window.
\begin{description}
\item[{\sf Allow editing}]
This selection allows you to make changes to the annotation buffer.
\index{marker!editing}
\item[{\sf View only}]
This selection disallows annotation editing. You may still edit `{\tt <}',
`{\sf :}', and `{\tt >}' markers.
\end{description}
\section{The {\sf Properties} menu}
\index{Properties menu@{\sf Properties} menu}
\label{sec:prop-menu}
Open this menu using \menubutton{Properties} in \WAVE{}'s main window.
\index{wfdbdesc command@{\tt wfdbdesc} command}
\begin{description}
\item[{\sf Signals...}]
This selection pops up a window containing information about the signals of the
current record, obtained by running
\htmladdnormallink{{\tt wfdbdesc}}{../wag/wfdbde-1.htm}.
\index{sumann command@{\tt sumann} command}
\item[{\sf Annotations...}]
This selection pops up a window containing a summary of the contents of the
annotation buffer, obtained by running
\htmladdnormallink{{\tt sumann}}{../wag/sumann-1.htm}
(after saving any edits).
\index{WAVE version number@\WAVE{} version number}
\item[{\sf About Wave...}]
This selection pops up a window containing the version number and date of this
copy of \WAVE{}. This window may also contain news about recent changes in
\WAVE{}.
\end{description}
\section{The {\sf Find} window}
\index{Find window@{\sf Find} window}
\begin{figure}[h]
\centerline{\epsfig{file=find-window}}
\end{figure}
\label{sec:find-window}
Open this window using \button{Find...} in \WAVE{}'s main window.
\begin{description}
\index{View window@{\sf View} window}
\item[{\sf Start time}]
Specifies the time of the sample shown at the left edge of the signal window,
in the format specified by the {\sf Time display} item in the {\sf View}
window. Go to any other part of the record by entering the time in this field.
\item[{\sf End time}]
Specifies the time of the sample shown at the right edge of the signal window,
in the format specified by the {\sf Time display} item in the {\sf View}
window. Go to any other part of the record by entering the time in this field.
\end{description}
\index{format!of time display/entry}
Times can be entered in {\tt h:m:s} format, with hours or hours and minutes
omitted, or in {\tt s{\it nnnnn}} format, in which {\it nnnnn} is a number of
sample intervals from the beginning of the record.
\index{annotation!mnemonic}
\begin{description}
\index{search}\index{annotation!searching for}
\item[{\sf Search for annotation}]
Specifies a target for \button{{\tt <} Search} and \button{Search {\tt >}}.
Changing this field causes an immediate forward search. The contents
of this field should match an annotation or marker mnemonic, signal quality
code, rhythm, comment, or other text string, or one of the following:
\begin{tabular*}{\textwidth}{l p{3.5 in}}
{\tt *v} & {matches any ventricular ectopic beat} \\
{\tt *s} & {matches any supraventricular ectopic beat} \\
{\tt *n} & {matches any other beat type} \\
{\tt *} & {matches any annotation or marker} \\
{\tt .} & {matches a deletion made during this \WAVE{} session} \\
\end{tabular*}
\index{search template window@{\sf Search Template} window}
\item[\button{More options...}]
This button clears the contents of the {\sf Search for} field and
opens the
\hyperref{{\sf Search Template} window}
{{\sf Search Template} window (see section~}
{, page~\pageref{sec:search-template-window})}
{sec:search-template-window}.
\index{signal!searching for}\index{search}
\item[{\sf Find signal}]
Specifies the name of a signal. Changing this field causes an
immediate forward search for the next valid samples of the
specified signal. To repeat the search, select the field
and press \keycap{Enter}.
\end{description}
\section{The {\sf Help Topics} window}
\index{on-line help}\index{Help Topics window@{\sf Help Topics} window}
\begin{figure}[h]
\centerline{\epsfig{file=help-topics}}
\end{figure}
\label{sec:help-topics-window}
Open this window using \button{Help} in \WAVE{}'s main window.
\index{help!printing}
Each of the buttons in this window, except for the last two described
below, opens a help file in a scrollable text
window. Use the \button{Print} button in each window to get a paper
copy of the help file if you wish. The on-line manual for \WAVE{}
includes many of these files verbatim.
\begin{description}
\item[\button{Introduction}]
A quick introduction to \WAVE{}'s features.
\item[\button{Buttons}]
A summary of the functions of the buttons in \WAVE{}'s
main control panel and pop-up windows.
\item[\button{Annotation Editing}]
A summary of annotation editing procedures.
\item[\button{WAVE Logs}]
How to create and review \WAVE{} log files.
\item[\button{Printing}]
Methods for printing annotated signals from \WAVE{}.
\item[\button{Analysis}]
Using and customizing the {\sf Analyze} window.
\item[\button{Resources}]
\WAVE{}-specific X11 resources.
\item[\button{What's new}]
Recent changes in \WAVE{}.
\item[\button{Frequently asked questions}]
Common questions about \WAVE{} (answers, too!).
\item[\button{User's Guide}]
Click on this button to begin reading this guide in a web browser
window. By default, \WAVE{} uses Mozilla. To configure \WAVE{} to use a
different browser, see
\hyperref{\WAVE{} and the web}
{section~}
{, page~\pageref{sec:web}}
{sec:web}.
\index{Mozilla}\index{web browser}
\item[\button{Quit from Help}]
Press this button to dismiss the {\sf Help Topics} window.
\end{description}
\section{The {\sf Annotation Template} window}
\index{Annotation Template window@{\sf Annotation Template} window}
\begin{figure}[h]
\centerline{\epsfig{file=annotation-template}}
\end{figure}
\label{sec:annotation-template-window}
Open this window at any time by clicking left anywhere within the
signal window. Use the data fields in the {\sf Annotation Template}
before inserting an annotation, to specify the characteristics of the
annotation you wish to insert.
\begin{description}
\item[\amenubutton{Type:}]
This field specifies the type of annotation to be inserted. It may be changed
by selecting a new value from the pull-down menu, by typing the mnemonic while
the pointer is within the signal window, or by selecting an existing annotation
and pressing the \keycap{Copy} or \keycap{F6} keys (these key commands also
copy the other fields of the selected annotation into the corresponding fields
of the {\sf Annotation Template}).
\item[{\sf Text}]
This field specifies the contents of the optional annotation {\tt aux} field.
It may be changed by typing into it directly or by selecting an existing
annotation and pressing the \keycap{Copy} or \keycap{F6} keys. In most cases,
it should be empty, but it must be filled in for rhythm and certain other
non-beat annotations. When the annotation is written, \WAVE{} prefixes the
required byte count to this field before transferring it to the {\tt aux}
field.
\item[{\sf Subtype}]
This field specifies the contents of the annotation {\tt subtyp} field. In
most cases, it should be 0; legal values range from -128 to +127.
\item[{\sf `Chan' field}]
This field specifies the contents of the annotation {\tt chan} field. In most
cases, it should be 0; legal values range from -128 to +127. In multi-edit
mode, the {\tt chan} field of the annotation indicates the signal number of
the attached signal. When inserting annotations in multi-edit mode, the value
of the {\tt chan} field in the annotation is determined by which signal is
nearest to the pointer when the insertion is performed, and the {\sf `Chan'
field} in the {\sf Annotation Template} is updated accordingly.
\item[{\sf `Num' field}]
This field specifies the contents of the annotation {\tt num} field. In most
cases, it should be 0; legal values range from -128 to +127. If you
have chosen to {\sf Show annotations: as a signal} in the {\sf View} window,
the {\tt num} fields of the annotations determine the signal amplitudes.
\item[\button{Change all in range}]
This button changes all annotations between the `{\tt <}' and `{\tt >}' markers
(the {\sf Start} and {\sf End} times in the {\sf Analyze} window) to match the
{\sf Annotation Template}.
\item[\button{Dismiss}]
This button makes the {\sf Annotation Template} window disappear (until it is
recalled by clicking left while the pointer is within the signal window).
\end{description}
\section{The {\sf Search Template} window}
\index{search template window@{\sf Search Template} window}
\begin{figure}[h]
\centerline{\epsfig{file=search-template}}
\end{figure}
\label{sec:search-template-window}
Open this window by clicking left on \button{More Options...} in the
{\sf Find} window. This window specifies criteria for searches
performed using \button{{\tt <} Search} and \button{Search {\tt >}}.
Each of the five menu buttons at the left edge can be set to {\sf
Ignore} (the default) or {\sf Match} in order to exclude or include,
respectively, the associated annotation field in the search criteria.
The {\sf Type}, {\sf Text}, {\sf Subtype}, {\sf `Chan' field}, and
{\sf `Num' field} controls work in the same way as their counterparts
in the
\hyperref{{\sf Annotation Template} window}
{{\sf Annotation Template} window (see section~}
{, page~\pageref{sec:annotation-template-window})}
{sec:annotation-template-window}.
\begin{description}
\item[\button{Match selected annotation}]
This button copies the fields of the selected annotation (if any) into
the {\sf Search Template}, and sets all five of the menu buttons at
the left edge of the window to {\sf Match}. This is a convenient
shortcut if you wish to find another annotation identical to a given
one.
\item[\button{Dismiss}]
This button makes the {\sf Search Template} window disappear (until it is
recalled by clicking left on \button{More Options...} in the {\sf
Find} window).
\end{description}
\section{The {\sf Level} window}
\index{Level window@{\sf Level} window}
\begin{figure}[h]
\centerline{\epsfig{file=level-window}}
\end{figure}
\label{sec:level-window}
Open the {\sf Level} window by choosing {\sf level} in the {\sf View}
window, then by clicking a mouse button anywhere in the signal window.
\begin{description}
\item[\amenubutton{Show}]
Choose how time and signal levels are displayed in the {\sf Level}
window using this menu. The four menu choices are {\sf physical units
(absolute)}, {\sf physical units (relative)}, {\sf WFDB units
(absolute)}, and {\sf WFDB units (relative)}. Physical units are
seconds for time, and as specified in the record's header file for
each of the signals. WFDB units are sample intervals and
analog-to-digital units (adu). In relative mode, all measurements are
shown as differences beween the current location and the reference
location (which is determined by the placement of the `{\tt ;'}
reference marker).
\item[{\sf Time}]
This item shows the time corresponding to the most recent cursor
position while a button was depressed within the signal window (and to
the signal levels shown in the remainder of the {\sf Level} window).
Depending on the choice made using the {\sf Show} menu, this item may
be named {\sf Interval} or {\sf Sample number}.
\item[{\it Levels}]
Most of the {\sf Level} window contains an informational display
indicating the names and levels (amplitudes) of the signals. If an
asterisk (*) appears at the end of any line, it indicates that the
corresponding signal is uncalibrated.
\item[\button{Dismiss}]
This button makes the {\sf Level} window disappear (until it is
recalled by clicking within the signal window).
\end{description}
\section{The {\sf Scope} window}
\index{Scope window@{\sf Scope} window}
\index{Analyze window@{\sf Analyze} window}
\index{oscilloscope display}
\begin{wrapfigure}{l}{2cm}
\mbox{\epsfig{file=scope-controls}}
\end{wrapfigure}
\label{sec:scope-window}
Open the {\sf Scope} window from the {\sf Analyze} window, using
\button{Show scope window}. The {\sf Scope} window provides a
simulated oscilloscope display of one signal, triggered by QRS (beat)
annotations. (Annotations that are not considered QRS annotations,
such as rhythm changes and comments, are those that appear displaced
vertically with respect to the QRS annotations in the signal window;
these non-QRS annotations do not trigger the scope display.)
\index{scales!time}\index{scales!amplitude}
\index{time scale}\index{amplitude scale}
Select the signal to be drawn in the {\sf Scope} window using the {\sf Signal}
control in the {\sf Analyze} window. The \amenubutton{Time scale:} and
\amenubutton{Amplitude scale} controls in the {\sf View} window define the
scales used in the {\sf Scope} window.
\begin{description}
\item[{\sf Speed}]
This slider controls the playback speed. Click left on the slider and drag it
to the desired position -- lower to reduce speed, higher to increase speed.
\item[{\sf dt}]
This field specifies the interval from the left edge of the {\sf Scope} window
to the annotated sample, in seconds. Negative values may be used to shift the
left edge of the scope window past the annotated sample. Drag the resize
corners to change the interval between the left and right edges of the scope
window.
\item[\button{\tt <<}]
This button displays frames continuously in reverse order. Use \button{Pause}
to interrupt the display. The display stops when it reaches the
beginning of the record, an index mark (`{\tt :}'), or the `{\tt <}' marker.
\item[\button{\tt <}]
This button displays the previous frame.
\item[\button{Pause}]
This button freezes the scope display. It also forces the signal window to be
redrawn, roughly centered on the time shown at the bottom of the scope window,
with the current annotation selected.
\item[\button{\tt >}]
This button displays the next frame.
\item[\button{\tt >>}]
This button displays frames continuously in normal order. Use \button{Pause}
to interrupt the display. The display stops when it reaches the end of
the record, an index mark (`{\tt :}'), or the `{\tt >}' marker.
\end{description}
\chapter{System Requirements for \WAVE{}}
\label{app:system-requirements}
\index{Linux}\index{Solaris}\index{SunOS}\index{SPARCstation}\index{PC}
\index{Macintosh}\index{Microsoft Windows}
This section includes a shopping list of hardware and software that you will
need in order to run \WAVE{}, or that you may find useful in order to use
\WAVE{} most effectively.
\section{Necessities}
At a minimum, you will require:
\begin{description}
\item [\WAVE{} software]
This is freely available from PhysioNet in source form, and in binary form
for PCs running GNU/Linux or MS-Windows, or Macintoshes running OS X.
(Older binaries for SPARC-based systems running Solaris 2.x or SunOS
4.1.x are also available on PhysioNet. See
\hyperref{how to obtain the current version of \WAVE{}}
{section~}
{, page~\pageref{sec:getting-wave} for details}
{sec:getting-wave}.) If the XView toolkit can be installed on your
platform, it should be easy to build and use \WAVE{} on it.
\index{WAVE host@\WAVE{} host}
\index{resolution!of display}
\index{X Window System!XFree86 server}
\item [A computer capable of acting as a \WAVE{} host]
Virtually any PC with a 386 or better CPU can run Linux, and such systems are
likely to be the least expensive choice. Ideally, a Linux PC to be used as a
\WAVE{} host should have at least 8 Mb of RAM, at least 200 Mb of available
disk space, a three-button mouse (or trackball), and a graphics card and
monitor (17-inch or larger, with a dot pitch of .26 mm or less) capable of
non-interlaced display at 65 Hz or faster with a resolution of at least
1024x768 with 256 colors. In most cases, you will also want the system to be
equipped with an Internet connection (for obtaining data and software from
PhysioNet and other sources).. Most PCs manufactured since 1995 will easily
meet these requirements; new PCs will exceed most of them by large factors. In
mid-2005, it was possible to assemble a suitable Linux PC for about US\$200
(not including the monitor). It is not unreasonable to budget an equal or
greater amount for a good monitor, since \WAVE{}'s usability depends to a
significant extent on being able to see its output clearly. If your budget
permits, a flat-panel (LCD) monitor is an excellent choice, particularly if you
plan to do much annotation editing, because these monitors typically present
very stable images that do not tire the eye. Fully configured and supported
Linux PCs are available from many sources if you prefer not to assemble your
own; try a Google search for ``linux pc'' to find vendors.
Inexpensive three-button mice, trackballs, and touchpads manufactured
by Logitech and many others are widely available for PCs, and are
highly recommended if you do much annotation editing. Most are fully
compatible with Microsoft two-button mice. Some users prefer
trackballs for precision editing since there is no tendency for the
pointer to move when clicking the buttons, as with a mouse. Future
versions of \WAVE{} will make use of scroll wheels on mice when
available; if you choose a mouse equipped with a scroll wheel, try to
select one that allows you to use the middle button without generating
scroll wheel events.
For those on a tight budget, suitable used PCs are often available for next to
nothing. If you use an older PC and can afford to upgrade components, get a
new three-button mouse or trackball first, a new monitor if the old one is
inadequate, more memory if you have less than 64 Mb, a new IDE disk drive
(around US\$100) if yours is more than 3 years old, and only then consider
other performance upgrades such as a faster CPU. Although Linux does not
require large amounts of RAM, it can use additional RAM very effectively, and
you are likely to find that purchasing (say) 16 or 32 Mb of additional RAM
results in a bigger performance improvement than spending the same amount on a
faster CPU.
Although \WAVE{} now runs on MS-Windows, we still recommend using
GNU/Linux as the platform of choice because of its greater speed, capability,
configurability, security, and stability, and because of the wider
range of related software available for GNU/Linux. Other \WAVE{} users have
reported success on PCs running FreeBSD. Macintoshes running OS X
and SPARC-based systems may also be worth considering, although they tend to
be substantially more expensive than comparable or faster Linux or FreeBSD PCs.
\end{description}
\section{Printers}
\index{printing}\index{PostScript}\index{Ghostscript}
All currently available \WAVE{}-compatible applications for printing
require the use of a PostScript (or compatible) printer accessible to
the \WAVE{} host
\index{WAVE host@\WAVE{} host}
system. If you need
paper output, therefore, you should obtain a PostScript printer, or a
PostScript-compatible interpreter (such as the freely available GNU
Ghostscript) for your printer, or you should be prepared to write your
own printing applications.
\section{Remote access requirements}
\index{network access}\index{modem
access}\index{PPP}\index{SLIP}\index{TERM} \index{Ethernet} Since any
recently manufactured PC or Macintosh can act as a \WAVE{} host,
remote access to \WAVE{} is likely to be of interest mainly to those
seeking to use older hardware. For this purpose, virtually any local
system (computer or X terminal) connected by TCP/IP-based Ethernet to
a \WAVE{} host can be used. (PPP, SLIP, or TERM serial-line
connections also work, and may be acceptable for viewing data, but
even fast serial connections are likely to be intolerably slow for
extensive annotation editing.) Thus it is possible for several users
to access \WAVE{} simultaneously using a single \WAVE{} host, provided
only that each user's computer or terminal runs an X server. Free or
inexpensive X servers are available for virtually any computer made in
the last 20 years, including those running any version of UNIX, as well as
for MS-DOS and MS-Windows PCs, Macintoshes, Amigas, and DEC VAXen
running VMS.
\section{Data}
\index{MIT-BIH Arrhythmia Database} \index{European ST-T
Database}\index{MIT-BIH Polysomnographic Database} \index{MGH/MF
Waveform Database} You may find that an existing database of
digitally recorded signals may be useful for your studies. PhysioNet, at
\htmladdnormallink{http://physionet.org/,}{http:/physionet.org/},
offers free on-line access to over 40 such databases with thousands of
recordings ranging in length from a few seconds to several days.
These include all or most of the MIT-BIH Arrhythmia Database, the
European ST-T Database, the MIT-BIH Polysomnographic Database, the
MGH/MF Waveform Database, and the Long-Term ST Database (which are
also available on CD-ROMs from their creators), and many other
databases available only via PhysioNet. \WAVE{} can read these
databases directly from PhysioNet without downloading them first (the
WFDB library, which handles reading and writing data for \WAVE{},
contains HTTP client code that permits applications such as \WAVE{} to
read input with equal ease from local disks or remote web servers).
This is an excellent way to explore PhysioBank (PhysioNet's collection
of signal databases).
\section{About Linux}
\label{sec:linux}
\index{Linux}
As mentioned earlier, an excellent choice for a \WAVE{}
host is a PC running Linux. Linux is a (very) complete, and
completely free, robust, modern reimplementation of the UNIX operating
system, written by Linus Torvalds and a cast of thousands. It is
freely available in source and ready-to-run form from many
sources (LWN.net maintains a list of over 400 sites at
\htmladdnormallink{http://lwn.net/Distributions/}{http://lwn.net/Distributions/}).
You can also obtain Linux on CD-ROMs from many
commercial sources, generally at very low prices (typically US\$10 to
\$40, depending mainly on the amount of printed documentation and
technical support offered). Current Linux distributions include
TCP/IP networking including NFS
support, the complete collection of GNU software including the GNU
C/C++ compiler, Ghostscript, \TeX, X11R6, and much more. Some also include
\index{XView}\index{olwm@{\tt olwm} (Open Look Window Manager)}
\index{olvwm@{\tt olvwm} (Open Look Virtual Window Manager)}
XView 3.2, {\tt olwm} and {\tt olvwm}; these are also available
from PhysioNet. For further
information, visit the home page of the Linux Documentation Project
(\htmladdnormallink{{\tt http://www.tldp.org/}}
{http://www.tldp.org/}), where you may also find the Linux HOWTO
documents mentioned earlier.
\section{Other useful software}
\label{sec:other-software}
\index{WFDB Software Package}
\WAVE{} makes extensive use of other components of the \emph{WFDB
Software Package} of which it is a part. The most recent version of
this package is always freely available from PhysioNet
(\htmladdnormallink{{\tt http://physionet.org/}}
{http://physionet.org/}). The WFDB Software Package includes
{\tt calsig}, {\tt mrgann}, {\tt plot2d}, {\tt pschart}, {\tt
psfd}, {\tt rdann}, {\tt rdsamp}, {\tt sample}, {\tt snip}, {\tt
sqrs}, {\tt tach}, {\tt wfdbcollate}, {\tt wfdbdesc}, {\tt wfdbwhich},
{\tt wrann}, {\tt wrsamp}, and {\tt xform} (among many other applications).
The package also includes the WFDB library of interface functions for
user-written applications that read and write signal and annotation
files in the formats supported by \WAVE{}.
A web browser, though not a necessity for everyone who uses \WAVE{},
should be part of your software toolbox. If you use link annotations,
you will need a browser in order to follow the links to the external
data. Even if you don't anticipate using link annotations, you can
still use a web browser to view the on-line version of this guide.
Mozilla is an attractive choice because of its simple remote-control
interface, among other reasons. Mozilla may be obtained freely from
\htmladdnormallink{{\tt http://\-www\-.mozilla\-.org}}
{http://www.mozilla.org/}).
\index{Galeon}\index{Konqueror}\index{Mozilla}\index{Netscape}\index{Opera}
\index{web browser}
\index{gnuplot command@{\tt gnuplot} command}
\index{plot2d command@{\tt plot2d} command}
\index{plt command@{\tt plt} command}
An X-Y plotting program capable of being run from the command line is another
nearly essential tool. A suitable program should be able to accept multicolumn
text input, allowing specification of which columns to plot from the
command line (so that it can be driven by \WAVE{}). Avoid commercial software
designed for business graphics with arbitrary (often very low) limits
on the number of points that can be plotted. If you expect to prepare
plots for publication, avoid packages that only provide screen dumps;
any decent plotting program should be able to generate plots
at the resolution of your printer.
\htmladdnormallink{{\tt plt}}{../wag/plt-1.htm} is a highly capable
plotting package freely available from
\htmladdnormallink{{\tt physionet.org};}{http://physionet.org/}.
\htmladdnormallink{{\tt plot2d}}{../wag/plot2d-1.htm}
(included in the WFDB Software Package) is a
bare-bones command-line front end to {\tt gnuplot}, a fairly capable
interactive plotting program that is included in most Linux distributions,
and is also available from
\htmladdnormallink{http://www.gnuplot.info/}{http://www.gnuplot.info/} and
numerous other sites.
{\tt plot2d} uses {\tt plt} rather than {\tt gnuplot} if {\tt plt} is
installed.
\chapter{Setting up a \WAVE{}~host}
\label{app:setup}
\section{Obtaining and installing the current version of \WAVE{}}
\label{sec:getting-wave}
\index{WAVE host@\WAVE{} host}
\index{Linux}\index{Solaris}\index{SunOS}\index{SPARCstation}\index{PC}
\index{WWW}\index{WFDB Software Package}\index{downloading}
\index{installing \WAVE{}}
Current sources for \WAVE{}, and precompiled \WAVE{} binaries for
GNU/Linux or Mac OS X may be obtained from PhysioNet. Point your Web browser
to
\htmladdnormallink{{\tt http://physionet.org/}}{http://physionet.org/}
for details.
Note that \WAVE{} cannot be run at all until the WFDB library (contained within
the WFDB Software Package) and the XView libraries ({\tt libxview.so.3} and
{\tt libolgx.so.3}) have been installed. It is strongly recommended that you
install the complete WFDB Software Package, since \WAVE{} uses many of the
applications included in this package. The W3C's {\tt libwww}
libraries, or the newer and more capable {\tt libcurl} library,
are optional but recommended; either {\tt libwww} or {\tt libcurl} is
necessary if you wish to use \WAVE{} to read data directly from web
and FTP servers.
\index{XView}
\index{Linux}
If you would like to try porting \WAVE{} to another operating system for which
X11 client support (Xlib) is available, please obtain the XView source
distribution and attempt to port `{\tt cmdtool}' (a simple terminal emulator
included in the XView distribution) first. Compared to the original sources,
the Linux/Mac OS X/MS-Windows version of XView (freely available from
\htmladdnormallink{PhysioNet}{http://physionet.org/physiotools/xview/},
\htmladdnormallink{{\tt metalab.unc.edu}}
{ftp://metalab.unc.edu/pub/Linux/libs/X/xview/}, \htmladdnormallink{{\tt
www.rpmfind.net}} {http://www.rpmfind.net/linux/RPM/}, and their mirrors, and
also available on many low-cost Linux CD-ROM archives) is easier to port to
another operating system, since many Sun-specific dependencies were removed.
\section{Setting up a printer for \WAVE{}}
\label{sec:printer-setup}
\index{lpr command@{\tt lpr} command}
\index{PostScript}
\index{Solaris}
\WAVE{}'s printing capabilities (see
\hyperref{Printing}
{chapter~}
{, page~\pageref{ch:printing}}
{ch:printing})
require that the \WAVE{} host be able to
print PostScript. Your \WAVE{} host may already be set up to do this if
its default printer is a PostScript printer. (Under Solaris, make
sure that the directory containing the BSD command {\tt lpr} is in
your {\tt PATH}.)
\index{Ghostscript}
\index{PostScript}
\index{printer!non-PostScript}
\index{fax output}
\index{format!of graphics files}
If the printer itself is incapable of rendering PostScript, you may
still be able to use it if it is supported by Ghostscript (a freely
available PostScript interpreter). Ghostscript is included in
executable and portable C source form in most if not all Linux
distributions, and is also available from many
sources, including its own
\htmladdnormallink{web site}{http://www.cs.wisc.edu/~ghost/} and its
mirrors, \htmladdnormallink{CTAN}{http://ctan.tug.org},
and other archives of GNU software. Ghostscript supports a wide
variety of ink jet, dot matrix,
and laser printers including popular models made by Canon, Epson,
Hewlett Packard, IBM, and others; it can also render PostScript into
files in a wide variety of graphics formats, including PBM, PGM, PPM,
PCX, and TIFF (including G3 fax format -- with a fax modem, you can
even print PostScript output on any fax machine). Ghostscript works
by rasterizing Postscript input on the host system, then transmitting
the raster image to the printer in whatever format the printer
accepts. For details on setting up Ghostscript for your printer, see
the documentation that comes with Ghostscript, or the Linux
Printing-HOWTO.
Assuming that the \WAVE{} host is somehow able to print PostScript
output (either directly to a PostScript printer, or via Ghostscript or
another interpreter), setup for \WAVE{} is straightforward:
\begin{itemize}
\index{PRINTER environment variable}\index{environment variables!PRINTER}
\item
Set the {\tt PRINTER} environment variable to the name of the printer
you wish to use, if that printer is not the default printer on the \WAVE{}
host.
\index{PSPRINT environment variable}\index{environment variables!PSPRINT}
\index{lpr command@{\tt lpr} command}
\item
Set the {\tt PSPRINT} environment variable to the command needed to
print PostScript from the standard input on the desired printer.
\WAVE{} assumes that this command is `{\tt lpr}' if neither {\tt PSPRINT}
nor {\tt PRINTER} are set; if only {\tt PRINTER} is set, \WAVE{}
assumes that this command is `{\tt lpr -P\$PRINTER}'.
\index{TEXTPRINT environment variable}\index{environment variables!TEXTPRINT}
\index{on-line help}\index{help!printing}
\item
Set the {\tt TEXTPRINT} environment variable to the command needed to
print ordinary text from the standard input on the desired printer.
(This command is used, for example, to print the text of help topics.)
\WAVE{} assumes that this command is `{\tt lpr}' if neither {\tt TEXTPRINT}
nor {\tt PRINTER} are set; if only {\tt PRINTER} is set, \WAVE{}
assumes that this command is `{\tt lpr -P\$PRINTER}'.
\index{printer!resolution}
\index{resolution!of printed output}
\item
Finally, if your printer is capable of resolution higher than 300 dpi,
you may also wish to add appropriate {\tt -d} options to the {\tt
pschart} and {\tt psfd} commands in \WAVE{}'s menu file (see
\hyperref{Creating custom formats for printing}
{section~}
{, page~\pageref{sec:custom-printing}, for details}
{sec:custom-printing}).
(This is not necessary in order to obtain
properly-scaled output, but this will affect the amount of fine detail
in your plots, and the thickness of the plotting lines.)
\end{itemize}
\index{profile@{\tt .profile}}
\index{login@{\tt .login}}
In most cases, you will want to add the commands needed to set these
variables to your {\tt .login} or {\tt .profile} file on the \WAVE{}
host, so that they are executed automatically whenever you log in.
For details on setting environment variables, see the discussion of the
\hyperref{{\tt DISPLAY} variable}
{{\tt DISPLAY} variable in section~}
{, page~\pageref{sec:setting-display}}
{sec:setting-display}.
\index{printing!remotely vs. locally}
If you are using \WAVE{} remotely, you may prefer to use a local printer
for your output. \WAVE{} has no specific support for doing so, but this
can often be arranged if, for example, your own computer is able to
make its printer available for printing from the \WAVE{} host (this is
can be done easily if your computer runs any version of UNIX, or with
somewhat more difficulty if it runs Microsoft Windows). In this case,
usually all that is needed is to set {\tt PRINTER} to the name of your
printer (as it is known to the \WAVE{} host). Another possibility is to
set {\tt PSPRINT} and {\tt TEXTPRINT} to commands that capture output
in a file, and then transfer the file to your own computer (via FTP or
any other method) for local printing. For example, you might set {\tt
PSPRINT} to `{\tt cat~>>output.ps}' and {\tt TEXTPRINT} to `{\tt
cat~>>output.txt}'. These commands accumulate all PostScript output
into {\tt output.ps}, and all text output into {\tt output.txt}, so
you should delete these files from the \WAVE{} host after copying them
to your computer, so they don't grow indefinitely.
If you need to change printers or print commands while running
\WAVE{}, this can be easily accomplished within \WAVE{}'s
\hyperref{{\sf Print setup} window}
{{\sf Print setup} window (see section~}
{, page~\pageref{sec:print-setup-window})}
{sec:print-setup-window},
which may be opened by selecting {\sf Print setup} from the
\menubutton{File} menu.
\chapter{Frequently Asked Questions}
This is the \WAVE{} FAQ (frequently asked questions) list. If your version of
\WAVE{} is newer than this guide, you may wish to review the on-line copy of
this FAQ (click on \button{Frequently Asked Questions} in \WAVE{}'s
{\sf Help} window).
If your question is not on this list, and you think it should be, please
send it to me
(\htmladdnormallink{{\tt wfdb@physionet.org}}
{mailto:wfdb@physionet.org})!
\section{Hardware questions}
\subsection{Can I use \WAVE{} if I don't run Linux or another Unix?}
Why would you not want to run Linux or Unix? Any version of Linux or Unix,
including Mac OS X, is a
much better choice for research than any version of MS-Windows. See
\htmladdnormallink{{\tt http://\-srom.zgp.org/}}{http://srom.zgp.org/}
for an independent perspective on this issue. Linux can coexist on the same PC
with MS-Windows if necessary.
The major obstacle to porting \WAVE{} to other platforms is that the XView
toolkit is needed for the user interface components of \WAVE{}. XView is free
software and can be ported to other platforms, but this task is not trivial.
Since late 2004 it has been possible to run \WAVE{} on MS-Windows directly,
using the free Cygwin POSIX emulation library and X11 server.
If you have any networked computer that can run X11R4 or a later version
(this includes all current UNIX workstations, PCs, Macintoshes, and a variety
of other systems), and access via network to another computer that can host
\WAVE{} (see above), you can run \WAVE{} remotely (see the next question).
\subsection{How can I use \WAVE{} from an X terminal, PC, Mac, etc.?}
\index{remote access}\index{network access}
As with any X application, you can use an X terminal or any system equipped
with an X server to interact with a copy of \WAVE{} running on another computer
connected to the same network. To do so, however, requires a few additional
steps:
\begin{itemize}
\item
Find out the host names of the two systems. On a UNIX system, the
`{\tt hostname}' command will give you this information. If your
display is connected to a PC or other non-UNIX system, you can try
remotely logging onto the UNIX system on which \WAVE{} resides, and
using the `{\tt who}' command to discover the name of the system in
front of you.
\item
Assume that your system is named {\tt hither} and that \WAVE{} resides on
{\tt yon}.
\index{WAVE host@\WAVE{} host}
\index{IP address}
\index{address, IP (Internet Protocol)}
You may need to add {\tt yon} to the X server access control list
on {\tt hither}, in order to make it possible for X clients on {\tt yon} to
open windows on your screen. If {\tt hither} is a UNIX system, you can
accomplish this by typing (on {\tt hither}) `{\tt xhost +yon}'. (Note: if
{\tt hither} doesn't recognize {\tt yon} by name, this command will have no
effect. In this case, use {\tt yon}'s IP address in place of its name.)
\item
Remotely log in to {\tt yon} (for example, via {\tt ssh} or {\tt telnet}), and
set the {\tt DISPLAY} environment variable on {\tt yon} to point back to your
display. If you use the C-shell on {\tt yon}, this will normally be done by
`{\tt setenv DISPLAY hither:0.0}'. Users of {\tt sh}, {\tt ksh}, or {\tt bash}
should type `{\tt DISPLAY=hither:0.0; export DISPLAY}'. (Note: if {\tt yon}
doesn't recognize {\tt hither} by name, this command won't work. In this case,
use {\tt hither}'s IP address in place of its name.)
\item
Check the connection by starting an X11 client such as {\tt xterm} on {\tt
yon}. A new window should appear on your display within a few seconds. (See
the documentation for your X server if this doesn't work).
\item
Once you have succeeded in the test in the previous step, start \WAVE{}
in the usual way (`{\tt wave -r} \emph{record ...}') on {\tt yon}.
See
\hyperref{``Where do I find the missing fonts?''}
{``Where do I find the missing fonts?'' (section~}
{, page~\pageref{faq:missing-fonts})}
{faq:missing-fonts}
if your X server complains about missing fonts. See
\hyperref{``I can't find the file named \emph{record}!''}
{``I can't find the file named \emph{record}!'' (section~}
{, page~\pageref{faq:cannot-find-record})}
{faq:cannot-find-record}
if \WAVE{} complains about missing files.
\end{itemize}
X servers are standard on all current UNIX workstations, but not on
PCs or Macintoshes. There are many MS Windows-hosted X servers
available commercially, as well as a smaller number of MS-DOS and
Macintosh-hosted X servers.
\subsection{Can I run \WAVE{} remotely using a modem?}
\index{modem access}\index{PPP}\index{SLIP}\index{TERM}
It is possible, with appropriate (SLIP, PPP, or TERM) software, to run
\WAVE{} across a serial connection (see the previous question for
details), but this will be rather slow even with a 56 kbps modem.
Using \WAVE{} remotely via Ethernet is usually quite tolerable,
however.
If you run \WAVE{} locally, but read data from a remote web site
such as PhysioNet, you will have much better performance, whether
using a modem or Ethernet, because the volume of data transferred is
far lower in this case.
\subsection{How can I insert annotations using a two-button mouse?}
\index{mouse!middle button!simulating}
\index{middle mouse button!simulating}
\index{mouse!right button!simulating}
\index{right mouse button!simulating}
\index{chording (mouse technique)}
Normally, the middle button is used to insert annotations, so the problem is
to simulate a middle button click if you don't have a middle button.
Most, if not all, X servers that support two-button mice provide a way to do
this. The most common method is to press both buttons simultaneously (an
operation sometimes called ``chording,'' by analogy with playing a chord on
the piano). Typically, you have an adjustable window of 50 to 100 milliseconds
in which to press both buttons, so that you don't need exactly simultaneous
clicks (which would be impossible to achieve reliably). Some X servers delay
reporting a button-down event until a button-up event occurs; this approach
makes chording less error-prone, but it means that the feedback that \WAVE{}
produces in response to button-down events gets delayed until it may no longer
be useful. Another approach, more commonly used with one-button mice, is to
simulate the middle button (and, if necessary, the right button) using a
mouse button and keyboard key combination, such as clicking while pressing the
\keycap{SHIFT} or \keycap{CTRL} keys. Check your X server's manuals for
information about which of these methods is supported. With a little practice,
annotation editing can be tolerable with a button-impaired mouse.
Independent of the X server, \WAVE{} also makes it possible to simulate a
middle button click, by using the \keycap{F2} key (or the \keycap{5} key
on the numeric keypad). If you use this technique, you might also wish to
use the \keycap{F3} and \keycap{F4} keys to drag the pointer and marker bars
left or right.
Inexpensive three-button mice, trackballs, and touchpads manufactured
by Logitech and many others are widely available for PCs, and are
highly recommended if you do much annotation editing. Most are fully
compatible with Microsoft two-button mice. Some users prefer
trackballs for precision editing since there is no tendency for the
pointer to move when clicking the buttons, as with a mouse.
\subsection{How do I get spot help if I don't have a {\sf Help} key?}
\index{on-line help}\index{help}
\label{faq:no-help-key}
If you are not using \WAVE{} with a Sun keyboard, use the \keycap{F1}
key to open XView
\index{XView}
spot help for \WAVE{}. If this doesn't work, you
may need to use the `{\tt xmodmap}' utility (a standard component of
X11, usually found in the same directory as other X clients such as
`{\tt xterm}'). Try the following command:
\begin{verbatim}
xmodmap -e "keysym F1 = Help"
\end{verbatim}
If you are now able to use \keycap{F1} to open spot help, you may wish
to include this command in your `{\tt .xinitrc}' (a text file in your
home directory; create it if it doesn't exist) so that spot help via
\keycap{F1} is enabled whenever you log in.
If you are not using {\tt olwm} or {\tt olvwm},
\index{olwm@{\tt olwm} (Open Look Window Manager)}
\index{olvwm@{\tt olvwm} (Open Look Virtual Window Manager)}
spot help may not work
properly; in particular, your window manager may pass incorrect
information about which window is active when you invoke spot help.
There is no general solution to this problem; try using {\tt olvwm} or
{\tt olwm}, at least until you are familiar with \WAVE{}'s controls.
\section{Problems starting \WAVE{}}
\subsection{Why won't \WAVE{} run?}
Here are a few things to check:
\begin{enumerate}
\item
\index{wave command@{\tt wave} command}
\index{record!name}
\index{annotator name}
The command used to run \WAVE{} must be typed in lower case, as in `{\tt
wave -r 100s -a atr}'. Note that letters in record names and
annotator names are also usually in lower case.
\item
\index{PATH environment variable}\index{environment variables!PATH}
Try typing {\tt wave} with no command-line arguments. You should see a summary
of options. If you don't, {\tt wave} has not been installed properly, is not
in your {\tt PATH}, or another program named {\tt wave} is in your {\tt PATH}.
\index{dynamically linked libraries}
\index{shared libraries}
\index{libraries!missing}
\index{LD\_LIBRARY\_PATH environment variable}
\index{environment variables!LD\_LIBRARY\_PATH}
Errors similar to `{\tt wave: can't load library 'libxview.so.3'}'
indicate an installation problem which is probably shared by other
applications that use the same libraries.
Use the command `{\tt ldd `which wave`} to identify which dynamically
linked libraries are missing. Locate these on your system (for
example, using a command such as `{\tt find / -name libxview.so.3
-print}'; if any of these libraries cannot be found on your system, it may be
downloaded from \htmladdnormallink{PhysioNet}{http://physionet.org/}.)
Add the directories in which the missing libraries are found to your
{\tt LD\_LIBRARY\_PATH}. For example, if the missing libraries are
located in {\tt /usr/openwin/lib}, and you are using the C-shell, use the
command `{\tt setenv LD\_LIBRARY\_PATH /usr/openwin/lib:\$\{LD\_LIBRARY\_PATH\}}'.
Under Linux, if you can obtain root permissions, simply add
{\tt /usr/openwin/lib} to the list of directories in `{\tt /etc/ld.so.conf}',
and then run {\tt ldconfig}. This solves the problem permanently (well, at
least until the next OS upgrade).
\item
If the previous test works, try typing `{\tt wave -r 100s -a atr}'. (All
\WAVE{} distributions come with record 100s.) One of the following should
happen:
\begin{itemize}
\item
\index{WFDB environment variable}\index{environment variables!WFDB}
\index{DISPLAY environment variable}\index{environment variables!DISPLAY}
If you see a summary of options, rather than the \WAVE{} main window, read
the message carefully; you may need to set the {\tt DISPLAY} or {\tt WFDB}
environment variables, or the X server may not be running.
\item
If you see a lengthy error message referring to missing fonts, see
\hyperref{``Where do I find the missing fonts?''}
{``Where do I find the missing fonts?'' (section~}
{, page~\pageref{faq:missing-fonts})}
{faq:missing-fonts}.
\item
If you see neither a summary of options nor the \WAVE{} main window, the
{\tt DISPLAY} environment variable may be set incorrectly, the X server may be
refusing permission to open a window, or your window manager may be waiting
for you to specify the location or size of the window to be opened.
\item
If you see only a message box reading `{\sf Record 100s is unavailable}', your
{\tt WFDB} environment variable may be set incorrectly; in this case, find the
directory (probably {\tt /usr/database}) containing a file named
`{\tt 100s.hea}' and append the name of that directory to the value of
{\tt WFDB}.
\item
\index{signal!window}
If \WAVE{}'s signal window appears, but is solid white or light grey,
and you are using a version of \WAVE{} older than 6.8, your X server
does not have backing store enabled.
Click on any of the navigation controls (e.g., \button{\tt <<},
\button{\tt <}, \button{\tt >}, or \button{\tt >>}), or resize the window,
to make the signals appear. To avoid this problem entirely (until
the next time you upgrade your X server), turn on backing store in
your X server. For instructions for doing this, and for what to do if the
signal window is solid (or nearly solid)
blue or black, or has only horizontal lines across it, see
\hyperref{``I can't see the signals!''}
{``I can't see the signals!'' (section~}
{, page~\pageref{faq:cannot-see-signals})}
{faq:cannot-see-signals}.
\index{S option for WAVE@{\tt -S} option for \WAVE{}}
\index{command-line options!{\tt -S}}\index{options!{\tt -S}}
\item
If the signals appear, but there are no annotations or time stamps in the
signal window, your X server has defective support for overlay graphics.
Restart \WAVE{}, adding the `{\tt -S}' option to the `wave' command. Also see
\hyperref{``I can't see text in the signal window!''}
{``I can't see text in the signal window!'' (section~}
{, page~\pageref{faq:cannot-see-text})}
{faq:cannot-see-text}.
\item
If you see a correct display, your problem is specific to the record you
were previously trying to view. Find the directory containing the header
file (`\emph{record}{\tt .hea}', where \emph{record} is the record
name) for the desired record, and append the name of that directory to the
value of {\tt WFDB}.
\end{itemize}
\end{enumerate}
\subsection{Why does \WAVE{} take so long to display the first screen?}
If you are running \WAVE{} remotely, a slow network connection may be the
reason for sluggish performance. If possible, run \WAVE{} locally, or get
a faster network connection. You might also try changing the time scale
so that fewer points need to be drawn on each screen.
If you are using \WAVE{} to view a record via FTP, it is currently not possible
to begin until the entire record has been downloaded; for long records over
slow network connections, this can take a long time. Some web (HTTP) servers
suffer from the same limitation. If possible, use a web server that supports
HTTP range requests, such as Apache, or download a copy of the record to your
local disk.
PhysioNet and its mirrors support HTTP range requests, so if you experience
this problem when reading data from PhysioNet, the cause may be network
congestion; in this case, try using a different mirror.
\subsection{Where do I find the missing fonts?}
\label{faq:missing-fonts}
\index{Open Look fonts}\index{font!Open Look}
\WAVE{} is an XView
\index{XView}
application, and requires the Open Look cursor font
on the server. If your server doesn't have this font (`{\tt
olcursor.snf}' for X11R4 and earlier servers, `{\tt olcursor.pcf}' for
X11R5 and later servers), you must install it before \WAVE{} will run.
XView applications also use the `{\tt olgl??.snf}' or `{\tt olgl??.pcf}'
glyph fonts; if these are missing, \WAVE{} will run but certain standard
Open Look graphical elements will not have the correct appearance. To
install these fonts on your X server's system:
\begin{enumerate}
\item
Generate copies of `{\tt ol*.snf}' or `{\tt ol*.pcf}' for your X server
system's architecture.
\item
Copy `{\tt ol*.snf}' or `{\tt ol*.pcf}' to a world-readable directory on the
server machine.
\item
Update the font database on the server machine.
\item
Force the server to reread the font database.
\end{enumerate}
You should be able to find `{\tt ol*.snf}' or `{\tt ol*.pcf}' files on the
machine on which \WAVE{} resides (probably in {\tt /usr/lib/X11/fonts/misc}).
The `{\tt ol*.pcf}' files are portable (although usually optimized for the
architecture of the system on which they are installed). If you need to use
`{\tt snf}' fonts, however, and the server machine is not of the same
architecture, it will be necessary to find `{\tt ol*.bdf}' in the XView
\index{XView}
distribution and use `{\tt bdftosnf}' to generate `{\tt .snf}' files
for your X server system's architecture (see the man page for `{\tt bdftosnf}';
this step can be done trivially on the server machine, if `{\tt bdftosnf}' is
available there, or with a little more trouble on the remote machine). If the
server machine runs UNIX, read the man pages for `{\tt mkfontdir}' and
`{\tt xset'} to see how to update and reread the font database; otherwise,
consult the documentation for your X server. Note that (under UNIX) you do
not need to have write permission in the standard font directory in order to
perform these steps; if you add your own font directory to the font path using
`{\tt xset}', however, remember that this setting lasts only until the server
exits and will need to be repeated afterwards.
On some platforms, there are simpler ways to install the missing fonts. See
the \htmladdnormallink{XView}{http://physionet.org/physiotools/xview/} home
page on PhysioNet for pointers.
\section{Display-related questions}
\subsection{I can't see the signals!}
\label{faq:cannot-see-signals}
\index{signal!window}
If the signal window is solid white or light grey, and your version of
\WAVE{} is older than 6.8, your X server does not have backing store enabled.
Click on any of the navigation controls (e.g., \button{\tt <<},
\button{\tt <}, \button{\tt >}, or \button{\tt >>}), or resize the window, to
make the signals appear. If this works, the problem is almost certainly that
backing store has been disabled in the X server's configuration file. You can
verify this by running the command
\begin{verbatim}
xdpyinfo | grep backing
\end{verbatim}
To enable backing store, insert the line
\begin{verbatim}
Option "backingstore"
\end{verbatim}
in the {\tt Device} section of your X server's configuration file
(usually {\tt /etc/X11/xorg.conf} or {\tt /etc/X11/XF86Config}),
or run the server with the option ``{\tt +bs}'' to obtain the same result.
See the documentation for your X server for further information.
\index{format!of signal files}
If the signal window is solid or nearly solid blue (or black if you have
a mono\-chrome or greyscale display), the signals are too big. \WAVE{}
may be attempting to display signals that fill the entire window. In
rare cases, noise in the signals themselves can produce this effect.
More common causes include incorrect signal format or gain
specifications in the header file for the record you have opened,
\index{amplitude scale}\index{scales!amplitude}
incorrect display calibration, or a choice of amplitude scale that
results in excessive vertical range of one or more signals. This
effect can also occur as a result of various problems related to the
WFDB calibration file, for example, if the {\tt WFDBCAL} environment
\index{WFDBCAL environment variable}\index{environment variables!WFDBCAL}
variable does not name an accessible WFDB calibration file (see
\htmladdnormallink{{\tt wfdbcal(5)}}{../wag/wfdbca-5.htm}
for details), if any of the signals in the record are of
types not listed in the WFDB calibration file, or if the WFDB calibration
file does not contain appropriate default display scales for all of
the signal types in the record. See the next several questions for
suggestions on correcting these problems.
If the signal window contains horizontal lines (in blue if you have a color
display) where the signals should appear, the signals are too small. In this
case, the signal gains specified in the header file may be incorrect, the
display calibration may be incorrect, or you may have specified an amplitude
scale that reduces the vertical range of the signals to zero. Click on
\button{View...} to check the scales, and adjust them if necessary.
If the signal window contains time indicators in the lower corners,
look for the signal names along the left edge of the window. If there
are no signal names visible, click on \button{View...}, then on {\sf
signal names} and \button{Redraw} in the {\sf View} window. If signal
names still do not appear, either the header file or the signal file
for the record you have opened may be inaccessible. Find these files
(see
\hyperref{``File-related questions''}
{``File-related questions'', section~}
{, page~\pageref{faq:file-related-questions}}
{faq:file-related-questions}), add the directory that contains them to your
WFDB path, and try to read a few samples using `{\tt rdsamp -r \emph{
record} -t 1}'. If this fails, examine the header file for the record
(a text file), and be sure that it specifies at least one signal in an
accessible signal file.
\subsection{I can't see text in the signal window!}
\label{faq:cannot-see-text}
\index{S option for WAVE@{\tt -S} option for \WAVE{}}
\index{command-line options!{\tt -S}}\index{options!{\tt -S}}
This may result from an X server bug. This bug appears to be limited
to X servers that support `true color' (typically 24- or 32-bit) displays,
when using overlay graphics. Restart \WAVE{}, adding the `{\tt -S}'
option to the end of the `{\tt wave}' command.
\index{Netscape!color map problem with}\index{color map}
This problem may also occur on 8-bit `pseudo-color' displays, if another
application such as Netscape has already allocated most of the color map.
To avoid this problem, start \WAVE{} before starting Netscape.
\subsection{Why does \WAVE{} crash, saying ``All pty's in use''?}
\index{pty problems}
This problem occurs if the installed version of the XView library requires
BSD ptys, and if your operating system does not support BSD ptys. \WAVE{}
may operate without problems until you attempt to open a text or terminal
window (by selecting {\sf Analyze...} from the {\sf File} menu, or by
various selections from the {\sf Properties} and {\sf Help menus}. Typically,
\WAVE{} then exits with the error ``{\tt All pty's in use}''.
Two types of ptys (pseudo-terminal devices) have been supported by most Linux
distributions until recently. Traditionally, XView has used BSD-style ptys
(pseudo-terminal devices) to implement text windows and terminal emulator
objects such as WAVE's analysis commands window. Most recent Linux
distributions based on version 2.6 kernels, including Fedora Core 2 and later,
support only the newer UNIX98 (SVR4-style) ptys. Although some older XView
libraries can be installed on these platforms, they will cause WAVE (and other
XView-based applications) to crash whenever a text or terminal window is
opened. The recommended solution is to install XView libraries that use UNIX98
(SVR4) ptys rather than the older BSD (``legacy'') ptys; these are available
from PhysioNet.
\subsection{\WAVE{} doesn't draw/erase properly in the scope window!}
\index{Scope window@{\sf Scope} window}
This problem may result from several different X server bugs. You
may be able to avoid it by switching from overlay graphics mode (the
usual default) to shared color mode (selected using \WAVE{}'s {\tt -S}
\index{S option for WAVE@{\tt -S} option for \WAVE{}}
\index{command-line options!{\tt -S}}\index{options!{\tt -S}}
command-line option), or vice versa, since \WAVE{} uses different
techniques for drawing in the scope window depending on the display
mode.
A bug in network file handling can sometimes interfere with correct display of
waveforms in the scope window when reading records via HTTP. For now, the only
workarounds are to restart \WAVE{}, or to copy the record to local disk files
(this can be done easily using
\htmladdnormallink{{\tt xform}}{../wag/xform-1.htm},
\htmladdnormallink{{\tt snip}}{../wag/snip-1.htm}, or a web browser). Check
\htmladdnormallink{PhysioNet}{http://physionet.org/} for updates to \WAVE{}
or to the WFDB library that may correct this bug.
\subsection{How can I get correct display scales?}
\label{faq:display-scales}
\index{xdpyinfo command@{\tt xdpyinfo} command}
\index{resolution!of display}
Use `{\tt xdpyinfo}' (a standard X client that is provided as part of the X
core distribution) to check several server parameters. (As with virtually all
X clients, it doesn't matter which machine you find `{\tt xdpyinfo}' on; it
will query your server from wherever it is run.) `{\tt xdpyinfo}' will report
the version and release numbers of your server; you should have version 11,
release 3 or later. It will also report the screen size in pixels and the
resolution in pixels per inch. Take a minute to verify the screen resolution
by direct measurement of the screen with a ruler. If the resolution reported
by `{\tt xdpyinfo}' is incorrect, \WAVE{} will not be able to draw waveforms at
properly calibrated scales. The sample X11 servers from MIT and the X
Consortium, and the XFree86 project's X11 servers, all support a
\index{dpi option for WAVE@{\tt -dpi} option for \WAVE{}}
\index{command-line options!{\tt -dpi}}\index{options!{\tt -dpi}}
`{\tt -dpi}' option, which allows you to specify the correct screen resolution
at the time the server is started; read the man page for X or Xserver for
details. (If your server does not support this feature, \WAVE{} can be given
a similar `{\tt -dpi}' option.)
\index{display calibration}\index{calibration!display}
You can also double-check your display calibration using \WAVE{} itself.
Run \WAVE{}, enable the grid display, and set the display scales to
their default values (25 mm/sec, 10 mm/mV). (Click on
\button{View...} to pop up the controls for the grid and the display
scales; remember that any adjustments you make become effective only
after you click on \button{Redraw} within the {\sf View} window.) The
grid intervals should measure exactly 5 mm in each direction. If they
are too small, use a larger value for the `{\tt -dpi}' specification; if the
grid lines are more than 5 mm apart, decrease the `{\tt -dpi}' values.
\subsection{Why are signals too big or too small?}
\index{signal!calibration}\index{calibration!signal}
There are several reasons why the size of signals may be incorrect. \WAVE{}
determines display scales for signals based on several parameters:
\begin{itemize}
\item
\index{WFDBCAL environment variable}\index{environment variables!WFDBCAL}
First, the {\tt WFDBCAL} environment variable specifies the name
of a text file (located in a directory in the WFDB path) containing the
names of many common signals and customary display scales for each
(expressed as physical units per centimeter). For example, ECG
signals are customarily displayed at a scale of 1 mV per centimeter.
If a signal appears at an inappropriately large or small scale, its
name may be missing from the calibration file, the {\tt WFDBCAL}
variable may not correctly specify the name of the calibration file,
or the {\tt WFDBCAL} file may not reside in a directory in the WFDB path.
On most systems, the calibration file is `{\tt
/usr/database/wfdbcal}', and the {\tt WFDBCAL} environment
variable is set by the same command used to set the WFDB path (see the
discussion about the
\hyperref{database environment}
{database environment in section~}
{, page~\pageref{sec:wfdb-path}}
{sec:wfdb-path}).
Instructions for adding additional signal names and scales to the calibration
file are located within the file itself, and may also be found in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm}.
\item
\index{header file}
Second, the header file for the record specifies the gain for each signal
(the number of analog-to-digital units per physical unit). If the gain has
not been determined, or is incorrect, the size of the signal as drawn by
\WAVE{} may be incorrect as well. If you know the physical values that
correspond to at least two levels represented in the signal (for example,
the top and bottom of a calibration pulse), you can use the `{\tt calsig}'
application to determine the gain and to rewrite the header file. See the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm}
for details. `{\tt calsig}' can be most conveniently run from
\WAVE{}'s {\sf Analysis} window.
\item
Finally, the display calibration determines the number of pixels per inch
(25.4 mm). \WAVE{} usually gets its information about the display calibration
from the X server, but the X server may not supply the correct information.
See
\hyperref{``How can I get correct display scales?''}
{``How can I get correct display scales?'' (section~}
{, page~\pageref{faq:display-scales})}
{faq:display-scales}
for details on diagnosing and correcting this problem.
\end{itemize}
\subsection{How can I enlarge or reduce the size of individual signals?}
\WAVE{} version 6.11 and later versions allow you to change the displayed
sizes of individual signals if you wish. If the {\sf Annotation Template}
is not open, open it by left-clicking anywhere in the signal window, then
left-click again in the signal window to return the focus there.
Select the signal of interest by pressing \keycap{Shift} and clicking
with the left mouse button while the pointer is near the signal of
interest, which will be highlighted by \WAVE{} when you do so. Next,
press and hold \keycap{Control} and one of \keycap{+} (to enlarge the
signal), \keycap{-} (to reduce the size of the signal), or \keycap{=}
(to reset the size of the signal to the value selected in the
{\sf View} panel).
You may repeat this operation with as many signals as desired. If you
have not selected any signal, all signals are resized by these commands.
\subsection{How can I change \WAVE{}'s default scales or display colors?}
\index{scales}
The easiest way to make simple changes in \WAVE{}'s default display
parameters is by using the controls in the {\sf View} window to
configure the display to your liking. If you then click on
\button{Save as new defaults} in the {\sf View} window, your choices
are recorded in your `{\tt .Xdefaults}' file (in your home directory)
and will be used for future \WAVE{} sessions. (Be sure that you have
made your changes effective by using \button{Redraw} before
\button{Save as new defaults}.)
\index{colors!in signal window}
Colors are also determined by X resources that may be specified in
your `{\tt .Xdefaults}' file, but the {\sf View} window does not
include color controls.
\hyperref{Read about color resources}
{See section~}
{, page~\pageref{setting-colors}}
{setting-colors}
for guidance on setting display colors.
\subsection{Why do colors in other windows change when I use \WAVE{}?}
\index{S option for WAVE@{\tt -S} option for \WAVE{}}
\index{command-line options!{\tt -S}}\index{options!{\tt -S}}
\WAVE{} queries the X server to determine how many colors it can display, and
what methods it can use to do so. If the X server does not answer this query
correctly, \WAVE{} may attempt to use a suboptimal or unavailable display mode.
If you find that the colors of other windows change when the cursor moves into
a \WAVE{} window, you may prefer to use the `{\tt -S}' option to avoid this
behavior at a slight (often unnoticeable) cost in speed.
\subsection{Everything in the {\sf Analysis Commands} window appears twice!}
\index{stty command@{\tt stty command}}
\index{analysis commands window@{\sf Analysis Commands} window}
This problem, which may occur when you are running \WAVE{} under Linux,
appears to result from a bug in an early Linux version of the XView
`termsw' package. Type the command `{\tt stty -echo}' in the {\sf
Analysis Commands} window, and the problem should go away.
\section{File-related questions}
\label{faq:file-related-questions}
\subsection{I can't find the file named `\emph{record}'!}
\label{faq:cannot-find-record}
\index{record!name!vs. file name}
\index{file names, vs. record names}
Record names are \emph{not} file names; they are components of file
names only. For example, three files belong to record 100s: {\tt
100s.hea}, {\tt 100s.dat}, and {\tt 100s.atr}. There is no \emph{file} named
`{\tt 100s}' belonging to \emph{record} 100s. See
\htmladdnormallink{{\tt annot(5)}}{../wag/annot-5.htm},
\htmladdnormallink{{\tt header(5)}}{../wag/header-5.htm}, and
\htmladdnormallink{{\tt signal(5)}}{../wag/signal-5.htm}, in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm},
for information about file types and formats.
\subsection{Why does \WAVE{} tell me `Record ... is unavailable'?}
\index{WFDB environment variable}\index{environment variables!WFDB}
In common with other WFDB applications, \WAVE{} searches for its input
signals and annotations in directories named by the {\tt WFDB}
environment variable (see the discussion of the
\htmladdnormallink{WFDB path}{../wpg/database-path.htm} in the
\htmladdnormallink{{\it WFDB Programmer's Guide}}{../wpg/wpg.htm}).
If \WAVE{} is running remotely,
remember to set {\tt WFDB} \emph{on the \WAVE{} host}
\index{WAVE host@\WAVE{} host}
(a default can
usually be set for C-shell users by `{\tt source
/usr/bin/cshsetwfdb}', or for Bourne shell, Korn shell, and `{\tt bash}'
users by `{\tt .~setwfdb}'; don't omit the `{\tt .}'). The directories
named by {\tt WFDB} are those on the \WAVE{} host; thus (unless your WFDB
files are already on the \WAVE{} host, or are accessible to the \WAVE{} host
via HTTP or FTP -- see the next question) you must either transfer them
to the remote machine, or NFS- or RFS-mount the directory in which they reside
onto a suitable point in the file system of the \WAVE{} host. Furthermore,
remember that output annotation, log, and print files will be written
to your current directory on the \WAVE{} host.
\index{wfdbwhich command@{\tt wfdbwhich} command}
To get the pathname of a WFDB file, use `{\tt wfdbwhich}' (see
\htmladdnormallink{{\tt wfdbwhich(1)}}{../wag/wfdbwh-1.htm}
for details). For example, the output of `{\tt wfdbwhich
header 100s}' is the pathname of the header file for record 100s
(usually `{\tt /usr/database/100s.hea}'). If `{\tt wfdbwhich}'
can't find the file, neither can \WAVE{} (or any other WFDB application).
In this case, you will need to check and correct the value of the {\tt
WFDB} environment variable. In unusual cases, the WFDB path may be
correct, but you may not have permission to read the file or one of
the directories in the path to the file; in such cases, you will need
to get the file's owner or your system administrator to give you
appropriate permissions.
\subsection{How can I view a record stored on a web site or an FTP server?}
Add the directory containing the record to your WFDB path, then use \WAVE{}
just as you would to view a record stored on your local disk. For example,
suppose the WFDB path is:
\begin{verbatim}
. /usr/data http://www.signals.r.us/data ftp://sand.bar.com/pub
\end{verbatim}
In this case, \WAVE{} would look for input files first in the current directory
({\tt .}) of the local disk, then in {\tt /usr/data} (which might be
local or might be part of a networked file system), then on the
{\tt signals.r.us} web site, and finally on {\tt sand.bar.com}'s FTP server.
Unless you have a slow network connection, you may not notice any difference
between viewing locally and remotely stored records.
\section{Questions about editing}
\subsection{Where are my annotations?}
\index{annotation file}
When you create a new set of annotations, if you have specified the annotator
name in the {\sf Load} window, \WAVE{} saves your annotations in a new file
with a name of the form {\it record.annotator}, in the current directory. When
you edit an existing set of annotations, \WAVE{} makes a copy of the annotation
file containing your edits, gives it a name of the form {\it record.annotator},
and saves it in the current directory (i.e., whatever directory was current
when you started \WAVE{}). To be able to read your edited copy in a later
\WAVE{} session, be sure that the directory that contains your edited copy is
listed in your WFDB path \emph{before} any other directory that contains an
older version of the same annotation file. Usually, your WFDB path begins with
`{\tt .}', a synonym for the current directory. If this is the case, simply
return to the directory that contains your edited annotation file before
starting \WAVE{} each time.
If you created an annotation file without specifying an annotator
name, \WAVE{} uses its own name as the annotator name, so you should
look for a file named {\it record}{\tt .wave} in this case.
Old versions of \WAVE{} created annotation files with names of the form
{\it annotator.record}; if you have any of these, rename them in order to
continue using them with \WAVE{}.
\subsection{Why does \WAVE{} tell me `You may not edit annotations ...'?}
Since \WAVE{} is often used to \emph{view} annotated data, without
necessarily editing annotations, annotation editing is disabled when
\WAVE{} starts. If you have inadvertently done something (such as
clicking the middle mouse button in the signal window) that \WAVE{}
interprets as an editing command, it will warn you that the editing
action is disabled.
If you did intend to edit the annotations, select {\sf Allow editing} from the
\menubutton{Edit} menu, then repeat the edit.
\subsection{How do I edit a record on a CD-ROM, a web site, or an FTP server?}
\index{CD-ROM}
Be sure that your current directory is writable, that both your current
directory and the source (CD-ROM, web, or FTP) directory containing the record
you wish to edit are in your WFDB path, and that your current directory comes
\emph{before} the source directory in your WFDB path. When \WAVE{} writes your
edits, they always go into the current directory (so the current directory
cannot be on the CD-ROM, since the CD-ROM is not writable). At a later time,
when \WAVE{} (or any other WFDB application) opens the record, it finds your
edited version first, and doesn't look for the original version, provided only
that, in your WFDB path, the source directory follows the one in which your
edits are stored.
\subsection{How can I undo an edit?}
\index{edit!undo}
\WAVE{} doesn't support a general mechanism for `undoing' edits. Once
you move an annotation or change its attributes, you must manually
restore its position and attributes. Deleted annotations can always
be restored, however, by selecting the `phantom' annotation left
behind (these are displayed with a `{\sf .}' for the annotation
mnemonic) and then `deleting' the phantom. This action restores the
attributes of the original annotation, including the {\tt subtype},
{\tt chan}, {\tt num}, and {\tt aux} fields; if the annotation was
moved, however, its original position ({\tt time} field) is not restored.
\index{annotation file!backup}\index{backup!of annotation file}
\WAVE{} is careful not to destroy the version of the annotation file
that was current at the time \WAVE{} loaded the record. \WAVE{}
always saves edited annotation files to the current directory (even if
the original annotation file was loaded from another directory).
\WAVE{}'s saved annotation files are given names of the form `{\it
record.annotator}'. If, by saving its output, \WAVE{} would overwrite
an existing file with the same name, \WAVE{} first renames the
existing file by appending a tilde (`{\tt ~}') to its name.
Thus it is always possible to recover the state of the annotation file
as it was before you began the most recent editing pass. To do so,
exit \WAVE{}, and:
\begin{itemize}
\item
If there is a file with a name of the form `{\it record.annotator}\verb+~+' in
the current directory, rename it as `{\it record.annotator}'.
\item
Otherwise, delete or rename `{\it record.annotator}' so that the previous
version (which must be in another directory in the WFDB path) becomes visible
once again to \WAVE{}.
\end{itemize}
\subsection{Can I define my own annotations?}
\index{anntab file}
Yes. See
\hyperref{Creating and using new annotation types}
{section~}
{, page~\pageref{sec:creating-annotation-types}}
{sec:creating-annotation-types},
or the file named `{\tt anntab}' in the \WAVE{} distribution for examples.
\subsection{How can I recover work after a crash?}
\index{autosaving}
\WAVE{} autosaves your edits at 1-minute intervals, or after every 20
insertions, deletions, or attribute changes (repositioning doesn't
count). You don't need to do anything special to recover your work,
but you may lose up to a minute's worth of edits.
\subsection{Can I edit annotations with a text editor?}
Believe it or not, sometimes users ask this question.
\index{wrann command@{\tt wrann} command}
\index{rdann command@{\tt rdann} command}
\index{annotation!editing using {\tt emacs}}
If you have unusual requirements (for example, if you want to change all
annotations of a certain type), you may be able to edit annotations more
efficiently using a text editor such as {\tt emacs}. Since annotation files
are not text files, however, you will need to convert your files from binary
to text form to edit them, and then convert the edited text back to binary
form in order to use them further with \WAVE{}. You can do this using {\tt
rdann} and {\tt wrann} (see
\htmladdnormallink{{\tt rdann(1)}}{../wag/rdann-1.htm} and
\htmladdnormallink{{\tt wrann(1)}}{../wag/wrann-1.htm},
in the {\it WFDB Applications Guide}, for details).
\subsection{What are `link' annotations?}
\index{link annotation}\index{annotation!link}
By analogy to hyperlinks in World Wide Web documents, link annotations
allow external data (including documents, images, and audio
annotations among other possibilities) to be associated with specific
locations in a record. In fact, any URL that can be understood by a
supported web browser can be used to specify the location of external
data in a link annotation. Within the link annotation, the URL
appears as the first part of the {\tt aux} string (in the {\sf Text}
field of the {\sf Annotation Template}). If the {\tt aux} string
contains any spaces, any characters following the space are treated as
a label to be displayed by \WAVE{} in place of the URL itself.
Support for link annotations is a new feature of \WAVE{} 6.0. To view
the external data associated with a link annotation, select the link
and press \keycap{Enter} (or \keycap{Return}).
If your web browser is not already running, this may take a few
moments while \WAVE{} starts it. If nothing happens after a minute or
so, check \WAVE{}'s {\sf Analysis Commands} window for errors that may
have occurred when \WAVE{} attempted to start your web browser.
(\WAVE{} uses Mozilla by default. See
\hyperref{\WAVE{} and the Web}
{section~}
{, page~\pageref{sec:web},}
{sec:web}
for details on configuring \WAVE{} to use a different web browser.)
\index{Mozilla}\index{web browser}
Link annotations may be moved, copied, attached to specific signals,
inserted, changed, and deleted just as for any other annotation.
\WAVE{} does not include built-in facilities for editing the external
data, however; other software such as a text editor or a
special-purpose HTML editor may be useful for this purpose.
\subsection{Can \WAVE{} edit signal files?}
\WAVE{} itself doesn't do this, but certain kinds of signal file editing are
easy to do using {\tt snip} from \WAVE{}'s {\sf Analyze} panel. A common
requirement is to remove unwanted data from the beginning or end of a record.
To do this, simply mark the segment to be retained using the `{\tt <}' and
`{\tt >}' markers, then click on \button{Extract segment}.
If your record contains unwanted signals, remove them from the {\sf Signal
list} before extracting the segment. You can also rearrange the order of
signals within the signal list if you wish.
\index{snip command@{\tt snip} command}
Note that this operation does not modify the original record; rather, the
desired portions of the record are copied to create a new record. If you
wish to copy a set of annotations as well as data from signal files, be sure
to load the annotation file for the original record into \WAVE{} before
extracting the segment. (See
\htmladdnormallink{{\tt snip(1)}}{../wag/snip-1.htm}, in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm},
if you need to copy two or more sets of annotations.)
\index{wfdbcollate command@{\tt wfdbcollate} command}
\index{xform command@{\tt xform} command}
To join two or more records end-to-end, use {\tt wfdbcollate} to create
a multi-segment record. {\tt wfdbcollate} writes a special header file
for the new record, but does not copy or modify the signal
or header files of the original records; it will, however, write
new annotation files on request, since the WFDB library does not support
multi-segment annotation sets. The records to be joined must be
ordinary (not multi-segment) records. If necessary,
\htmladdnormallink{{\tt xform}}{../wag/xform-1.htm}
can be used to rewrite a multi-segment record as an ordinary record. See
\htmladdnormallink{{\tt wfdbcollate(1)}}{../wag/wfdbco-1.htm}, in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm},
for further information.
\index{rdsamp command@{\tt rdsamp} command}
\index{wrsamp command@{\tt wrsamp} command}
More complex editing of signal files, such as splicing segments or
modifying individual samples, can be done by converting the signals to
text form using
\htmladdnormallink{{\tt rdsamp}}{../wag/rdsamp-1.htm}
(accessible from \WAVE{} via the
\button{List samples} button in the {\sf Analyze} window), editing the
text as required, and converting the edited text to a signal file
using {\tt wrsamp} (see
\htmladdnormallink{{\tt wrsamp(1)}}{../wag/wrsamp-1.htm}, in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm},
for details).
\section{What else can \WAVE{} do?}
\subsection{How can I make a screen dump?}
\index{PostScript}
\index{xwd command@{\tt xwd} command}
\index{xpr command@{\tt xpr} command}
\index{screen dump}
If you really want a screen dump, `{\tt xwd | xpr}' will produce one in
PostScript form. (Type `{\tt man xwd}' and `{\tt man xpr}' for details
on options.) Another way to do this, if {\tt xpr} is not available, is
`{\tt xwd | xwdtopnm | pnmdepth 255 | pnmtops}'. If your printer is not a
PostScript printer, you can still print the output of either of these
commands using Ghostscript, a freely available PostScript interpreter.
\index{pschart command@{\tt pschart} command}
Why settle for a screen dump, though? In most cases, you will prefer to use
`{\tt pschart}' to produce a much nicer plot, and in much less time. Select
{\sf Print} from \WAVE{}'s \menubutton{File} menu to print the current contents
of the signal window; use \button{Print chart} in the {\sf Analyze} window
if you wish to specify start and stop times. See
\htmladdnormallink{{\tt pschart(1)}}{../wag/pschar-1.htm}, in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm}
for information about {\tt pschart}'s
numerous formatting options. If you don't like the defaults, change them by
editing \WAVE{}'s menu file. Doing so also allows you to change the
default format for the {\sf Print} choice on the \menubutton{File} menu; see
the comments in the menu file for details).
\index{psfd command@{\tt psfd} command}
If you are plotting a great deal of data, you may wish to use
\htmladdnormallink{{\tt psfd}}{../wag/psfd-1.htm}
rather than {\tt pschart}; to do so, select \button{Print full disclosure}
rather than \button{Print chart} in \WAVE{}'s {\sf Analyze} window. Most of
{\tt pschart}'s options are accepted by {\tt psfd}.
If you need to collect a set of figures, either from a single record or from
many records, use \WAVE{}'s {\sf Log} window to record the times of interest,
and enter captions for each figure in the {\sf Description} field of the
{\sf Log} window. The log file generated in this way can be interpreted
directly as a command file by {\tt pschart}, which prints the captions as
titles for each figure.
\subsection{Can \WAVE{} read digitized signals in \emph{(fill in the blank)}
format?}
\index{format!of signal files}\index{file formats!signals}
\index{signal file!formats}
Probably it can. The most common formats for storage of digitized
signals are fixed-length binary formats that encode integer samples,
and \WAVE{} supports dozens of such formats. \WAVE{} does not require
any embedded header information within signal files (but it can be
made to ignore such information). In most cases, all you need to do
is to write a header file that describes the format in terms
understandable to \WAVE{}; once you have done so, any of the other WFDB
applications can also read your signals. Writing a header file can be
most easily done by copying an existing header file and modifying it
using a text editor. See
\htmladdnormallink{{\tt signal(5)}}{../wag/signal-5.htm} and
\htmladdnormallink{{\tt header(5)}}{../wag/header-5.htm} in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm},
for details on supported signal formats and how to write a header file.
\index{multiplexed signal file}
\index{block-interleaved signal file}
There are at least three common ways of storing multiple signals: in
separate files, in multiplexed (sample-interleaved) files, and in
block-interleaved files. In a multiplexed file containing N signals,
each set of N consecutive samples contains one sample from each
signal. In a block-interleaved file containing N signals in blocks of
512 samples, for example, the first 512 samples come from the first
signal, the next 512 samples come from the second signal, and so on.
\WAVE{} supports reading multiple signals from separate files or from
multiplexed files (or both in the same recording), but it does not
directly support block-interleaved files in general.
\WAVE{} does support reading a special type of file containing signals
sampled at different sampling frequencies. Files of this type contain
``frames'' of samples. Each frame contains at least one sample of
each signal, but there may be two or more samples of signals sampled
at multiples of the frame rate within each frame.
Block-interleaved files may be described simply as files with very
large frames. If you have a block-interleaved file, therefore, you
may be able to view it with \WAVE{} via this expedient:
\begin{itemize}
\item
Write a header file describing the layout of the block-interleaved
signal file (see
\htmladdnormallink{{\tt header(5)}}{../wag/header-5.htm},
in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm},
for details). The sampling frequency in the
first line of the header should be given as the frame rate (i.e., the
basic sampling rate divided by the number of samples per block), and
the ``samples per frame'' field in each signal specification line
should be given as the number of samples per block.
\index{resolution!of multi-frequency records}
\index{high-resolution mode}
\item
\index{WFDB\_HIGHRES@{\tt WFDB\_HIGHRES}}
Open the record in ``high-resolution'' mode with \WAVE{} (see
\hyperref{``What is high-resolution mode?''}
{section~}
{, page~\pageref{faq:high-res}}
{faq:high-res}).
\end{itemize}
\index{resolution!of time in annotation files}
\index{format!of signal files!changing}
One significant limitation of this approach is that the time
resolution of any annotation files created in this way is limited to
the frame interval. You can avoid this limitation by reformatting the
signal file (for example, by following the steps above to verify that
the signal file is properly readable, then using {\tt xform} with its
\index{xform command@{\tt xform} command}
own {\tt -H} option; see
\htmladdnormallink{{\tt xform(1)}}{../wag/xform-1.htm}
in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm}.
\index{embedded header data in signal files}
\index{preamble in signal files}
\index{signal file!preamble in}
A common feature of many signal file formats is \emph{embedded header
data}: bytes at the beginning of the signal file that do not contain
digitized samples. By specifying the length of the embedded header
data as the byte offset for the sample data in the (external) header
file, such formats can be easily accommodated; \WAVE{} and any other
applications built using the WFDB library simply ignore any preamble.
If the signal file format is documented, it is usually not difficult to
write a program to generate a header file based on embedded header
data. See
\htmladdnormallink{{\tt header(5)}}{../wag/header-5.htm}, in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm},
for details on byte offsets.
\WAVE{} does not support directly reading signals stored in text files, because
there is no general method for computing the position within such files of
samples occuring at arbitrarily-chosen times. It is usually simple to convert
such text files into \WAVE{}-compatible binary files using
\htmladdnormallink{{\tt wrsamp}}{../wag/wrsamp-1.htm},
\index{wrsamp command@{\tt wrsamp} command}
an application supplied with \WAVE{}.
For the same reason, \WAVE{} does not support directly reading signals stored
using variable-length encoding or non-uniform sampling intervals. If a
decompression utility is available, convert the data to fixed-length, uniform
samples.
\WAVE{} does not support any non-integer storage formats either, mainly because
such formats are not commonly used for digitized data.
If you have signals in an unsupported format, you have two choices if you wish
to analyze them using \WAVE{}:
\begin{itemize}
\index{format!of signal files!changing}
\item
Write a utility to convert your data to a supported format. This is usually
easy to do -- use `{\tt wrsamp.c}' (the source for {\tt wrsamp}, provided with
\WAVE{}) as a model.
\item
Add support for your format to the WFDB library, and recompile the shared WFDB
library. Once the new library is installed, \WAVE{} and the other WFDB
applications will be able to use your format without recompilation.
If you have a large amount of data, this may be the only reasonable choice.
It may not be much more difficult than writing a conversion utility,
provided that your format permits computing file position as a function of
time. See the appendix titled `{\sf Extensions}' in the
\htmladdnormallink{{\it WFDB Programmer's Guide}}{../wpg/wpg.htm}
for hints on how to proceed.
\end{itemize}
\index{EDF (European Data Format)}
For example, \WAVE{} does not support directly reading EDF, the
European Data Format first used for recordings of
polysomnograms. (This is \emph{not} the format used for either the
European ST-T Database or the MIT-BIH Polysomnographic Database, both
of which can be read directly by \WAVE{}.) EDF uses block
interleaving, and also includes an embedded header. Although the
method outlined above for reading block-interleaved files can
be used to read EDF files, a difficulty in doing so is that the block
size is specified within the embedded header, and may vary between
records. Moreover, since typical block sizes are quite large, the
time resolution of annotations in this case is very coarse. A format
converter for EDF files,
\htmladdnormallink{{\tt edf2mit}}{http://physionet.org/}, may be
used to rewrite such files in a format that \WAVE{} can read without
these limitations. This converter also constructs a
suitable header file from the embedded header in the EDF file.
All currently supported signal formats use 16 bits per sample or less.
In principle, formats requiring up to 32 bits per sample should pose
no problem in environments that support \WAVE{}, but formats requiring
more than 16 bits may be difficult to support in other environments.
\subsection{What is ``high-resolution'' mode?}
\label{faq:high-res}
\index{high-resolution mode}
\index{resolution!of multi-frequency records}
Briefly, it is an alternative display mode for multi-frequency records
only. See the
\htmladdnormallink{{\it WFDB Programmer's Guide}}{../wpg/wpg.htm}
for details on multi-frequency records.
\index{H option for WAVE@{\tt -H} option for \WAVE{}}
\index{command-line options!{\tt -H}}\index{options!{\tt -H}}
The {\tt -H} option, introduced in \WAVE{} 6.0, selects
high-resolution mode. For ordinary records (those for which all
signals are sampled at the same frequency), high-resolution mode is
identical to standard mode.
\index{resolution!of display}
\index{oversampled signal}\index{signal!oversampled}
In a multi-frequency record, some signals are sampled at multiples of
the basic sampling rate. These are referred to as \emph{oversampled
signals}. In standard mode, \WAVE{} \emph{decimates} these signals
(i.e., \WAVE{} reduces their sampling rates to the basic sampling rate
by averaging successive samples) before displaying them. In
high-resolution mode, however, \WAVE{} displays each sample from any
oversampled signals if the screen resolution is high enough (note that
at standard display scales, it may be difficult to see the
difference). In this mode, \WAVE{} replicates additional copies of
each sample of any signals sampled at lower rates before displaying
them; in consequence, particularly at highly magnified display scales,
these signals may have a marked stairstep appearance.
\index{resolution!of time in annotation files}
Note that the time resolution for placement of annotations is the same
in high-resolution mode and in standard mode. Thus, for example, it
is not possible to place annotations on consecutive samples of an
oversampled signal, since the second annotation will replace the first
one. This is a limitation of the WFDB library, not of \WAVE{} itself,
and may be removed in a future release of the WFDB library.
\subsection{Can \WAVE{} open more than one record at once?}
\index{signal!window}
\index{r option for WAVE@{\tt -r} option for \WAVE{}}
\index{command-line options!{\tt -r}}\index{options!{\tt -r}}
Yes. All records should be listed in one command-line argument,
following the {\tt -r} argument on the command line; separate the
record names by `{\tt +}' characters. For example, the command
\begin{verbatim}
wave -r 237+237n &
\end{verbatim}
starts a \WAVE{} \emph{process group}, opening a separate \WAVE{} signal
window for each of record {\tt 237} and record {\tt 237n}. Each signal window
corresponds to a separate \WAVE{} process; thus you may browse through and
edit each record independently. The signal window assigned to the last record
in the group (in this case, {\tt 237n}) is the \emph{master signal window};
it contains a \button{Sync} button, which may be used to synchronize the other
signal windows with the master at any time. By synchronizing, we mean that the
other windows are redrawn as necessary so that the times shown in their lower
left corners match that shown in the master signal window.
It is also possible to synchronize by clicking on a point of interest in the
master signal window. To do this, press and hold \keycap{Ctrl} while clicking
with the middle mouse button. The master signal window will be unaffected,
but the other windows are redrawn so that they begin at the time corresponding
to the point of interest. This feature is particularly useful if you have
a derived record such as in the heart rate signal analysis example (see
section~\ref{sec:analysis-example}) open in the master signal window, and
the raw signals in another window; you can then click on a feature in the
derived signal and instantly see the corresponding raw signals.
Remote-control applications such as {\tt wavescript} and {\tt wave-remote} can
also start or control a \WAVE{} process group. All signal windows in the
group move synchronously in response to commands from {\tt wavescript} or
{\tt wave-remote}. You may change the record that is open in any signal
window, either via the {\sf Load} window or using a remote-control application.
You may quit from any signal window without affecting the others.
Note that there are a few important limitations:
\begin{itemize}
\item
The number of signal windows (\WAVE{} processes) in any process group cannot
be \emph{increased} once the process group has been created.
\item
Although you may run two or more \WAVE{} process groups simultaneously,
applications such as {\tt wavescript} can control only a single process group
at a time (by default, the last one started).
\item
Although you may have the same record open in more than one signal window, you
should not edit the same annotator of the record in more than one window at a
time (just as you should not edit the same text file in more than one editor
window at once). You may edit different annotators of the same record
freely.
\end{itemize}
Taken together, the first two of these points imply that if you decide after
opening a record that you would like to add another record to the group, it
will be necessary to exit and start again, naming all desired records in the
group on the \WAVE{} command line when you do so.
If you wish to move through two records sampled at the same sampling
frequency in lockstep (for example, to view digitally filtered signals
and the original unfiltered signals side-by-side), another approach is
to create a single header file that names the signal files for both
records. It is not necessary for all signals to be in the same signal
file, or even on the same disk drive.
\subsection{Can \WAVE{} open more than 32 signals in a window at once?}
Yes. There is no fixed limit on the number of signals that current versions
of \WAVE{} can open. Earlier versions were limited to 32 or fewer signals.
If the signal window gets to be too crowded, select a subset of
signals to be displayed by editing the signal list (in \WAVE{}'s {\sf
Analyze} window, and choose {\sf Draw: listed signals only} in the
{\sf View} window.
\subsection{Can \WAVE{} open more than one annotation file in a window at once?}
No. In most cases, however, it's not really necessary to do so.
\index{bxb command@{\tt bxb} command}
For example, if you want to compare two sets of annotations of the
same data in order to study their differences, use {\tt bxb} with the
`{\tt -o}' option to prepare a comparison annotation file, and then
use \WAVE{} to open that file. (See
\htmladdnormallink{{\tt bxb(1)}}{../wag/bxb-1.htm}, in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm},
for details.) If your goal is to
find discrepancies, this is by far the best way to do so; `{\tt bxb}'
produces a statistical summary of them, and you can search for {\sf
NOTE} annotations to find each disagreement (enter `{\tt "}' in the
\index{search}\index{annotation!searching for}
`{\sf Search for}' field of \WAVE{}'s {\sf Find} window).
If you want to annotate multiple signals independently (for example, ECG and
respiration), choose `{\sf attached to signals}' from the \amenubutton{Show
annotations:} menu in \WAVE{}'s {\sf View} window. See
\hyperref{Multi-edit mode}
{section~}
{, page~\pageref{sec:multi-edit},}
{sec:multi-edit}
for details.
\index{mrgann command@{\tt mrgann} command}
If you already have multiple independent annotation files for a single record
(whether these contain annotations for independent signals or annotations
for disjoint segments of the record), you can use {\tt mrgann} to merge them
into a single file, preserving information about which file each annotation
came from if you wish (see
\htmladdnormallink{{\tt mrgann}}{../wag/mrgann-1.htm}, in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm},
for details).
\index{wfdbcollate command@{\tt wfdbcollate} command}
\htmladdnormallink{{\tt wfdbcollate}}{../wag/wfdbco-1.htm}
can also be used for this purpose if you have separate
annotation files for each segment of a multi-segment record.
\subsection{Can \WAVE{} do smooth scrolling?}
No.
\subsection{Can \WAVE{} be used for real-time display of data being acquired?}
Not easily. If you have a UNIX application that can write data in a
format readable by \WAVE{}, it should be possible in principle to run it
from \WAVE{}'s {\sf Analyze} window, and to use \WAVE{} to review the data
being acquired, using the \button{Reload} button in \WAVE{}'s {\sf
Analyze} window to read additional samples as they become available.
(\WAVE{} will not attempt to read beyond what it thinks is the end of the
record; if it ever catches up with the digitizing process, therefore,
\WAVE{} can only be forced to read further by using \button{Reload},
or by closing and reopening the record.)
\subsection{Can \WAVE{} scroll through a record without user intervention?}
\label{sec:autoscroll}
Yes. Create a log file that contains entries spaced at the desired
intervals throughout the record. A suitable interval might be 10
seconds if that is the width of the signal window. Open the {\sf Log}
window, load the log file, and click on \button{\tt >>} to start the
scrolling. Adjust the delay between frames using the slider on the
{\sf Log} window.
\index{Scope window@{\sf Scope} window}
Another way to review a record is via the scope window (accessible by
clicking on \button{Show scope window} in \WAVE{}'s {\sf Analyze}
window). Note that the scope display, since it is triggered by
annotations, is of no use in detecting erroneously unannotated
waveforms (false negatives), since such waveforms are simply not
displayed in the scope window. The scope is useful for studying
morphologic variation of waveforms, and for locating erroneously
annotated waveforms (false positives).
\subsection{How can I use \WAVE{}'s menu variables in a script or other program?}
See \WAVE{}'s default menu file for examples of passing \WAVE{}'s menu
variables as command-line arguments to other programs.
\index{menu variables}
Click on \button{Export variables} in \WAVE{}'s {\sf Analyze} window if you
need to use these variables within a shell script. (If you are not using {\tt
bash}, {\tt ksh}, or {\tt sh}, edit the \WAVE{} menu file first to select the
alternate definition of this action.) Once the variables have been exported,
they may be used in the same way as any other environment variables within your
shell scripts. For example, the time of the left edge of the signal window is
{\tt \$LEFT}. Within a C program, read the values of these variables using
{\tt getenv}; for example, {\tt getenv("LEFT")} returns the (string) value of
the time of the left edge of the signal window. Note that the exported values
are only a snapshot of the variables at the time you click on \button{Export
variables}; the values do not track later actions performed within \WAVE{}.
\subsection{Is there a Motif version of \WAVE{}?}
No. (Rant begins here.) When I designed \WAVE{}, I attempted to use
Motif, but switched to XView when it became clear that much of the
documented functionality of the Motif toolkit (at the time, version
0.9) was unimplemented or unusable. It also seemed unlikely that
anyone would prefer Motif's buggy, ugly, proprietary, bloated, kludgy
procedural interface over XView's buggy, attractive, non-proprietary,
streamlined, elegant object-oriented interface (end of rant).
\index{Open Look}
Motif and its lookalikes (notably GTK+, Qt, and LessTif) have clearly become
the standard, however, and a consequence of this is that the Open Look user
interface presented by \WAVE{} is unfamiliar to many users. Until recently,
there has been a scarcity of introductory material for Open Look in
print (but O'Reilly's Open Books Project
(\htmladdnormallink{http://www\-.oreilly\-.com/open\-book/open\-look/}
{http://www.oreilly.com/openbook/openlook/}) now provides free
on-line copies of three relevant books (a user's guide and two
programmer's guides). Unfortunately, the
Motif API, and those of its lookalikes, are vastly different from the XView API
with which \WAVE{} is written, and a port to Motif would be decidedly
non-trivial.
\subsection{How can I find out about ...?}
There are several sources of information about \WAVE{}:
\begin{itemize}
\index{PostScript}
\item
If you have not used \WAVE{} before, start by reading the \WAVE{} ~{\it User's
Guide} (this book) and working through the tutorial examples it contains.
If you need to use existing WFDB applications under \WAVE{}'s control, refer to
the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm}.
If you need to develop your own applications for use with \WAVE{}, read the
\htmladdnormallink{{\it WFDB Programmer's Guide}}{../wpg/wpg.htm}.
You may read these guides on-line on-line or print your own copies (visit
\htmladdnormallink{PhysioNet}{http://physionet.org/}).
\index{on-line help}\index{help}\index{Mozilla}\index{web browser}
\item
The on-line version of the \WAVE{} ~{\it User's Guide} can be opened for
browsing by clicking left on
\button{User's Guide} in \WAVE{}'s {\sf Help Topics} window (this
requires \WAVE{} 6.0 or later, and Mozilla (or another browser, if named by
the {\tt URLV} environment variable) on the
\WAVE{} host). This guide
may also be read with any Web browser independently of \WAVE{}
(point your browser to
\htmladdnormallink{{\tt file:///usr/help/html/wug/wug.htm}}
{file:///usr/help/html/wug/wug.htm}
if you have installed \WAVE{} 6.0
or later on your system, or to
\htmladdnormallink
{{\tt http://physio\-net.\-org\-/physiotools\-/wug/}}
{http://physionet.org/physiotools/wug/}
otherwise).
\item
Use XView
\index{XView}
spot help for brief descriptions of \WAVE{}'s controls and other
graphic elements. Point to any control and press the \keycap{Help} key (see
\hyperref{``How do I get spot help ...?''}
{``How do I get spot help ...?'', section~}
{, page~\pageref{faq:no-help-key},}
{faq:no-help-key}
if you don't have a \keycap{Help} key).
\item
Use \WAVE{}'s task-oriented on-line help to learn how to use \WAVE{}
as a tool for interactive data analysis, control of external programs,
annotation editing, and other topics. Click left on \button{Help} in
\WAVE{}'s main control panel to open the {\sf Help} window, containing
buttons for each topic. Click left on any of these buttons to open a
help window for the associated topic. Within the help window, use the
scroll bar to move through the topic, or click on \button{Print}
button to obtain a printed copy of the entire topic.
\item
Select `{\sf About WAVE...}' from the \menubutton{Properties} menu, or
\button{What's new} from the {\sf Help} window, for a summary of new
features in \WAVE{}, a current list of known bugs, and instructions for
printing a copy of the on-line manual, which includes the text of all
of the other help topics. Click on \button{Print} to obtain a printed
copy of the `{\sf What's new}' topic.
\item
The {\tt man} page for \WAVE{}
(\htmladdnormallink{{\tt wave(1)}}{../wag/wave-1.htm})
contains a concise description of its
command-line options, the environment variables and X resources it
uses, and the \WAVE{} menu file. (This information is also included
in this Guide; the {\tt man} page is intended as a compact reference.
The {\tt man} page for \WAVE{} can
be found in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm},
or on-line by typing `{\tt man wave}', or by using {\tt xman} or {\tt
tkman}, etc.)
\item
For additional information on the \WAVE{} menu file, see the comments
in the default menu file distributed with \WAVE{} and usually installed as
`{\tt /usr/lib/wavemenu.def}'.
\item
For information about the data formats supported by \WAVE{} and the other WFDB
applications, see
\htmladdnormallink{{\tt annot(5)}}{../wag/annot-5.htm},
\htmladdnormallink{{\tt header(5)}}{../wag/header-5.htm},
\htmladdnormallink{{\tt signal(5)}}{../wag/signal-5.htm}, and
\htmladdnormallink{{\tt wfdbcal(5)}}{../wag/wfdbca-5.htm},
in the
\htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm}.
\end{itemize}
\chapter{Command-line Options}
\index{starting WAVE@starting \WAVE{}}\index{wave command@{\tt wave} command}
To start \WAVE{}, open a terminal window and type into it:
{\tt wave -r} \textit{record options \ldots}
\noindent
In most cases, \textit{record} is a single record name; you may, however,
name several records to be opened by concatenating their names with {\tt +}
between them, as in `{tt wave -r 100+101+102 -a atr}', which opens records
{\tt 100}, {\tt 101}, and {\tt 102}, each in its own signal window. Note
that there must be no spaces around the `+' characters (the list of records
should appear as a single command-line argument without embedded spaces).
If the {\tt -r} \textit{record} arguments are omitted, \WAVE{} simply
prints a summary of its command-line syntax in the terminal window.
The \textit{options} may include any of these, in any order:
\begin{description}
\item[{\tt -a} {\it annotator}]
Open the specified annotation file for \textit{record}. If this file
does not exist, it will be created once you insert an annotation.
\index{resolution!of display}
\item[{\tt -dpi} {\it xx}\textrm{{[}{\tt x}}{\it yy}\textrm{]}]
Calibrate \WAVE{} for use with a display having a resolution of
\textit{xx} (by \textit{yy}) dots per inch.
\item[{\tt -f} {\it time}]
Open the record beginning at the specified \textit{time}.
\item[{\tt -g}]
Use shades of grey only, even on a color monitor.
\index{resolution!of multi-frequency records}
\item[{\tt -H}]
Operate in ``high-resolution'' mode when reading multi-frequency
records.
\item[{\tt -m}]
Use monochrome (usually black and white) only, even on a color or
greyscale monitor. The line styles selected by the {\tt -m} option
may be easier to distinguish on some greyscale monitors than the
default shades of grey.
\item[{\tt -O}]
Use overlay graphics for maximum speed and display quality if
possible. This is the usual default if the X server supports a
PseudoColor or GrayScale visual. This option exists only to force use
of overlay graphics if a different mode has been chosen as the
default.
\item[{\tt -s} {\it signal} \textrm{[} {\it signal \ldots} \textrm{]}]
Initialize the signal list. By default, the signal list includes all
available signals, in numerical order.
\item[{\tt -S}]
Use the standard (shared) color map, even if is possible to modify the
color map. Using this option conserves color resources if you have
other applications that use non-standard colors, at a small (possibly
unnoticeable) expense of some speed in redrawing the display. The
{\tt -S} option may be used in combination with the {\tt -g}
option if desired.
\end{description}
The following group of options can be used to enable the optional display
elements normallly chosen in the {\sf View} window.
\begin{description}
\item[{\tt -Vs}]
Display annotation {\tt subtyp} fields.
\item[{\tt -Vc}]
Display annotation {\tt chan} fields.
\item[{\tt -Vn}]
Display annotation {\tt num} fields.
\item[{\tt -Va}]
Display annotation {\tt aux} fields. (This is the default for
annotations such as rhythm changes and comments; selecting this
option causes {\tt aux} fields to be displayed for all annotations,
and also causes the annotation mnemonics to be displayed for rhythm
changes, comments, etc.)
\item[{\tt -Vm}]
Display annotation marker bars.
\item[{\tt -VN}]
Display signal names along the left edge of the signal window.
\item[{\tt -Vb}]
Display baselines for any DC-coupled signals, and label the zero
levels and the units along the right edge of the signal window.
\item[{\tt -Vl}]
While the pointer is in the signal window and any mouse button is
depressed, track the intersections of the marker bar with the signals
and draw horizontal marker bars across the signal window at the levels
of these intersections.
\end{description}
The final group of options allows you to select the initial choices
from the menu buttons in the {\sf View} window. Each of these options
should be followed by a numeric argument that matches the
\emph{position} of the desired choice in the menu, where the top item
on each menu is in position 0, the one below it is in position 1, etc.
\index{amplitude scale}\index{scales!amplitude}
For example, to set the initial amplitude scale to 5 mm/mV (the item
at position 2 in the {\sf Amplitude scale} menu), add {\tt -Vv 2} to
the command line.
\begin{description}
\index{time scale}\index{scales!time}
\item[{\tt -Vt} {\it n}]
Set the time scale (0: 0.25 mm/hour, 1: 1 mm/hour, 2: 5 mm/hour, 3:
0.25 mm/min, 4: 1 mm/min, 5: 5 mm/min, 6: 25 mm/min, 7: 50 mm/min, 8:
125 mm/min, 9: 250 mm/min, 10: 500 mm/min, 11: 12.5 mm/sec, 12: 25
mm/sec (default), 13: 50 mm/sec, 14: 125 mm/sec, 15: 250 mm/sec, 16:
500 mm/sec, 17: 1000 mm/sec, 18: 2000 mm/sec, 19: 5000 mm/sec, 20: 10
mm/ms, 21: 20 mm/ms, 22: 50 mm/ms, 23: 100 mm/ms, 24: 200 mm/ms, 25:
500 mm/ms).
\index{amplitude scale}\index{scales!amplitude}
\item[{\tt -Vv} {\it n}]
Set the amplitude scale (0: 1 mm/mV, 1: 2.5 mm/mV, 2: 5 mm/mV, 3: 10
mm/mV (default), 4: 20 mm/mV, 5: 40 mm/mV, 6: 100 mm/mV).
\item[{\tt -VS} {\it n}]
Set the choice on the {\sf Draw} menu (0: all signals (default), 1: listed
signals only).
\item[{\tt -VA} {\it n}]
Set the choice on the {\sf Show annotations} menu (0: centered (default), 1:
attached to signals, 2: as a signal).
\item[{\tt -VT} {\it n}]
\index{absolute time}
\index{elapsed time}
\index{time!display mode}
Set the choice on the {\sf Time display} menu (0: elapsed (default), 1:
absolute, 2: in sample intervals).
\item[{\tt -VG} {\it n}]
Set the choice on the {\sf Grid} menu (0: none, 1: 0.2 s, 2: 0.5 mV,
3: 0.2 s x 0.5 mV, 4: 0.04 s x 0.1 mV).
\end{description}
\WAVE{} also accepts generic XView options, including the {\tt -default}
and {\tt -xrm} options for setting
\hyperref{X11 resources}
{X11 resources (see section~}
{, page~\pageref{sec:resources})}
{sec:resources}.
\section{Running two or more \WAVE{} processes}
By specifying two or more record names, separated by `{\tt +}'
characters, in the command-line argument that follows `{\tt -r}' (see
above), you may open separate \WAVE{} signal windows (processes) for each
record. These processes are almost completely independent: from any
signal window, you may navigate within the record, change display
settings, edit annotations, run external analysis programs, quit the
process, etc., without affecting any other signal windows.
For example, you may open two signal windows for the same record by:
\begin{verbatim}
wave -r 100+100 -a atr
\end{verbatim}
You can now move about the record freely in either window. This facility
makes it easy to compare different segments of the record.
Note that whenever two or more windows are displaying the same set of
annotations, as in this case, only one should be editing the
annotations at any given time.
The window associated with the \emph{last} record named on the command
line has a special status: it is designated the master signal window,
and a \button{Sync} button appears at the top of this
window. Clicking on \button{Sync} causes all of the other signal
windows to be redrawn so that the times shown in their lower left
corners match that in the master signal window. (Note, however, that
if you have quit a signal window from the middle of the list, any
signal windows from earlier in the list will no longer respond to sync
requests.)
By default, all command-line arguments apply to all signal windows.
You may specify an argument that is to apply to only one signal
window, however, by prefixing the argument with `{\tt +}{\it n}{\tt /}', where
{\it n} is the \emph{signal window number}. (The first signal window,
corresponding to the first record named on the command line, is signal
window number 0; the next is number 1, etc.)
This facility has many applications. For example, you may wish to open two
copies of the same record, with two different annotators:
\begin{verbatim}
wave -r 100+100 -a +0/atr +1/qrs
\end{verbatim}
In this case, record {\tt 100} is opened in two windows, with annotator
{\tt atr} in window 0 and annotator {\tt qrs} in window 1. (The
`{\tt -a}' option applies to both windows since it does not have a
`{\tt +}{\it n}{\tt /}' prefix.)
As another example, you may wish to discuss a record with colleagues
at other locations:
\begin{verbatim}
wave -r 200+200+200 -a qrs +0/-display +0/atlantic.bigu.edu:0 \
+1/-display +1/pacific.widget.com:0
\end{verbatim}
Here, record {\tt 200} is opened in three windows. Window 0 is opened on
display 0 of {\tt atlantic.bigu.edu}, window 1 on display 0 of
{\tt pacific.widget.com}, and window 3 (the master window) on the local
display. (For this to work, your colleagues must first allow your
computer to open windows on their displays, typically using
{\tt xhost}. See
\htmladdnormallink{{\tt xview(7)}}{../wag/xview-7.htm}
for information about the {\tt -display} option. Notice that the
`{\tt +}{\it n}{\tt /}' prefix must be attached to
both the {\tt -display} option and to its argument in order to
apply both of these arguments to the same signal window.)
Your colleagues can freely move about the record, but you can direct
the discussion at any time by using the \button{Sync} button in your signal
window. In a case such as this one, anyone can enable editing; you
should do so only after making sure that no one else has. Once you
have saved your work (by selecting {\sf Save} from the {\sf File} menu), your
changes become visible to your colleagues if they reload the
annotations (by clicking on {\sf Reload} from the {\sf Load} window).
As a final example, the MIMIC Database includes both high-resolution
waveform records and medium-resolution (roughly 1 sample per second)
computed measurement records. You may view both of these at the same
time using a command such as:
\begin{verbatim}
wave -r 237+237n -a all
\end{verbatim}
Typically, you will wish to view the high-resolution and low-resolution
data at different time scales. Although \WAVE{} attempts to choose
reasonable defaults, you can adjust the scales independently if you wish:
\begin{verbatim}
wave -r 237+237n -a all +1/-Vt +1/2
\end{verbatim}
If you use {\tt wavescript} or {\tt wave-remote} to control the master
signal window (this happens by default unless you use the {\tt -pid} option
of these programs to control a different signal window), the other signal
windows are kept synchronized with the master window.
Note that you cannot \emph{increase} the number of signal windows in a group
once you have started a \WAVE{} process group, although you can run more
than one process group at a time if you wish.
\chapter{Menu Variables}
\label{ch:menu-variables}
In \WAVE{}'s menu file, the variables listed below are interpreted by
\WAVE{} before they are passed to the shell, typically as command-line
arguments in button-action commands.
\index{record!name}
\index{annotator name}
\index{time scale}\index{scales!time}
\index{amplitude scale}\index{scales!amplitude}
\vspace{.5cm}
\begin{tabular*}{\textwidth}{l p{3.5 in}}
{\tt \$RECORD} & { the current record name } \\
{\tt \$ANNOTATOR} & { the current input annotator name } \\
{\tt \$START} &
{ the current {\sf Start (elapsed)} time as shown in the {\sf Analyze} window
(the time of the `{\tt <}' marker, if any) } \\
{\tt \$END} &
{ the current {\sf End (elapsed)} time as shown in the {\sf Analyze}
window (the time of the `{\tt >}' marker, if any) } \\
{\tt \$DURATION} &
{ the time interval between {\tt \$END} and {\tt \$START} } \\
{\tt \$LEFT} & { the time of the left edge of the signal window } \\
{\tt \$RIGHT} & { the time of the right edge of the signal window } \\
{\tt \$WIDTH} & { the time interval between {\tt \$RIGHT} and {\tt
\$LEFT} } \\
{\tt \$SIGNAL} & { the number of the selected signal } \\
{\tt \$SIGNALS} & { the signal list } \\
{\tt \$LOG} & { the name of the current log file } \\
{\tt \$WFDB} & { the WFDB path (from the {\sf Load} window) } \\
{\tt \$WFDBCAL} &
{ the WFDB calibration file (from the {\sf Load} window) } \\
{\tt \$TSCALE} & { the time scale, in mm/sec } \\
{\tt \$VSCALE} & { the amplitude scale, in mm/mV } \\
{\tt \$DISPMODE} &
{ the annotation display mode (0: annotations displayed in center,
no marker bars; 1: annotations displayed in center, long marker bars;
2: annotations attached to signals, no bars; 3: annotations attached
to signals, short bars; 4: annotations displayed as a signal, no bars;
5: annotations displayed as a signal, long bars) } \\
\end{tabular*}
\begin{tabular*}{\textwidth}{l p{3.5 in}}
{\tt \$PSPRINT} &
{ the command for printing PostScript data from the standard input,
as specified in the {\sf Print setup} window } \\
{\tt \$TEXTPRINT} &
{ the command for printing text from the standard input,
as specified in the {\sf Print setup} window } \\
{\tt \$URL} &
{ the URL specified by the most recently selected link }
\end{tabular*}
\vspace{.5cm}
Other strings that begin with `{\tt \$}' are passed to the shell unchanged.
\chapter{Keyboard Command and Mouse Action Summary}
\section{General rules for all Open Look applications}
\index{Open Look}
The basic rules for using a mouse in an Open Look application such as \WAVE{}
are:
\begin{itemize}
\index{mouse!right button!uses for}
\item
\emph{To open menus (always identified by a $\nabla$ at the right end of the
control), click right.}
\index{mouse!left button!uses for}
\item
\emph{To use any other control, click left.}
\end{itemize}
Notice boxes and some other windows have \emph{default buttons}, identified
by a double oval outline. If the pointer is anywhere in the window, you can
press \keycap{Enter} (\keycap{Return}) instead of clicking left on the default
button if you wish.
To type into a text field, move the mouse pointer near the insertion point and
click left. The text cursor should appear nearby; if it is a black triangle,
you may begin typing. Use \keycap{BackSpace} or \keycap{Delete} to erase the
character to the left of the text cursor. To move the cursor within the field
use the arrow keys (\keycap{$\leftarrow$}, \keycap{$\rightarrow$}), or use
{\tt emacs}-style commands:
\begin{description}
\item[\keycap{Ctrl}+\keycap{A}]
move to the beginning
\item[\keycap{Ctrl}+\keycap{E}]
move to the end
\item[\keycap{Ctrl}+\keycap{F}]
move forward one character
\item[\keycap{Ctrl}+\keycap{B}]
move backward one character
\end{description}
Until you press \keycap{Return} (or \keycap{Enter}), your typing is not
interpreted.
Unless spot help is disabled, you can get help on any control by pointing to
it and pressing \keycap{Help} (or \keycap{F1} if you don't have a \keycap{Help}
key). To enable spot help, see
\hyperref{``How do I get spot help ...?''}
{``How do I get spot help ...?'', section~}
{, page~\pageref{faq:no-help-key},}
{faq:no-help-key}.
\section{Using the keyboard and mouse in the signal window}
In this section, wherever two keyboard actions are specified, the
first should work on any keyboard, but the second may be usable on Sun
type 4 keyboards only.
Mouse actions in the signal window are generally related to
selecting and editing annotations. If annotation editing is disabled,
actions that would otherwise modify the annotation file are
disallowed.
\subsection*{Simple mouse actions}
These actions are used to select, insert, change, and move annotations.
\begin{description}
\index{mouse!left button!uses for}
\item[left mouse button click]
If the {\sf Annotation Template} is visible or iconified, select the
annotation to the left of the pointer (if this annotation is not in
the signal window, recenter the signal window on it). Otherwise,
display the {\sf Annotation Template}.
\index{mouse!middle button!uses for}
\item[middle mouse button click]
Insert an annotation at the location indicated by the pointer, with fields as
specified in the {\sf Annotation Template}. If the pointer is within
the selection rectangle, the selected annotation is replaced by the
inserted one; in this case, if the {\sf Type} is `{\tt .}' (deleted
annotation), the selected annotation is marked for deletion. An
annotation so marked can be restored by deleting it again.
\index{mouse!right button!uses for}
\item[right mouse button click]
Select the annotation to the right of the pointer (if this annotation
is not in the signal window, recenter the signal window on it).
\end{description}
If the pointer is moved during any of the simple mouse actions above, the
selected annotation (if any) is \emph{dragged} along with the pointer.
When the button is released, the selected annotation is \emph{dropped}
at the new location.
\index{marker!editing}
Even if editing is disabled, you may insert, delete, or move `{\tt
:}', `{\tt <}', and `{\tt >}' markers using these mouse actions (or
their keyboard equivalents, below) if you first set the {\sf Type}
field of the {\sf Annotation Template} to the desired marker type.
If you prefer not to have the {\sf Annotation Template} visible while
editing, you can iconify it so that it will not continually pop up
whenever you click left.
\subsection*{Keyboard equivalents for simple mouse actions}
\index{mouse!keyboard equivalents}
These actions can be used on any system. If you have a one- or
two-button mouse, your X server should provide other methods for
simulating middle and right button clicks; see the documentation for
your X server for details.
\begin{description}
\item[\keycap{$\leftarrow$}]
Simulate a left mouse button click.
\item[\keycap{F2} (or \keycap{5} on the numeric keypad)]
Simulate a middle mouse button click.
\item[\keycap{$\rightarrow$}]
Simulate a right mouse button click.
\end{description}
To move the pointer left or right, use \keycap{F3} and \keycap{F4} (or
\keycap{=} and \keycap{*} on the numeric keypad). To simulate a
dragging action, press and hold \keycap{$\leftarrow$}, \keycap{F2}, or
\keycap{$\rightarrow$}, use \keycap{F3} or \keycap{F4} to move
the pointer to the desired location, then drop the selected annotation by
releasing all keys.
\subsection*{Mouse and keyboard combination actions}
These actions are used to select signals.
To perform these actions, press and hold the designated key,
perform the mouse action, then release the key.
\index{signal!selecting}
\begin{description}
\item[\keycap{Shift}+left mouse button]
Select the signal nearest the pointer (the selected signal is
highlighted, and its signal number is entered into the {\sf Signal}
field in the {\sf Analyze} window). This action can also be performed
using \keycap{Shift}+\keycap{$\leftarrow$}.
\item[\keycap{Ctrl}+left mouse button]
Select the signal nearest the pointer as above, and also enter it into
the {\sf Signal list} field in the {\sf Analyze} window. This action
can also be performed using \keycap{Shift}+\keycap{$\leftarrow$}.
\index{Meta key@{\sf Meta} key}
\item[\keycap{Meta}+left mouse button]
Select the signal nearest the pointer as above, but \emph{delete} it
from the {\sf Signal list}. (There is no keyboard-only equivalent.)
\end{description}
(Most keyboards do not have a key labelled {\sf Meta}. On most Sun
keyboards, the {\sf Meta} keys look like this: \keycap{$\Diamond$};
they flank the space bar. On most other keyboards, the \keycap{Alt}
key is equivalent to {\sf Meta}.)
\subsection*{Other keyboard actions}
These actions are used for annotation editing and navigation through
the record.
\begin{description}
\item[\keycap{$\uparrow$}]
(In multi-edit mode only, and only if an annotation is attached.) Move
the selected annotation to the next emph{lower} signal number. If
another annotation is at that location, however, select that
annotation instead. If (within the {\sf View} window) you have chosen
to draw all signals, this corresponds to moving the selection up one
signal on the display. If you have chosen to draw listed signals
only, the order of signals in the signal list determines where the
annotation moves on the display.
\item[\keycap{Ctrl}+\keycap{$\uparrow$}]
As for \keycap{$\uparrow$} alone, except that the selected annotation
is copied rather than moved.
\item[\keycap{$\downarrow$}]
As for \keycap{$\uparrow$}, except that the selected annotation
is moved to the next \emph{higher} signal number (i.e., down one
signal on the display if all signals are drawn).
\item[\keycap{Ctrl}+\keycap{$\downarrow$}]
As for \keycap{$\downarrow$} alone, except that the selected annotation
is copied rather than moved.
\item[\keycap{F6} (or \keycap{Copy})]
Copy the selected annotation into the {\sf Annotation Template}.
\item[\keycap{F9} (or \keycap{Find})]
\index{search}\index{annotation!searching for}
Search forward (as for \button{Search {\tt >}}).
\item[\keycap{Ctrl}+\keycap{F9} (or \keycap{Ctrl}+\keycap{Find})]
Search backward (as for \button{{\tt <} Search}).
\item[\keycap{Shift}+\keycap{F9} (or \keycap{End})]
Move to the end of the record.
\item[\keycap{Ctrl}+\keycap{Shift}+\keycap{F9} (or \keycap{Home})]
Move to the beginning of the record.
\item[\keycap{F10} (or \keycap{PgDn})]
Move forward half a screen (as for \button{\tt >}).
\item[\keycap{Shift}+\keycap{F10} (or \keycap{PgUp})]
Move backward half a screen (as for \button{\tt <}).
\item[\keycap{Ctrl}+\keycap{F10} (or \keycap{Ctrl}+\keycap{PgDn})]
Move forward a full screen (as for \button{\tt >>}).
\item[\keycap{Ctrl}+\keycap{Shift}+\keycap{F10} (or
\keycap{Ctrl}+\keycap{PgUp})]
Move backward a full screen (as for \button{\tt <<}).
\item[\keycap{Enter} (or \keycap{Return})]
\index{link annotation}\index{annotation!link}
(Only if a link annotation has been selected.)
Show the external data specified by the link using a web browser;
start the web browser first if necessary.
\end{description}
Commands in the next group are used to change the display scales. If
a signal is selected, amplitude changes apply to the selected signal
{\em only}. If shown, the grid reflects the scale of signal 0 (the
top signal).
\index{zoom}
\index{enlarging signals}
\index{signal!enlarging}
\index{reducing size of signals}
\index{changing scales}
\index{scales!changing}
\index{rescaling}
\index{time!compressing and expanding}
\begin{description}
\item[\keycap{Ctrl}+\keycap{(}]
zoom in (show more detail by expanding the time axis)
\item[\keycap{Ctrl}+\keycap{)}]
zoom out (show more context by compressing the time axis)
\item[\keycap{Ctrl}+\keycap{+}]
increase the amplitude of the signal(s)
\item[\keycap{Ctrl}+\keycap{-}]
decrease the amplitude of the signal(s)
\index{inverting signals}\index{signal!inverting}
\item[\keycap{Ctrl}+\keycap{*}]
invert the signal(s)
\item[\keycap{Ctrl}+\keycap{=}]
restore the scales selected on the {\sf View} panel
\end{description}
Typing an annotation or marker mnemonic sets the {\sf Type} field of
the {\sf Annotation Template} (even if the {\sf Annotation Template}
is not visible, and even if editing is disabled). These mnemonics are
shown on the
\hyperref{{\sf Type} menu}
{{\sf Type} menu (see figure~}
{, page~\pageref{fig:type-menu})}
{fig:type-menu}.
\newpage
\addcontentsline{toc}{chapter}{Index}
\printindex
\end{document}