open-cogsci / datamatrix

An intuitive, Pythonic way to work with tabular data
https://pydatamatrix.eu/
GNU General Public License v3.0
25 stars 10 forks source link

_blink_points() now finds blinks after a long one #18

Closed JulietaLaurino closed 1 year ago

JulietaLaurino commented 1 year ago

I have changed _blink_points() in order not to return None if the blink is too long (which means no more blinks). Now, if the blink is too long, it searches for blinks in the remaining trace (vtrace[iend:]) and if it finds one, it corrects the indexes by adding the iend.

smathot commented 1 year ago

Thanks for this! I included the fix, added a small extra fix to it, and added testcases.