cbrnr / mnelab

MNELAB – a GUI for MNE
BSD 3-Clause "New" or "Revised" License
239 stars 69 forks source link

ERDS plots not working, fix needed with newer MNE #381

Closed jfrey-xx closed 1 year ago

jfrey-xx commented 1 year ago

Hello,

I am following the tutorial to plot ERDS, but the dialog "Calculating ERDS maps..." takes forever... and never ends. This happens on W10 with 0.8.6 as well as un Ubuntu 20.04 with 0.8.5 and 0.8.0 (what I could test with my older python there). After some debugging I found out that there is an error upon execution of the underlying MNE command (an error hidden by the use of the dialog in the GUI). baseline appears to now be a tuple, and not a list anymore, at least with mne 1.4.0 that is installed on both my systems. If I change baseline=[dialog.b1, dialog.b2] to baseline=(dialog.b1, dialog.b2) in plot_erds now everything works fine. I also changed it in plot_erds_topomaps, even though I did not test this one.

The change is trivial but I guess you might need some workarounds to handle different MNE versions, and possibly this change is necessary in other parts of the tool -- which is very handy to get to know MNE :)

Hope it helps!

Edit: the change in MNE might be circa https://github.com/mne-tools/mne-python/commit/64dff6189215cbead61db81d6e6de811a05633e3

jfrey-xx commented 1 year ago

I did some more tests, current plot works with MNE 1.0.0 but fails starting 1.1.0, the fix works with 1.0.0. Trivial PR about to come up ^^