Skip to content

Commit d1879f6

Browse files
committed
trim trailing whitespace
1 parent 408ad93 commit d1879f6

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

wfdb/processing/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def get_filter_gain(b, a, f_gain, fs):
215215
The frequency at which to calculate the gain.
216216
fs : int, float, optional
217217
The sampling frequency of the system.
218-
218+
219219
Returns
220220
-------
221221
gain : int, float

wfdb/processing/qrs.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
class XQRS(object):
1414
"""
15-
The QRS detector class for the XQRS algorithm. The `XQRS.Conf`
16-
class is the configuration class that stores initial parameters
15+
The QRS detector class for the XQRS algorithm. The `XQRS.Conf`
16+
class is the configuration class that stores initial parameters
1717
for the detection. The `XQRS.detect` method runs the detection algorithm.
1818
1919
The process works as follows:
@@ -85,7 +85,7 @@ class Conf(object):
8585
----------
8686
hr_init : int, float, optional
8787
Initial heart rate in beats per minute. Used for calculating
88-
recent R-R intervals.
88+
recent R-R intervals.
8989
hr_max : int, float, optional
9090
Hard maximum heart rate between two beats, in beats per
9191
minute. Used for refractory period.
@@ -134,7 +134,7 @@ def __init__(self, hr_init=75, hr_max=200, hr_min=25, qrs_width=0.1,
134134
def _set_conf(self):
135135
"""
136136
Set configuration parameters from the Conf object into the detector
137-
object. Time values are converted to samples, and amplitude values
137+
object. Time values are converted to samples, and amplitude values
138138
are in mV.
139139
140140
Parameters
@@ -470,15 +470,15 @@ def _update_qrs(self, peak_num, backsearch=False):
470470
The peak number of the MWI signal where the QRS is detected.
471471
backsearch: bool, optional
472472
Whether the QRS was found via backsearch.
473-
473+
474474
Returns
475475
-------
476476
N/A
477477
478478
"""
479479
i = self.peak_inds_i[peak_num]
480480

481-
# Update recent R-R interval if the beat is consecutive (do this
481+
# Update recent R-R interval if the beat is consecutive (do this
482482
# before updating self.last_qrs_ind)
483483
rr_new = i - self.last_qrs_ind
484484
if rr_new < self.rr_max:
@@ -514,7 +514,7 @@ def _is_twave(self, peak_num):
514514
----------
515515
peak_num : int
516516
The peak number of the MWI signal where the QRS is detected.
517-
517+
518518
Returns
519519
-------
520520
bool
@@ -901,7 +901,7 @@ def __init__(self, fs, adc_gain, hr=75,
901901
class Peak(object):
902902
"""
903903
Holds all of the peak information for the QRS object.
904-
904+
905905
Attributes
906906
----------
907907
peak_time : int, float
@@ -923,7 +923,7 @@ def __init__(self, peak_time, peak_amp, peak_type):
923923
class Annotation(object):
924924
"""
925925
Holds all of the annotation information for the QRS object.
926-
926+
927927
Attributes
928928
----------
929929
ann_time : int, float
@@ -1160,8 +1160,8 @@ def qfv_put(self, t, v):
11601160

11611161
def sm(self, at_t):
11621162
"""
1163-
Implements a trapezoidal low pass (smoothing) filter (with a gain
1164-
of 4*smdt) applied to input signal sig before the QRS matched
1163+
Implements a trapezoidal low pass (smoothing) filter (with a gain
1164+
of 4*smdt) applied to input signal sig before the QRS matched
11651165
filter qf(). Before attempting to 'rewind' by more than BUFLN-smdt
11661166
samples, reset smt and smt0.
11671167
@@ -1220,7 +1220,7 @@ def qf(self):
12201220
N/A
12211221
12221222
"""
1223-
# Do this first, to ensure that all of the other smoothed values
1223+
# Do this first, to ensure that all of the other smoothed values
12241224
# needed below are in the buffer
12251225
dv2 = self.sm(self.t + self.c.dt4)
12261226
dv2 -= self.smv_at(self.t - self.c.dt4)
@@ -1302,17 +1302,17 @@ def add_peak(peak_time, peak_amp, peak_type):
13021302

13031303
def peaktype(p):
13041304
"""
1305-
The neighborhood consists of all other peaks within rrmin.
1306-
Normally, "most prominent" is equivalent to "largest in
1307-
amplitude", but this is not always true. For example, consider
1308-
three consecutive peaks a, b, c such that a and b share a
1309-
neighborhood, b and c share a neighborhood, but a and c do not;
1310-
and suppose that amp(a) > amp(b) > amp(c). In this case, if
1305+
The neighborhood consists of all other peaks within rrmin.
1306+
Normally, "most prominent" is equivalent to "largest in
1307+
amplitude", but this is not always true. For example, consider
1308+
three consecutive peaks a, b, c such that a and b share a
1309+
neighborhood, b and c share a neighborhood, but a and c do not;
1310+
and suppose that amp(a) > amp(b) > amp(c). In this case, if
13111311
there are no other peaks, a is the most prominent peak in the (a, b)
1312-
neighborhood. Since b is thus identified as a non-prominent peak,
1313-
c becomes the most prominent peak in the (b, c) neighborhood.
1314-
This is necessary to permit detection of low-amplitude beats that
1315-
closely precede or follow beats with large secondary peaks (as,
1312+
neighborhood. Since b is thus identified as a non-prominent peak,
1313+
c becomes the most prominent peak in the (b, c) neighborhood.
1314+
This is necessary to permit detection of low-amplitude beats that
1315+
closely precede or follow beats with large secondary peaks (as,
13161316
for example, in R-on-T PVCs).
13171317
13181318
Parameters
@@ -1323,7 +1323,7 @@ def peaktype(p):
13231323
Returns
13241324
-------
13251325
int
1326-
Whether the input peak is the most prominent peak in its
1326+
Whether the input peak is the most prominent peak in its
13271327
neighborhood (1) or not (2).
13281328
13291329
"""
@@ -1534,8 +1534,8 @@ def gqrs_detect(sig=None, fs=None, d_sig=None, adc_gain=None, adc_zero=None,
15341534
"""
15351535
Detect QRS locations in a single channel ecg. Functionally, a direct port
15361536
of the GQRS algorithm from the original WFDB package. Accepts either a
1537-
physical signal, or a digital signal with known adc_gain and adc_zero. See
1538-
the notes below for a summary of the program. This algorithm is not being
1537+
physical signal, or a digital signal with known adc_gain and adc_zero. See
1538+
the notes below for a summary of the program. This algorithm is not being
15391539
developed/supported.
15401540
15411541
Parameters

0 commit comments

Comments
 (0)