Skip to content

Commit d02c478

Browse files
author
Benjamin Moody
committed
_rd_segment, _rd_dat_signals: remove smooth_frames parameter.
The smooth_frames parameter has been deprecated, and these functions always return a list of arrays; remove the parameter. Note that _rd_segment is only ever called by rdrecord, and _rd_dat_signals is only ever called by _rd_segment.
1 parent b2f3995 commit d02c478

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

wfdb/io/_signal.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ def smooth_frames(self, sigtype='physical'):
866866

867867
def _rd_segment(file_name, dir_name, pn_dir, fmt, n_sig, sig_len, byte_offset,
868868
samps_per_frame, skew, init_value, sampfrom, sampto, channels,
869-
smooth_frames, ignore_skew, no_file=False, sig_data=None, return_res=64):
869+
ignore_skew, no_file=False, sig_data=None, return_res=64):
870870
"""
871871
Read the digital samples from a single segment record's associated
872872
dat file(s).
@@ -899,8 +899,6 @@ def _rd_segment(file_name, dir_name, pn_dir, fmt, n_sig, sig_len, byte_offset,
899899
The starting sample number to be read from the signals.
900900
sampto : int
901901
The final sample number to be read from the signals.
902-
smooth_frames : bool
903-
Deprecated. Must be set to False.
904902
ignore_skew : bool
905903
Used when reading records with at least one skewed signal.
906904
Specifies whether to apply the skew to align the signals in the
@@ -991,9 +989,6 @@ def _rd_segment(file_name, dir_name, pn_dir, fmt, n_sig, sig_len, byte_offset,
991989
r_w_channel[fn] = [c - min(datchannel[fn]) for c in w_channel[fn]]
992990
out_dat_channel[fn] = [channels.index(c) for c in w_channel[fn]]
993991

994-
if smooth_frames:
995-
raise ValueError('smooth_frames=True is not supported')
996-
997992
# Return each sample in signals with multiple samples/frame, without smoothing.
998993
# Return a list of numpy arrays for each signal.
999994
signals = [None] * len(channels)
@@ -1013,7 +1008,6 @@ def _rd_segment(file_name, dir_name, pn_dir, fmt, n_sig, sig_len, byte_offset,
10131008
init_value=w_init_value[fn],
10141009
sampfrom=sampfrom,
10151010
sampto=sampto,
1016-
smooth_frames=smooth_frames,
10171011
no_file=no_file,
10181012
sig_data=sig_data)
10191013

@@ -1026,8 +1020,7 @@ def _rd_segment(file_name, dir_name, pn_dir, fmt, n_sig, sig_len, byte_offset,
10261020

10271021
def _rd_dat_signals(file_name, dir_name, pn_dir, fmt, n_sig, sig_len,
10281022
byte_offset, samps_per_frame, skew, init_value,
1029-
sampfrom, sampto, smooth_frames,
1030-
no_file=False, sig_data=None):
1023+
sampfrom, sampto, no_file=False, sig_data=None):
10311024
"""
10321025
Read all signals from a WFDB dat file.
10331026
@@ -1059,8 +1052,6 @@ def _rd_dat_signals(file_name, dir_name, pn_dir, fmt, n_sig, sig_len,
10591052
The starting sample number to be read from the signals.
10601053
sampto : int
10611054
The final sample number to be read from the signals.
1062-
smooth_frames : bool
1063-
Deprecated. Must be set to False.
10641055
no_file : bool, optional
10651056
Used when using this function with just an array of signal data
10661057
and no associated file to read the data from.
@@ -1179,9 +1170,6 @@ def _rd_dat_signals(file_name, dir_name, pn_dir, fmt, n_sig, sig_len,
11791170
# At this point, dtype of sig_data is the minimum integer format
11801171
# required for storing the final digital samples.
11811172

1182-
if smooth_frames:
1183-
raise ValueError('smooth_frames=True is not supported')
1184-
11851173
# List of 1d numpy arrays
11861174
signal = []
11871175
# Transfer over samples

wfdb/io/record.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3535,7 +3535,6 @@ def rdrecord(record_name, sampfrom=0, sampto=None, channels=None,
35353535
sampfrom=sampfrom,
35363536
sampto=sampto,
35373537
channels=channels,
3538-
smooth_frames=False,
35393538
ignore_skew=ignore_skew,
35403539
no_file=no_file,
35413540
sig_data=sig_data,

0 commit comments

Comments
 (0)