Skip to content

Commit

Permalink
require stim offset to define epoch (#529)
Browse files Browse the repository at this point in the history
Co-authored-by: Tom Chartrand <[email protected]>
  • Loading branch information
MatthewAitken and tmchartrand authored Aug 23, 2021
1 parent 1129819 commit dc4ade5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ipfx/epochs.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def get_stim_epoch(i, test_pulse=True):
if test_pulse:
di_idx = di_idx[2:] # drop the first up/down (test pulse) if present

if len(di_idx) == 0: # if no stimulus is found
if len(di_idx) < 2: # if no stimulus is found
return None

start_idx = di_idx[0] + 1 # shift by one to compensate for diff()
Expand Down

0 comments on commit dc4ade5

Please sign in to comment.