@@ -7,8 +7,7 @@ def time_to_sample_number(seconds, frequency):
7
7
8
8
9
9
class Conf (object ):
10
- def __init__ (self , freq , gain ,
11
- hr = 75 ,
10
+ def __init__ (self , freq , gain , hr = 75 ,
12
11
RRdelta = 0.2 , RRmin = 0.28 , RRmax = 2.4 ,
13
12
QS = 0.07 , QT = 0.35 ,
14
13
RTmin = 0.25 , RTmax = 0.33 ,
@@ -225,7 +224,7 @@ def sm(self, at_t):
225
224
226
225
return self .smv_at (at_t )
227
226
228
- def qf (self ): # CHECKED!
227
+ def qf (self ):
229
228
# evaluate the QRS detector filter for the next sample
230
229
231
230
# do this first, to ensure that all of the other smoothed values needed below are in the buffer
@@ -471,10 +470,12 @@ def gqrs_detect(x, fs, adc_gain, adc_zero, threshold=1.0,
471
470
QS = 0.07 , QT = 0.35 , RTmin = 0.25 , RTmax = 0.33 ,
472
471
QRSa = 750 , QRSamin = 130 ):
473
472
"""
474
- Detect qrs locations in a single channel ecg.
473
+ Detect qrs locations in a single channel ecg. Functionally, a direct port
474
+ of the gqrs algorithm from the original wfdb package. See the notes below
475
+ for a summary of the program.
475
476
476
- Functionally, a direct port of the gqrs algorithm from the original
477
- wfdb package. Therefore written to accept wfdb record fields .
477
+ This algorithm is not being developed/supported. Use another algorithm
478
+ such as `xqrs_detect` for a supported qrs detector .
478
479
479
480
Parameters
480
481
----------
@@ -518,8 +519,20 @@ def gqrs_detect(x, fs, adc_gain, adc_zero, threshold=1.0,
518
519
519
520
Notes
520
521
-----
522
+ The algorithm works as follows:
523
+ - Apply trapezoid low-pass filtering to the signal
524
+ - Convolve a QRS matched filter with the filtered signal
525
+ - Run the learning phase:
526
+ - Run the detection:
527
+ -
528
+
521
529
This function should not be used for signals with fs <= 50Hz
522
530
531
+ A list of issues from the original c code and hence this python
532
+ implementationcan be found here: https://github.com/bemoody/wfdb/issues/17
533
+
534
+ gqrs will not be developed in this library.
535
+
523
536
"""
524
537
conf = Conf (freq = fs , gain = adc_gain , hr = hr ,
525
538
RRdelta = RRdelta , RRmin = RRmin , RRmax = RRmax ,
0 commit comments