Skip to content

Commit 05ee34f

Browse files
committed
do a frame_slice on subsortings
1 parent 8d3e274 commit 05ee34f

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/spikeinterface/extractors/tests/test_nwbextractors_streaming.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,17 @@ def test_sorting_s3_nwb_zarr(tmp_path):
220220

221221
# test to/from dict
222222
sorting_loaded = load(sorting.to_dict())
223-
224223
# just take 3 random units to test
225224
rng = np.random.default_rng(seed=2205)
226225
three_unit_ids = rng.choice(sorting.unit_ids, size=3)
227-
sorting_sub = sorting.select_units(unit_ids=three_unit_ids)
228-
sorting_loaded_sub = sorting_loaded.select_units(unit_ids=three_unit_ids)
226+
227+
first_spike_sample_index = 21864115
228+
sorting_sub = sorting.select_units(unit_ids=three_unit_ids).frame_slice(
229+
start_frame=first_spike_sample_index, end_frame=first_spike_sample_index + 10_000
230+
)
231+
sorting_loaded_sub = sorting_loaded.select_units(unit_ids=three_unit_ids).frame_slice(
232+
start_frame=first_spike_sample_index, end_frame=first_spike_sample_index + 10_000
233+
)
229234

230235
check_sortings_equal(sorting_sub, sorting_loaded_sub)
231236

0 commit comments

Comments
 (0)