\" file: appguide.int G. Moody July 1989 \" Last revised: 23 April 1997 \" Table of contents and introduction to the ECG Database Applications Guide. \" \" To print this document using GNU groff, use: \" tbl appguide.int | groff -ms \" 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 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 bxb ANSI/AAMI-standard beat-by-beat annotation comparator 3 calibrate calibrate signals of a DB record 5 coherence estimate coherence and cross-spectrum of two time series 7 dbcollate collate DB records into a multi-segment record 8 dbdesc read signal specifications 9 dbplot plot DB signals and annotations 10 dbtool DB browser for SunView 12 dbwhich find a DB file and print its pathname 14 ecgeval generate and run ECG analyzer evaluation script 15 epic ANSI/AAMI-standard episode-by-episode annotation comparator 16 fft fast Fourier transform 18 fir general-purpose FIR filter for DB records 20 hrfft, hrlomb, hrmem, hrplot calculate and plot heart rate power spectra 22 ihr calculate instantaneous heart rate 23 log10 calculate common logarithms of two-column data 24 lomb estimate power spectrum using the Lomb periodogram method 25 memse estimate power spectrum using maximum entropy (all poles) method 26 mfilt general-purpose median filter for DB records 28 mrgann merge annotation files 29 mxm ANSI/AAMI-standard measurement-by-measurement comparator 31 nst noise stress test for ECG analysis programs 33 plot2d, plot3d make 2-D or 3-D plots from text files of data, using \fIgnuplot\fR 36 plotstm produce scatter plot of ST measurement errors on a PostScript device 38 pschart produce annotated `chart recordings' on a PostScript device 39 psfd produce annotated `full-disclosure' plots on a PostScript device 42 rdann read a DB annotation file 46 rdsamp read DB signal files 47 rxr ANSI/AAMI-standard run-by-run annotation comparator 48 sample digitize and replay analog signals (MS-DOS only) 50 setdb, cshsetdb, dossetdb set DB environment variables 54 sigamp measure signal amplitudes of a DB record 55 skewedit edit skew fields of header file(s) 56 snip copy an excerpt of a DB record 57 sortann rearrange annotations in canonical order 58 sqrs single-channel QRS detector 59 sumann summarize the contents of a DB annotation file 60 sumstats derive aggregate statistics from bxb, rxr, etc., line-format output 61 tach heart rate tachometer 62 view, vsetup DB browser for MS-DOS 64 wave waveform analyzer, viewer, and editor for the X Window System 67 wrann write a DB annotation file 77 wrsamp write DB signal files 78 wview DB browser for MS Windows 80 xform sampling frequency, amplitude, and format conversion for DB records 84 \fBSection 3: DB library\fP db ECG database library 86 \fBSection 5: DB file formats\fP annot ECG database annotation file formats 88 dbcal ECG database calibration file format 89 header ECG database header file format 91 signal ECG database signal file formats 97 \fBAppendices\fP \fIInstalling the DB Software Package\fP 98 \fIEvaluating ECG Analyzers\fP 100 .TE .LP .ds LH ECG D\s-2ATABASE\s+2 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 MIT DB 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 DB applications can find their input files. See setdb(1) in this guide for information about doing this; a more detailed discussion may be found in the first chapter of the ECG Database Programmer's Guide, 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 DB 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-DOS 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. Under MS-DOS, furthermore, only the first eight characters of a record name are significant. A record name is \fInot\fP a file name. See the \fIECG Database Programmer's Guide\fP for further details on record names. .IP \fIannotator\fP Where this appears, substitute an annotator name. The annotator name `atruth' (shortened to `atr' under MS-DOS and on CD-ROMs) 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. Note that, under MS-DOS, only the first three characters of an annotator name are significant. .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 \fIECG Database 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 DB 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://ecg.mit.edu/dbag/\fR to read it. The HTML version of this guide is also supplied on our CD-ROMs that include the DB Software Package; begin by pointing your browser to \fBfile:///cdrom/dbag/dbag.htm\fR (under UNIX, if the mount point for your CD-ROM is \fB/cdrom\fR), or to \fBfile:///d|/html/dbag.htm\fR (under MS-DOS, if your CD-ROM is the D: drive). .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 DB 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 20A-113 Cambridge, MA 02139 USA (e-mail: george@hstbme.mit.edu) .DE