The QRS detector is based on the algorithm of Pan and Tompkins (reference 1) with some improvements that make use of slope information (reference 2). Optionally, QRS annotations can be provided as input (see option -i), permitting the use of external QRS detectors such as sqrs(1) or manually-edited annotations (which can be created using wave(1) ). The waveform limit locator is based on the algorithm described in reference 3 and evaluated in references 3 and 4.
The output annotation file contains PWAVE ("p") and TWAVE ("t") annotations that indicate the P- and T-wave peaks, as well as QRS annotations (NORMAL ("N") if generated by the built-in QRS detector, or copies of the input QRS annotations if these were supplied). ecgpuwave classifies each T wave as type 0 (normal), 1 (inverted), 2 (positive monophasic), 3 (negative monophasic), 4 (biphasic negative-positive), or 5 (biphasic positive-negative); this numeric classification is written into the num field of each TWAVE annotation. The P, QRS, and T waveform onsets and ends are marked in the output annotation file using WFON ("(") and WFOFF (")") annotations. The num field of each WFON and WFOFF annotation designates the type of waveform with which it is associated: 0 for a P wave, 1 for a QRS complex, or 2 for a T wave.
It may be necessary to set and export the shell variable WFDB (see setwfdb(1) ).
Important note for users of the MATLAB/Octave m-code version: The MATLAB version includes QRS delineation, but it does not include an integrated QRS detector such as the modified Pan-Tompkins detector in the original Fortran version, described above. You must provide an input annotation file containing the times of occurrence of the QRS complexes (use the dirann and anot input parameters to specify where to find this file; see the documentation for the MATLAB version for details). If no annotation file is supplied, limits.m attempts to use basicECG.m and qrsdet.m to detect the QRS complexes, but these files have not been contributed by their authors and are not available here, so this attempt will fail unless you have obtained or reimplemented these functions. PhysioToolkit includes several QRS detectors that can generate an annotation file if necessary; these include gqrs(1), sqrs(1), and wqrs(1) (all written in C and included in the WFDB Software Package), as well as the original Fortran version of ecgpuwave, which includes its own QRS detector. The sqrs and wqrs detectors are also available as MATLAB functions within the WFDB Toolbox for MATLAB.