open-ephys / bonsai-onix1

Bonsai library for the Open Ephys Onix Acquisition System
https://open-ephys.github.io/onix1-bonsai-docs
MIT License
4 stars 3 forks source link

Neuropixels V1e and V2e file parsing in the Design library #232

Closed bparks13 closed 3 weeks ago

bparks13 commented 1 month ago

For NeuropixelsV1e and NeuropixelsV2e, there are several files that need to be parsed when running the workflow for proper data acquisition.

In the GUIs, we would like to parse these files and display relevant information to the user graphically, but currently the parsing functions can throw exceptions that shut down the GUI immediately. To fix this, we need to create some NeuropixelsVXCalibrationFile.Validate methods that take in the filepath, and return true or false without throwing an exception. If the files pass these validation tests, we can pass to the parsers without fear of an exception being thrown.

From @jonnew: "basically we want to define rigid schemas for each type of file. These can be nothrow style functions that just catch exceptions and return true or false if a file can be parsed correctly."

bparks13 commented 1 month ago

For NeuropixelsV1e, this commit shows the additional ADC tab and calibration file serial numbers, a well as how they are handled. Once the validation methods are set, add these visual elements back into the GUI

bparks13 commented 1 month ago

This is related to #228

bparks13 commented 4 weeks ago

Instead of creating two different methods (one to validate, the other to parse), combine it all into one method and make it a TryParse() method for the whole file. Return a boolean, and then use out to return the output variable if the parsing is valid.