Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PyTrack/Stimulus.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def findBlinks(self, pupil_size, gaze=None, sampling_freq=1000, concat=False, co
# Edge Case 2:
# The data starts with a blink. In this case, blink onset will be
# defined as the first missing value.
if length_blinks>0 and pupil_size[0]==-1 and blink_onset[0]>0:
if length_blinks>0 and pupil_size[0]==-1 and ((not blink_onset) or blink_onset[0]>0):
blink_onset = np.insert(blink_onset, 0, 0)

# Edge Case 3:
Expand Down