.TH TACH 1 "31 July 2002" "WFDB 10.2.7" "WFDB Applications Guide" .SH NAME tach \- heart rate tachometer .SH SYNOPSIS \fBtach -r\fR \fIrecord\fR \fB-a\fR \fIannotator\fR [ \fIoptions\fR ... ] .SH DESCRIPTION .PP \fBtach\fR reads an annotation file (specified by the \fIannotator\fR and \fIrecord\fR arguments) and produces a uniformly sampled and smoothed instantaneous heart rate signal. Smoothing is accomplished by finding the number of fractional R-R intervals within a window (with a width of 2\fIk\fR output sample intervals, where \fIk\fR is a smoothing constant) centered on the current output sample. By default, the output is in text form, and consists of a column of numbers, which are samples of the instantaneous heart rate signal (in units of beats per minute). Optionally, the output sample number can be printed before each output sample value. Alternatively, \fBtach\fR can create a WFDB record containing the heart rate signal. .PP Studies of heart rate variability generally require special treatment of ectopic beats. Typically, ventricular ectopic beat annotations are removed from the input annotation file and replaced by `phantom' beat annotations at the expected locations of sinus beats. The same procedure can be used to fill in gaps resulting from other causes, such as momentary signal loss. It is often necessary to post-process the output of \fItach\fR to remove impulse noise in the heart rate signal introduced by the presence of non-compensated ectopic beats, especially supraventricular ectopic beats. Note that \fBtach\fR performs none of these manipulations, although it usually attempts limited outlier rejection (\fBtach\fR maintains an estimate of the mean absolute deviation of its output, and replaces any output that is more than three times this amount from the previous value with the previous value). .PP \fIOptions\fR include: .TP \fB-f\fR \fItime\fR Begin at the specified \fItime\fR in \fIrecord\fR (default: the beginning of \fIrecord\fR). .TP \fB-F\fR \fRfrequency\fR Produce output at the specified sampling frequency (default: 2 Hz). .TP \fB-h\fR Print a usage summary. .TP \fB-i\fR \fIrate\fR For outlier detection, assume an initial rate of \fIrate\fR bpm (default: 80). .TP \fB-l\fR \fIduration\fR Process the record for the specified \fIduration\fR, beginning at the time specified by a previous \fB-f\fR option, or at the beginning of the record. .TP \fB-n\fR \fIn\fR Produce exactly \fIn\fR output samples, adjusting the output frequency so that they are evenly spaced throughout the interval specified by previous \fB-f\fR and \fB-t\fR or \fB-l\fR options. This option is particularly useful if the output of \fBtach\fR is to be used as input for a fast Fourier transform, since \fIn\fR can be chosen to be a convenient power of two. .TP \fB-o\fR \fIrecord\fR Write output to signal and header files for the specified \fIrecord\fR (which should not be the same as the input record). This option suppresses the standard text output of \fBtach\fR. .TP \fB-O\fR Disable outlier rejection. .TP \fB-s\fR \fIk\fR Set the smoothing constant to \fIk\fR (default: 1; \fIk\fR must be positive). .TP \fB-t\fR \fItime\fR Process until the specified \fItime\fR in \fIrecord\fR (default: the end of the \fIrecord\fR). .TP \fB-v\fR Print the output sample number before each output sample value. .TP \fB-V\fR, \fB-Vs\fR, \fB-Vm\fR, \fB-Vh\fR Print the output sample time in seconds (using \fB-V\fR or \fB-Vs\fR), minutes (using \fB-Vm\fR), or hours (using \fB-Vh\fR) before each output sample value. Only one of these options can be used at a time. .PP Reference (`atr') annotation files can be used as input to \fBtach\fR, but files that contain manually-inserted annotations are less suitable, since annotation placement is likely to be less consistent than in annotation files generated by programs such as \fBsqrs\fR(1). .SH ENVIRONMENT .PP It may be necessary to set and export the shell variable \fBWFDB\fR (see \fBsetwfdb\fR(1)). .SH DIAGNOSTICS .TP \fIannotation buffer overflow\fR Use a smaller smoothing constant, a higher output frequency, or recompile \fItach\fR with a larger value for \fBABL\fR. .SH SEE ALSO \fBsetwfdb\fR(1), \fBsqrs\fR(1) .SH AUTHOR George B. Moody (george@mit.edu) .SH SOURCE http://www.physionet.org/physiotools/wfdb/app/tach.c