Skip to content

Commit

Permalink
Merge pull request #3230 from JoeZiminski/handle_none_in_noise_generator
Browse files Browse the repository at this point in the history
Add check for None in 'NoiseGeneratorRecordingSegment' get_traces().
  • Loading branch information
alejoe91 authored Sep 5, 2024
2 parents a8853d3 + 17736ad commit 584c2ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/spikeinterface/core/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,12 @@ def get_traces(
end_frame: int | None = None,
channel_indices: list | None = None,
) -> np.ndarray:

if start_frame is None:
start_frame = 0
if end_frame is None:
end_frame = self.get_num_samples()

start_frame_within_block = start_frame % self.noise_block_size
end_frame_within_block = end_frame % self.noise_block_size
num_samples = end_frame - start_frame
Expand Down

0 comments on commit 584c2ae

Please sign in to comment.