Skip to content

Preserve identity on Probe.copy()#428

Open
h-mayorquin wants to merge 1 commit intoSpikeInterface:mainfrom
h-mayorquin:fix_copy_and_deepcopy
Open

Preserve identity on Probe.copy()#428
h-mayorquin wants to merge 1 commit intoSpikeInterface:mainfrom
h-mayorquin:fix_copy_and_deepcopy

Conversation

@h-mayorquin
Copy link
Copy Markdown
Collaborator

Closes #421. Probe.copy() was dropping contact_ids, shank_ids, contact_sides, annotations, and contact_annotations; the only exclusion that was ever intentional is device_channel_indices (wiring, not identity). I fixed it by routing copy() through the existing to_dict / from_dict pair, which is already the canonical enumeration of a probe's serializable state via _dump_attr_names, and popping device_channel_indices from the intermediate dict. This gives one source of truth for what a probe "is" and means any attribute added to _dump_attr_names later will automatically round-trip through copy().

@h-mayorquin h-mayorquin marked this pull request as ready for review April 24, 2026 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Probe.copy() should preserve contact_ids

1 participant