Probe refactoring with wiring#4548
Open
h-mayorquin wants to merge 33 commits into
Open
Conversation
Collaborator
Author
|
From the discussion today with @samuelgarcia
|
alejoe91
reviewed
May 27, 2026
Comment on lines
+1162
to
+1170
| if "probegroup" in dic: | ||
| from probeinterface import ProbeGroup | ||
|
|
||
| probegroup = ProbeGroup.from_dict(dic["probegroup"]) | ||
| # The `wiring` per-channel property was restored above by the standard | ||
| # property-load loop; we just attach the probegroup object. | ||
| extractor._probegroup = probegroup | ||
| elif "contact_vector" in dic.get("properties", {}): | ||
| _restore_probegroup_from_legacy_contact_vector(extractor) |
Member
There was a problem hiding this comment.
this should not be in base, since it's specific to the BaseRecordingSnippets
alejoe91
reviewed
May 27, 2026
| return extractor | ||
|
|
||
|
|
||
| def _restore_probegroup_from_legacy_contact_vector(extractor) -> None: |
alejoe91
reviewed
May 27, 2026
| key_to_int = {k: i for i, k in enumerate(unique_keys)} | ||
| groups = np.array([key_to_int[k] for k in group_keys_per_channel], dtype="int64") | ||
|
|
||
| target.set_property("location", locations) |
Member
There was a problem hiding this comment.
As part of this effort, I think we should get rid of the location property and only keep back-compatibility to re-intantiate a probe object
alejoe91
reviewed
May 27, 2026
Comment on lines
+411
to
+412
| # when a probe is attached, derive groups on the fly from the `wiring` | ||
| # property + probegroup state (probe_id + shank_ids + contact_sides) |
Member
There was a problem hiding this comment.
Why do we need to do this on the fly? I think that the current implementation of setting the group property based on some group_mode (auto, by_probe, by_side, etc.) was explicit and clear. No?
alejoe91
reviewed
May 27, 2026
| """ | ||
|
|
||
| _main_properties = ["group", "location", "gain_to_uV", "offset_to_uV"] | ||
| _main_properties = ["group", "location", "wiring", "gain_to_uV", "offset_to_uV"] |
Member
There was a problem hiding this comment.
Suggested change
| _main_properties = ["group", "location", "wiring", "gain_to_uV", "offset_to_uV"] | |
| _main_properties = ["group", "wiring", "gain_to_uV", "offset_to_uV"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
More ambitious, more complete, greater, faster, stronger.
See: #4553