\" file: appguide.int		G. Moody	July 1989
\"				Last revised:  1 June 2002
\" Table of contents and introduction to the WFDB Applications Guide.
\"
\" To print this document using GNU groff, use:
\"     tbl appguide.int | groff -mgs
\" To print this using standard UNIX troff and Adobe TranScript software, use:
\"     tbl appguide.int | ptroff -ms
\"
\" Note that the table of contents must be updated manually if material is
\" added to or removed from the Guide.  The page numbers were checked against
\" groff output of the remainder of the Guide;  if you format your Guide using
\" another version of troff, your page numbers may differ.
\"
\" See the Makefile in this directory for details.
\"
.af PN i
.bp 2
.bp 3
.ce 999
.ps 16
\fBTable of Contents\fP
.ce 0
.ps 10
.vs 12
.TS
center;
l l r.

\fBIntroduction\fP		v

\fBSection 1: Applications\fP
a2m, ad2m, m2a, md2a	utilities for converting between MIT and AHA DB formats	1
ann2rr, rr2aaann	convert annotation files to interval lists and vice versa	4
bxb	ANSI/AAMI-standard beat-by-beat annotation comparator	6
calsig	calibrate signals of a DB record	8
coherence	estimate coherence and cross-spectrum of two time series	10
dfa	detrended fluctuation analysis	11
ecgeval	generate and run ECG analyzer evaluation script	12
epic	ANSI/AAMI-standard episode-by-episode annotation comparator	13
fft	fast Fourier transform	15
fir	general-purpose FIR filter for WFDB records	17
hrfft, hrlomb, hrmem, hrplot	calculate and plot heart rate power spectra	19
ihr	calculate instantaneous heart rate	21
log10	calculate common logarithms of two-column data	23
lomb	estimate power spectrum using the Lomb periodogram method	24
memse	estimate power spectrum using maximum entropy (all poles) method	25
mfilt	general-purpose median filter for WFDB records	27
mrgann	merge annotation files	28
mxm	ANSI/AAMI-standard measurement-by-measurement comparator	30
nst	noise stress test for ECG analysis programs	32
plot2d, plot3d	make 2-D or 3-D plots from text files of data, using \fIgnuplot\fR	35
plotstm	produce scatter plot of ST measurement errors on a PostScript device	37
plt	make 2-D plots	38
pschart	produce annotated `chart recordings' on a PostScript device	43
psfd	produce annotated `full-disclosure' plots on a PostScript device	47
rdann	read a WFDB annotation file	51
rdsamp	read WFDB signal files	53
rxr	ANSI/AAMI-standard run-by-run annotation comparator	54
sampfreq	show sampling frequency for a record	56
sample	digitize and replay analog signals (MS-DOS only)	57
setwfdb, cshsetwfdb	set WFDB environment variables	61
sigamp	measure signal amplitudes of a WFDB record	63
skewedit	edit skew fields of header file(s)	64
snip	copy an excerpt of a WFDB record	65
sortann	rearrange annotations in canonical order	66
sqrs, sqrs125	single-channel QRS detector	68
sumann	summarize the contents of a WFDB annotation file	70
sumstats	derive aggregate statistics from bxb, rxr, etc., line-format output	71
tach	heart rate tachometer	72
view, vsetup	WFDB browser for MS-DOS	74
wave	waveform analyzer, viewer, and editor for the X Window System	77
wfdbcat	copy WFDB records to standard output	87
wfdbcollate	collate WFDB records into a multi-segment record	88
wfdb-config	print WFDB library info	90
wfdbdesc	read signal specifications	91
wfdbwhich	find a WFDB file and print its pathname	92
wrann	write a WFDB annotation file	93
wrsamp	write WFDB signal files	94
wview	WFDB browser for MS Windows	96
xform	sampling frequency, amplitude, and format conversion for WFDB records	100


\fBSection 3: WFDB library\fP
wfdb	Waveform Database library	102
wfdbf	Waveform Database library wrappers for Fortran	105

\fBSection 5: WFDB file formats\fP
annot	WFDB annotation file formats	108
header	WFDB header file format	109
signal	WFDB signal file formats	116
wfdbcal	WFDB calibration file format	118


\fBAppendices\fP
	\fIInstalling the WFDB Software Package\fP	121
	\fIEvaluating ECG Analyzers\fP	125
.TE

.LP
.ds LH WFDB A\s-2PPLICATIONS\s+2 G\s-2UIDE\s+2
.ds RH I\s-2NTRODUCTION\s+2
\s+2
.bp
.ce 1
\fBINTRODUCTION\fP
.PP
Most of this guide consists of UNIX \fIman\fP pages that describe the
applications included in the WFDB Software Package.  If you are unfamiliar
with the format of UNIX \fIman\fP pages, it may be helpful to refer to the
introduction of a UNIX reference manual for orientation.  The descriptions
are intentionally terse;  this is a reference manual and not a tutorial
introduction to the software described within.  In those cases for which
relevant tutorial material exists elsewhere, references appear in
the \fBSEE ALSO\fP sections of each \fIman\fP page.
.PP
The organization follows the traditional arrangement of the UNIX Reference
Manual:  section 1 contains programs, section 3 contains libraries, and
section 5 contains file formats.  In the UNIX Reference Manual, sections
2 and 4 are reserved for system calls and device interfaces respectively;
these sections do not exist in this guide.
.PP
If you have not used any of these programs before, you should be sure that
your environment is set up properly so that WFDB applications can find their
input files.  See setwfdb(1) in this guide for information about doing this;
a more detailed discussion may be found in the first chapter of the \fIWFDB
Programmer's Guide\fP, in the section about the database path.
.PP
Certain types of command arguments are used by many of the applications
described in this guide.  These include:
.IP \fIrecord\fP 15
Where this appears, substitute the name of a WFDB record.  MIT-BIH Arrhythmia
Database record names are 3-digit numbers, AHA Database record names are
4-digit numbers, and European ST-T Database record names begin with lowercase
`e', followed by a 4-digit number.  Record names may contain letters, digits,
and underscores.  Case is significant in record names that contain letters,
even in environments such as MS-Windows for which case translation is normally
performed by the operating system on file names;  thus `e0104' is the name
of a record found in the European ST-T Database, whereas `E0104' is not.
A record name is \fInot\fP a file name.  See the \fIWFDB Programmer's Guide\fP
for further details on record names.
.IP \fIannotator\fP
Where this appears, substitute an annotator name.  The annotator name
`atr' is used to name the set of \fIreference annotations\fP supplied by
the database developers.  Annotator names may contain letters, digits, and
underscores, as for record names.
.IP \fItime\fP
Where this appears, substitute a string in \fIstandard time format\fP.
\fITime\fP arguments generally specify elapsed times from the beginning
of the record (for exceptions to this rule, see the section on the
\fBstrtim\fR function in the \fIWFDB Programmer's Guide\fP).  Examples
of standard time format:
.TS
center;
l l.
2:14.875	2 minutes + 14.875 seconds
143	143 seconds (2 minutes + 23 seconds)
4:02:01	4 hours + 2 minutes + 1 second
4:2:1	same as above
s12345	12345 sample intervals
e	time of the end of the record
.TE
.IP \fIsignal\fP
Where this appears, substitute a signal number.  Signal numbers are integers;
the first signal in each record is signal 0.  In printed documentation for
the databases, signals always appear with signal 0 at the top, signal 1
beneath, etc.  Where the notation `\fIsignal-list\fP' (or `\fIsignal ...\fP')
appears in this guide, you may specify more than one signal in any desired
order;  separate the signal numbers using spaces.
.bp
.PP
Under UNIX, if the WFDB Software Package has been installed on your
system, you can also access the information contained in this guide
using \fIman\fR and related programs.  In some cases you may need
to add \fB/usr/local/man\fR to your \fBMANPATH\fR environment variable, in
order to make these pages accessible to \fIman\fR.
.PP
An HTML version of this guide is also available;  point your Web browser to
\fBhttp://www.physionet.org/physiotools/dbag/\fR to read it.
.PP
The notations that appear at the bottom of each page indicate the date when
that page was last revised, and (in most cases) the version of the WFDB
Software Package that was current at that time.  An old date and version number
do not mean that the page is out-of-date;  rather they mean that the material
described on that page remains current.
.PP
Your comments on this guide, and on the software that it documents, are
welcome.  Please send them to:
.DS C
George B. Moody
MIT Room E25-505A
Cambridge, MA 02139
USA

(e-mail: george@mit.edu)
.DE
