open-ephys / plugin-GUI

Software for processing, recording, and visualizing multichannel electrophysiology data
https://open-ephys.org/gui
GNU General Public License v3.0
193 stars 684 forks source link

“Apply to all” appears to, but does not actually switch channels being recorded in the GUI and the settings.xml. #592

Open egmcbride opened 11 months ago

egmcbride commented 11 months ago

Using OpenEphys 0.6.6 and Neuropixels-PXI, we set the middle bank of channels (384-768) to be recorded by loading a saved .imro file for a single probe, and verified the signals on that probe are noticeably different in the way we expect, i.e. a clear in- to out-of-brain transition for a deep insertion.

Then after pressing “apply to all”, the new channel banks appear in the GUI to be selected on the other probes, but on closer inspection, the signals have not changed, and they are still recording from the original channels (the lowest 384). Then, when loading the .imro file for each individual probe, the signals do change in the way expected. When recording after pressing apply to all, the settings.xml file reflects what is shown in the GUI, the incorrect channels.

It would be very easy to miss this if you aren't looking closely at the signals or inspecting the raw data.

jsiegle commented 11 months ago

Thanks for posting this! It's been tricky to debug because we haven't been able to replicate this behavior on any of our dev machines. Which rig were you seeing this on? Can we run some tests on it when it's free?

bjhardcastle commented 11 months ago

A while back we found that remote configuration of the channels on this rig (NP.3) also wasn't working, where it works fine on other rigs with the same version and same HTTP request.

One obvious difference on the rig is a NI-DAQmx source in the signal chain, and a Merger with the Neuropix-PXI source - I wonder whether that could be the cause?

Edit: removing NI-DAQmx source and Merger had no effect.

egmcbride commented 11 months ago

Also, NP3 will be free this Friday afternoon (12/8) if you want to run some tests then.

jsiegle commented 11 months ago

Thanks! I'm busy on Friday, but let's try to find some time next week

jsiegle commented 11 months ago

We were able to replicate this by starting acquisition before all of the settings were done updating. This was only using 2 probes, but for 6 probes the likelihood that this would happen accidentally is much higher, since each probe takes ~2 seconds to apply its settings.

We are going to address this in two ways: by increasing the waiting period for the settings thread to exit after acquisition starts, and by adding some logging outputs that make it clear when the thread has exited early.

This will hopefully ensure that the settings get applied correctly across all probes. But just to be on the safe side, for future recordings I'd also recommend doing the following:

jsiegle commented 11 months ago

In the latest version of the Neuropixels plugin (available now), pressing the "Apply to all" button displays a progress bar until all of probe settings have been updated. It also avoids re-applying the settings for the currently active probe, which should make the update happen a little bit faster.

In addition, you can now select preset electrode configurations from a drop-down menu, so it's much easier to switch between different channel banks.

bjhardcastle commented 11 months ago

Thanks a lot Josh, the dropdown is great!

bjhardcastle commented 11 months ago

We'll update on whether the channels actually switch for us using this method.

Apparently waiting longer didn't work.