Next: STEPDET(1) Up: WFDB Applications Guide Previous: SORTANN(1)On This Page

Name

sqrs, sqrs125 - single-channel QRS detector

Synopsis

sqrs -r record [ options ... ]
sqrs125 -r record [ options ... ]

Description

sqrs attempts to locate QRS complexes in an ECG signal in the specified record. The detector algorithm is based on example 10 in the WFDB Programmer’s Guide, which in turn is based on a Pascal program written by W.A.H. Engelse and C. Zeelenberg, ‘‘A single scan algorithm for QRS-detection and feature extraction’’, Computers in Cardiology 6:37-42 (1979). sqrs does not include the feature extraction capability of the Pascal program. The output of sqrs is an annotation file (with annotator name qrs) in which all detected beats are labelled normal; the annotation file may also contain ‘artifact’ annotations at locations that sqrs believes are noise-corrupted.

sqrs can process records containing any number of signals, but it uses only one signal for QRS detection (signal 0 by default; this can be changed using the -s option, see below). sqrs is optimized for use with adult human ECGs. For other ECGs, it may be necessary to experiment with the sampling frequency as recorded in the input record’s header file (see header(5) ) and the time constants indicated in the source file.

sqrs uses the WFDB library’s setifreq function to resample the input signal at 250 Hz if a significantly different sampling frequency is indicated in the header file. sqrs125 is identical to sqrs except that its filter and time constants have been designed for 125 Hz input, so that its speed is roughly twice that of sqrs. If the input signal has been sampled at a frequency near 125 Hz, the quality of the outputs of sqrs and sqrs125 will be nearly identical. (Note that older versions of these programs did not resample their inputs; rather, they warned if the sampling frequency was significantly different than the ideal frequency, and suggested using xform(1) to resample the input.)

This program is provided as an example only, and is not intended for any clinical application. At the time the algorithm was originally published, its performance was typical of state-of-the-art QRS detectors. Recent designs, particularly those that can analyze two or more input signals, may exhibit significantly better performance.

Options include:

-f time
Begin at the specified time in record (default: the beginning of record).
-h
Print a usage summary.
-H
Read the signal files in high-resolution mode (default: standard mode). These modes are identical for ordinary records. For multifrequency records, the standard decimation of oversampled signals to the frame rate is suppressed in high-resolution mode (rather, all other signals are resampled at the highest sampling frequency).
-m threshold
Specify the detection threshold (default: 500 units); use higher values to reduce false detections, or lower values to reduce the number of missed beats.
-s signal
Specify the signal (number or name) to be used for QRS detection (default: 0).
-t time
Process until the specified time in record (default: the end of the record).

Environment

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

Examples

To mark QRS complexes in record 100 beginning 5 minutes from the start, ending 10 minutes and 35 seconds from the start, and using signal 1, use the command:
   sqrs -r 100 -f 5:0 -t 10:35 -s 1

The output annotations may be read using (for example):
   rdann -a qrs -r 100

To evaluate the performance of this program, run it on the entire record, by:
   sqrs -r 100

and then compare its output with the reference annotations by:
   bxb -r 100 -a atr qrs

See Also

bxb(1) , rdann(1) , setwfdb(1) , wqrs(1) , xform(1)

Authors

George B. Moody (george@mit.edu). This program is a fairly literal translation with minor corrections of the Pascal original by WAH Engelse and Cees Zeelenberg.

Source

http://www.physionet.org/physiotools/wfdb/app/sqrs.c
http://www.physionet.org/physiotools/wfdb/app/sqrs125.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