Skip to content

Commit

Permalink
blinkreconstruct: unbreak reconstruction of good signals
Browse files Browse the repository at this point in the history
- bump to 1.0.9
  • Loading branch information
smathot committed Nov 22, 2023
1 parent e918ba2 commit 0423172
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion datamatrix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
from datamatrix._datamatrix._nifticolumn import NiftiColumn
from datamatrix._datamatrix._datamatrix import DataMatrix

__version__ = '1.0.8'
__version__ = '1.0.9'
NAN = float('nan')
INF = float('inf')
12 changes: 6 additions & 6 deletions datamatrix/_datamatrix/_blinkreconstruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,18 @@ def fnc_recursive(a):
# Get the first occuring blink
blink_points = _blink_points(vtrace, vt_start=vt_start, vt_end=vt_end,
maxdur=maxdur, margin=margin)
if list(blink_points) in processed_blink_points:
logger.warning('Blink reconstruction entered infinite loop. This '
'likely indicates noisy data. Aborting blink '
'reconstruction for this signal.')
return a
processed_blink_points.append(list(blink_points))
# If no blink exists, we trim the signal as a final operation and then
# leave it.
if blink_points is None:
logger.debug('no more blinks')
return _trim(a, vtrace, std_thr=std_thr, gap_margin=gap_margin,
gap_vt=gap_vt)
if list(blink_points) in processed_blink_points:
logger.warning('Blink reconstruction entered infinite loop. This '
'likely indicates noisy data. Aborting blink '
'reconstruction for this signal.')
return a
processed_blink_points.append(list(blink_points))
# If a blink exists, see if we can get four valid points around it for
# cubic spline interpolation. If not, then we do linear interpolation.
istart, iend = blink_points
Expand Down

0 comments on commit 0423172

Please sign in to comment.