Skip to content

Commit

Permalink
add breaks back to +1/-1 after before trial logic
Browse files Browse the repository at this point in the history
  • Loading branch information
robintibor committed Oct 18, 2017
1 parent f424e66 commit 1a77e49
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 853 deletions.
7 changes: 5 additions & 2 deletions braindecode/datautil/trial_segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,11 @@ def _extract_break_start_stop_ms(events, name_to_start_codes,
start_sample = event_samples[i_event]
start_code = event_codes[i_event]
assert start_code in start_code_to_name_and_y
break_starts.append(stop_sample)
break_stops.append(start_sample)
# let's start one after stop of the trial and stop one efore
# start of the trial to ensure that markers will be
# in right order
break_starts.append(stop_sample + 1)
break_stops.append(start_sample - 1)
return np.array(break_starts), np.array(break_stops)


Expand Down
Loading

0 comments on commit 1a77e49

Please sign in to comment.