-
Notifications
You must be signed in to change notification settings - Fork 5
Refactor Neuropixels 2.0 probes in preparation for single-shank probes #523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
aacuevas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a couple of comments, but there are other parts where these same comments are still true.
In short, while it is in general a good abstraction effort, there are some places where separation of responsibilities is broken and the general classes include switches of the specifics, which is not a good pattern.
OpenEphys.Onix1.Design/NeuropixelsV2eProbeConfigurationDialog.cs
Outdated
Show resolved
Hide resolved
OpenEphys.Onix1.Design/NeuropixelsV2eProbeConfigurationDialog.cs
Outdated
Show resolved
Hide resolved
|
@aacuevas I have updated the implementation as we discussed, and tested it out. There is no difference in behavior, but this is definitely a cleaner separation between responsibilities, and should translate well when I add in the single-shank probe. Let me know if this looks good, and I can rebase the other branch to make use of these changes. |
d37589c to
5db06c3
Compare
aacuevas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made some comments of some things I believe should be either addressed or justified.
OpenEphys.Onix1.Design/NeuropixelsV2eChannelConfigurationDialog.cs
Outdated
Show resolved
Hide resolved
- Add Neuropixels V2 probe info interfaces and implementations - Moved all probe-specific logic from the dialog to the info class in the Design library - Update all methods/classes to handle the abstract class, with easy scalability to add single-shank probes in the future - Add clone method for NeuropixelsV2eProbeGroup to ensure that dialogs can be exited without affecting settings - Update how the ChannelMap is accessed and utilized
- Refactor file opening methods to use Type inputs instead of generics, allowing for a more flexible calling pattern - Define an abstract Clone() method for ProbeGroups instead of using reflection to construct copied classes - Brought Rhs2116 dialogs up to date with other dialogs, there were issues discovered during testing related to loading/saving files
5db06c3 to
9e56cf0
Compare
39bf25e to
cace1ba
Compare
This PR was initially a part of #493; it has been split out into this PR as well so that we can review the underlying infrastructural changes independently of the addition of the single-shank Neuropixels 2.0 probes. This is prompted by #522, which would benefit from some of these changes but we do not need the single-shank probes for #522 to be implemented.
Below are the major highlights of this PR: