Skip to content

Commit

Permalink
Merge pull request #3636 from cwindolf/avg_chans_bug2
Browse files Browse the repository at this point in the history
Check for channel_indices is None
  • Loading branch information
alejoe91 authored Jan 21, 2025
2 parents d0919ad + 7bb12f0 commit 749a349
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/spikeinterface/preprocessing/average_across_direction.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ def get_traces(self, start_frame, end_frame, channel_indices):
# now, divide by the number of channels at that position
traces /= self.n_chans_each_pos

return traces[:, channel_indices]
if channel_indices is not None:
traces = traces[:, channel_indices]

return traces


# function for API
Expand Down

0 comments on commit 749a349

Please sign in to comment.