Next: RDEDFANN(1) Up: WFDB Applications Guide Previous: PSFD(1)On This Page

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.

Annotation numbers beginning with 0 are implicitly assigned by rdann to each annotation in an annotation file, and beat numbers beginning with 0 are assigned to each QRS annotation. If the argument of the -f option begins with ‘a’, it is taken to be the annotation number of the first annotation to be printed; if it begins with ‘b’, it is taken to be the beat number of the first beat annotation to be printed (any non-QRS annotations that immediately precede this annotation are also printed). Arguments of the -t option beginning with ‘a’ or ‘b’ similarly specify the annotation number or beat number following the last to be 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


Table of Contents

Up: WFDB Applications Guide


Please e-mail your comments and suggestions to webmaster@physionet.org, or post them to:

PhysioNet
MIT Room E25-505A
77 Massachusetts Avenue
Cambridge, MA 02139 USA

Updated 10 June 2022