RDANN(1)

NAME
rdann - read a WFDB annotation file

SYNOPSIS
rdann -r record -a annotator [ options ... ]

DESCRIPTION
rdann reads the annotation file specified by record and annotator, and writes a text-format translation of it on the standard output, one annotation per line. The output contains (from left to right) the time of the annotation in hours, minutes, seconds, and milliseconds; the time of the annotation in samples; a mnemonic for the annotation type; the annotation subtyp, chan, and num fields; and the auxiliary information string, if any (assumed to be a null-terminated ASCII string).

Options include:

-c chan
    Print only those annotations with chan fields that match chan.

-e  Print annotation times as elapsed times from the beginning of the record (default: rdann prints absolute times if the absolute time of the beginning of the record is defined, and elapsed times otherwise, unless the -x option has been given).

-f time
    Begin at the specified time. By default, rdann starts at the beginning of the record; if modification labels are present, they are not printed unless -f 0 is given explicitly, however.

-h  Print a usage summary.

-n num
    Print only those annotations with num fields that match num.

-p type [ type ... ]
    Print annotations of the specified types only. The type arguments should be annotation mnemonics (e.g., N) as normally printed by rdann in the third column. More than one -p option may be used in a single command, and each -p option may have more than one type argument following it. If type begins with ``-'', however, it must immediately follow -p (standard annotation mnemonics do not begin with ``-'', but modification labels in an annotation file may define such mnemonics).

-s sub
    Print only those annotations with subtyp fields that match sub.

-t time
    Stop at the specified time.

-v  Print column headings.

-x  Use an alternate time format for output (the first three columns are the elapsed times in seconds, in minutes, and in hours, replacing the hh:mm:ss and sample number columns in the default output). Note that this format is incompatible with wrann.

The -f and -t options may be used to select a portion of an annotation file for printing. Their arguments are usually given in standard time (hh:mm:ss) format; see the description of strtim in the WFDB Programmer's Guide, as well as the comments below, for other formats.

Beat numbers beginning with 0 are implicitly assigned by rdann to each QRS annotation in an annotation file. If the argument of the -f option begins with `#', it is taken to be the beat number of the first QRS annotation to be printed (any non-QRS annotations that immediately precede this annotation are also printed). If the argument of the -t option begins with `#', it is taken as the number of QRS annotations to be processed; note that not all of those processed will necessarily be printed, if the -p option is used to select only a subset of annotation types to be printed.

Note that the -e and -x options are mutually exclusive; if both are given, only the last one is effective.

ENVIRONMENT

It may be necessary to set and export the shell variable WFDB (see setwfdb(1)).

  Example
    rdann -a atr -r 200 -f 0 -t 5:0 -p V
This command prints on the standard output all V (premature ventricular contraction) annotations in the first five minutes of the atr (reference annotation) file for record 200.

CD-ROM Versions
The first edition of the MIT-BIH Arrhythmia Database CD-ROM, the first and second editions of the European ST-T Database CD-ROM, and the first edition of the MIT-BIH Polysomnographic Database CD-ROM contain versions of rdann that use an older command syntax (still supported by the current version but not described here). Refer to bin.doc in the CD-ROM directory that contains rdann for further information.

AVAILABILITY
This program is provided in the app directory of the WFDB Software Package. Run make in that directory to compile and install it if it have not been installed already.

The PhysioNet ATM (http://physionet.org/cgi-bin/ATM) provides web access to rdsamp (select Show annotations as text from the Toolbox).

SEE ALSO
rdsamp(1), setwfdb(1), wrann(1)

AUTHOR
George B. Moody (george@mit.edu)

SOURCE
http://www.physionet.org/physiotools/wfdb/app/rdann.c