Skip to content

Commit

Permalink
Merge pull request #565 from catalystneuro/fix_subset_sorting_nonint
Browse files Browse the repository at this point in the history
Fix `subset_sorting` behavior by explicitly casting non-integer `end_frame` to int
  • Loading branch information
CodyCBakerPhD authored Sep 15, 2023
2 parents 971fb5d + 80381c9 commit 75cfc4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 75cfc4b

Please sign in to comment.