Can't make user setup with topomap

Hi-

I am working with a MEG/EEG dataset, and would like to create a user setup with EEG and MEG time series, as well as a topographical map like the 2D disc figure. Brainstorm allows me to save such a user setup, but I am getting the following behavior when I try to use it.

  1. If I close all figures and then reopen my user setup on the same file for which it was created, the topomap figure opens but with a black background (not a huge deal).

  2. If I open my user setup on any file other than the one it was created with, brainstorm shows a dialog that says "Cannot open two continuous viewers at the same time. Unload all the other files first?" (See attached image.) If I click "cancel", I get this error:

>> Error using isempty
Not enough input arguments.

Error in figure_topo (line 27)
eval(macro_method);

Error in gui_layout>LoadSetup (line 1023)
                figure_topo('PlotFigure', iDS, iFig, 1);

Error in gui_layout>@(h,ev)LoadSetup(iSetup) (line 765)
        gui_component('MenuItem', jMenu, [], UserSetups(iSetup).Name, IconLoader.ICON_LAYOUT_CASCADE, [], @(h,ev)LoadSetup(iSetup), fontSize);

If I click "Unload other files," I get this matlab error:

>> Index exceeds the number of array elements. Index must not exceed 0.

Error in figure_topo>GetFigureData (line 307)
                    if strcmpi(GlobalData.DataSet(iDS).Figure(iFig).Id.Modality, 'MEG GRADNORM')

Error in figure_topo>GetInterpolation (line 693)
        F = GetFigureData(iDS, iFig, 1);

Error in figure_topo>PlotFigure (line 628)
        WExtrap = GetInterpolation(iDS, iFig, TopoInfo, Vertices, Faces, bfs_center, bfs_radius, chan_loc(selChan,:));

Error in figure_topo (line 27)
eval(macro_method);

Error in gui_layout>LoadSetup (line 1023)
                figure_topo('PlotFigure', iDS, iFig, 1);

Error in gui_layout>@(h,ev)LoadSetup(iSetup) (line 765)
        gui_component('MenuItem', jMenu, [], UserSetups(iSetup).Name, IconLoader.ICON_LAYOUT_CASCADE, [], @(h,ev)LoadSetup(iSetup), fontSize);

According to this page, I should be able to include topomaps in a user setup.

I have no problems creating/using user setups that do not include topomaps.

My system:
2016 15" macbook pro
Mac OS 12.1
Matlab 2021b Update 2
Brainstorm 24-Jun-2022
Dataset is 4D-Neuroimaging MEG

Thanks for your help!

Aaron

I tried to address these issues with this commit: Bugfix: User setups between different raw files · brainstorm-tools/brainstorm3@4bc5b1c · GitHub

Please update Brainstorm and let me know how it goes.
I also added the background color of the figures to the setup, you'd need to create the setups again.

Thanks for reporting this bug!

That fixed it.

Thanks Francois!!