Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,17 @@ def test_sorting_s3_nwb_zarr(tmp_path):

# test to/from dict
sorting_loaded = load(sorting.to_dict())

# 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)

Expand Down
Loading