-
Notifications
You must be signed in to change notification settings - Fork 0
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
Neuropix configuration #1
Conversation
- This only applies to the BNO that is not operated in passthrough mode - Set port voltage and refresh devices from the editor - Disable buttons during acquisition - Update header to match variable name
- Correctly read/write bytes that are I2C addresses - Correctly stream BNO data - Switch order of processing; frame distribution is quickly processed on the DataThread, then process frames in individual device threads
- Added checks during Read/WriteBytes for invalid return codes
…rce into bno-addition
authored by @aacuevas
- Much of the code is pulled from the neuropixels-pxi plugin, and modified for use with Onix1 classes
- All settings now directly reference the device the settings are saved in, to minimize the possibility of error with needing to manually update settings inside the canvas itself - Renamed variables / methods where needed for clarity - Removed extraneous variables and methods - Save the passthrough Toggle editor so it can be manipulated more easily
- Remove tabs in the canvas when rescanning the device table - Connect the probe settings in the canvas to the Npxv1e device, and update these settings before starting acquisition
- Use PathParameters to track the path used for calibration files of Neuropixels probes - Change size of the viewport to minimize the appearance of scrollbars - Add DeviceList.h
- Change the editor button from "Rescan" to "Scan"
- Fixed some enum class underlying types - Added helper methods to find the gain / reference of Npx probes
- Each OnixDevice must now implement a method that adds the sourceBuffers and correctly assigns them to their respective internal pointer - When updating Settings, clear the buffers and only add back the devices that are enabled to ensure that the buffers are indexed correctly
- Instead of spawning a new thread for every device, have one thread that is dedicated to reading frames, and another thread that is dedicated to adding data to buffers
- Now that individual devices are not threaded, no need to keep the inheritance - Remove unnecessary NeuropixComponents.cpp file - Small optimizations: Convert raw pointers to unique_ptrs where possible, change the order when stopping acquisition so that streaming frames are stopped before reading frames stops, clear all portTabs when resetting the canvas, remove extraneous variables / methods
- The device table will only be scanned when the user presses Scan - Related: The plugin will not report it is connected to hardware until Scan has been pressed
- Instead of Scan, there is a Connect button that when pressed will connect to Onix hardware, and then it will be labelled as Disconnect - Disconnecting sets the port voltage to zero - In the plugin destructor, the port voltage is also set to zero
- Shows options for both ports - Added combo box for available headstages - Removed the voltage value from automatically appearing, added a tooltip indicating that it is a voltage override
…tage discovery - Moves the port voltage modifications, and checking the link state, to the new PortController class - Add macros for checking the results of register read/writes to OnixDevice - Ensures that the context is reset correctly so that devices stream data - Automated port voltage discovery uses the same logic as OpenEphys.Onix1 - Changed the order of operations during stopAcquisition so that bad frames aren't read due to the context resetting - Fixed an issue where PathParameters were being set with a value other than the default
Ill be adding comments here as a work with this library. |
When acquisition starts, a modal window pops up indicating that the neuropixels are being "updated". It should really say that calibration data is being loaded to the headstagage and I would like a progress bar instead of the barbershop poll thing. |
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.
Overall on the right track. I put individual comments that need to be addressed and several new issues. The biggest concern i have right now is actually performance. We need this to be at least as performant as the PXI plugin (e.g. with respect to plotting data). Is #20 a problem with the LFP viewer or this plugin's interaction with the LFP viewer?
- Wrap ONI context in its own class - Update text when writing calibration files to Neuropixels_1 - Show explicit progress bar instead of infinite bar when writing calibration files - Ensure that AP/LFP data is converted correctly based on current gains
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.
Approved during video call.
This is a draft PR so that we can start picking and choosing which features to carry over when we scrap this plugin and start over. The main feature in this PR is porting over the Neuropixels Canvas so that users can choose which channels are active, as well as all of the usual gain settings. There are significant changes made compared to how the
neuropixels-pxi
plugin is configured due to the fact that we do not use the Neuropixels API, nor do we use the Basestations and other NPX-specific hardware. This is simply a port of the look-and-feel of the canvas.This is still a work-in-progress and is not guaranteed to be fully functional; it is a proof of concept for gaining knowledge on what is needed to build this again in a new plugin.
Edit:
These changes have reached a mostly stable point, with edits to the editor, addition of a canvas, and a much more robust read/distribute frame infrastructure. This is now ready to be reviewed, and merged into main before continuing the regular development cycle of creating issues and then creating individual branches to fix specific issues.