Sync Actions Between Two MNE QT Browsers

Hi there,

I have a fairly complex workflow I am trying to re-implement from EEGLAB. It involves having two of the MNE QT Browsers open at once. One with component data (ICA of some sort), and a second with scalp data. Ideally, as you page through data in the first (the parent) it does the same paging in the second (the child).

I’d just like to check if this is already a feature, or if there is some easy way to do message passing between figures that I have missed before I do anything major.

Thanks!
Tyler

1 Like

Hello,

No, I don’t think this feature exists.
You will have to dig through the code of MNEQtBrowser here to link 2 instances. I’m a bit worried about the handling of the event loop.
Good luck, and don’t hesitate to contribute your design/code later!

Mathieu

1 Like

Indeed it’s not implemented. It would be great if someone volunteered to add this to our GUIs, as it would be very powerful. See for example how we’ve thought about it for other GUIs for GSoC:

1 Like

I was thinking about doing something with sockets, i.e. sending information during change events from the QT side of things.

Any plot that is hooked into the same socket would be in a sort of “listen” mode.

I don’t have a problem making changes to the MNEQtBrowser class, but I think I would prefer to extend it such that I can have some slightly different constructor methods for starting plots in “listen” mode.

Is there a reference as to how these objects are called? Typically I do something like this in a notebook:

import mne
mne.viz.set_browser_backend('qt')
%matplotlib qt
mne.viz.plot_raw(ll_state.raw, theme='light')

But that’s not an explicit call to MNEQtBrowser. Ideally I could do something like TylerQtBrowserTest if you know what I mean…