From 4a2a5c83c8aaa14a9e75fd312077a404b003a328 Mon Sep 17 00:00:00 2001 From: chrishalcrow Date: Mon, 20 Apr 2026 16:29:57 +0100 Subject: [PATCH] frame slice sub sortings in test_sorting_s3_nwb_zarr --- .../extractors/tests/test_nwbextractors_streaming.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/spikeinterface/extractors/tests/test_nwbextractors_streaming.py b/src/spikeinterface/extractors/tests/test_nwbextractors_streaming.py index 045e7f8211..161040cbaf 100644 --- a/src/spikeinterface/extractors/tests/test_nwbextractors_streaming.py +++ b/src/spikeinterface/extractors/tests/test_nwbextractors_streaming.py @@ -224,8 +224,14 @@ def test_sorting_s3_nwb_zarr(tmp_path): # just take 3 random units to test rng = np.random.default_rng(seed=2205) three_unit_ids = rng.choice(sorting.unit_ids, size=3) - sorting_sub = sorting.select_units(unit_ids=three_unit_ids) - sorting_loaded_sub = sorting_loaded.select_units(unit_ids=three_unit_ids) + + first_spike_sample_index = 21864115 + sorting_sub = sorting.select_units(unit_ids=three_unit_ids).frame_slice( + start_frame=first_spike_sample_index, end_frame=first_spike_sample_index + 10_000 + ) + sorting_loaded_sub = sorting_loaded.select_units(unit_ids=three_unit_ids).frame_slice( + start_frame=first_spike_sample_index, end_frame=first_spike_sample_index + 10_000 + ) check_sortings_equal(sorting_sub, sorting_loaded_sub)