Skip to content

Conversation

@chrishalcrow
Copy link
Member

Fixes #3825.

In #3767, we decided to deprecate recording_list in favor or recording_list_or_dict, now that aggregate_channels can accept dicts. I did the deprecation at the "user level" by putting it in aggregate_channels and only allowing ChannelAggregationRecording to accept recording_list_or_dict. This creates a bug since the saving functions use the args from aggregate_channels but the load-from-provenance functions use the args from ChannelAggregationRecording. So e.g. sorting fails in #3825.

This PR fixes the bug by unifying the arguments in the function and class.

Minimal version of #3825 bug:

import spikeinterface.full as si

rec, _ = si.generate_ground_truth_recording(num_channels=2)

rec.set_property("group", [0,1])
list_of_recs = list(rec.split_by('group').values())
agg_rec = si.aggregate_channels(list_of_recs)

agg_rec.save_to_folder(folder='my_rec')
loaded_rec = si.load("my_rec/provenance.pkl", base_folder="my_rec")

@chrishalcrow chrishalcrow added bug Something isn't working core Changes to core module labels Apr 2, 2025
Copy link
Member

@zm711 zm711 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice Chris. And a test added! Looks good to me at least :)

@alejoe91 alejoe91 merged commit e9b39ef into main Apr 2, 2025
20 of 21 checks passed
@alejoe91 alejoe91 deleted the fix-sortbyproperty-args branch September 1, 2025 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core Changes to core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running into errors while trying to sort tetrode data by group

4 participants