diff --git a/CHANGELOG.md b/CHANGELOG.md index 76d8a8be9..226b5882b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Fixes * The `sonpy` package for the Spike2 interface no longer attempts installation on M1 Macs. [PR #563](https://github.com/catalystneuro/neuroconv/pull/563) +* Fixed `subset_sorting` to explicitly cast `end_frame` to int to avoid SpikeInterface frame slicing edge case. [PR #565](https://github.com/catalystneuro/neuroconv/pull/565) diff --git a/src/neuroconv/datainterfaces/ecephys/basesortingextractorinterface.py b/src/neuroconv/datainterfaces/ecephys/basesortingextractorinterface.py index 4a3a32e68..abe2f8928 100644 --- a/src/neuroconv/datainterfaces/ecephys/basesortingextractorinterface.py +++ b/src/neuroconv/datainterfaces/ecephys/basesortingextractorinterface.py @@ -222,7 +222,7 @@ def subset_sorting(self): if any(x) ] ) - end_frame = 1.1 * max_min_spike_time + end_frame = int(1.1 * max_min_spike_time) if self.sorting_extractor.has_recording(): end_frame = min(end_frame, self.sorting_extractor._recording.get_total_samples()) stub_sorting_extractor = self.sorting_extractor.frame_slice(start_frame=0, end_frame=end_frame)