tach reads an annotation file (specified by the annotator
and record 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 2k output sample intervals,
where k 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, tach can create a WFDB record
containing the heart rate signal.

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 tach to remove impulse noise in the heart rate signal introduced
by the presence of non-compensated ectopic beats, especially supraventricular
ectopic beats. Note that tach performs none of these manipulations, although
it usually attempts limited outlier rejection (tach 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).

Process the
record for the specified duration, beginning at the time specified by a
previous -f option, or at the beginning of the record.

-nn

Produce exactly
n output samples, adjusting the output frequency so that they are evenly
spaced throughout the interval specified by previous -f and -t or -l options.
This option is particularly useful if the output of tach is to be used
as input for a fast Fourier transform, since n can be chosen to be a convenient
power of two.

Print the output sample time in seconds (using -V or -Vs),
minutes (using -Vm), or hours (using -Vh) before each output sample value.
Only one of these options can be used at a time.

Reference (‘atr’) annotation
files can be used as input to tach, 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 sqrs(1)
.