Skip to content

Commit

Permalink
oups
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 committed Jul 8, 2024
1 parent 2d09eb5 commit 8bfc520
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/spikeinterface/core/segmentutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,20 +191,20 @@ def get_traces(self, start_frame, end_frame, channel_indices):
seg_start = self.cumsum_length[i]
if i == i0:
# first
end_frame = rec_seg.get_num_samples()
traces_chunk = rec_seg.get_traces(start_frame - seg_start, end_frame, channel_indices)
end_frame_ = rec_seg.get_num_samples()
traces_chunk = rec_seg.get_traces(start_frame - seg_start, end_frame_, channel_indices)
all_traces.append(traces_chunk)
elif i == i1:
# last
if (end_frame - seg_start) > 0:
start_frame = 0
traces_chunk = rec_seg.get_traces(start_frame, end_frame - seg_start, channel_indices)
start_frame_ = 0
traces_chunk = rec_seg.get_traces(start_frame_, end_frame - seg_start, channel_indices)
all_traces.append(traces_chunk)
else:
# in between
start_frame = 0
end_frame = rec_seg.get_num_samples()
traces_chunk = rec_seg.get_traces(start_frame, end_frame, channel_indices)
start_frame_ = 0
end_frame_ = rec_seg.get_num_samples()
traces_chunk = rec_seg.get_traces(start_frame_, end_frame_, channel_indices)
all_traces.append(traces_chunk)
traces = np.concatenate(all_traces, axis=0)

Expand Down

0 comments on commit 8bfc520

Please sign in to comment.