Issue with PSD display

Hello,
I am unable to display my computed PSD files.
Below is the error i receive:
Error: Line 1021: Undefined function ‘plus’ for input arguments of type ‘cell’.
**
** Call stack:
** >figure_spectrum.m>UpdateFigurePlot at 1021
** >figure_spectrum.m at 26
** >view_spectrum.m at 163
** >tree_callbacks.m at 428
** >bst_call.m at 28
** >panel_protocols.m>CreatePanel/protocolTreeClicked_Callback at 109
**

Hello!

Indeed, there was an error in the PSD viewer for specific cases. Go ahead and update Brainstorm, I fixed it in: https://github.com/brainstorm-tools/brainstorm3/commit/5ad72882a088a12526705f5588c98d6933fdb4c0

Cheers,
Martin

1 Like

Thank you Martin. How do you recommend me implementing the code from the Git link you provided?

You can use the Update function directly from Brainstorm.

Martin

That worked. Thank you Martin.

Hello,
I am having trouble displaying a particular PSD. The coherence of this trial is running as well as other PSD’s of other trials but this particular trial is not displaying and presenting the following errors:

Attempted to access TF(59,:); index out of bounds because size(TF)=[58,1].

Error in figure_topo>GetFigureData (line 299)
                            F(i,: ) = TF(iRow(1),:);


Error in figure_topo>UpdateTopoPlot (line 101)
    [DataToPlot, Time, selChan] = GetFigureData(iDS, iFig, 0);


Error in figure_topo>PlotFigure (line 561)
    UpdateTopoPlot(iDS, iFig);


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


Error in view_topography (line 330)
isOk = figure_topo('PlotFigure', iDS, iFig, 1);


Error in
tree_callbacks>@(h,ev)view_topography(FileName,AllMod{iMod},'2DSensorCap',[],UseSmoothing,hFig)
(line 2632)
                gui_component('MenuItem', jSubMenu, [], '2D Sensor cap',
                IconLoader.ICON_TOPOGRAPHY, [], @(h,ev)view_topography(FileName,
                AllMod{iMod}, '2DSensorCap', [], UseSmoothing, hFig));

It looks like there is some mix between different files…
If you close Matlab and Brainstorm and try to display it again: do you get the same error?
If you recompute the same file: do you still get the same error?

If so, we’ll need you to share this data with us so we can debug it further (channel file+data file+PSD file), or simpler but larger: the entire the subject (right-click on subject > File > Export subject).
Zip all the files, upload the .zip file somewhere and post the link here.
Thanks

Hi Francois,
I checked the history and it appears that only one file was averaged and that is why i wasnt able to display the file. I recomputed and was able to ensure all files were included this time and it worked. Thank you for your help.
Josh

Hi, I managed to get good visualization of PSD before this. But when I tried to re-do again, the PSD appeared like this;

Is it just because of setting? Or did I miss anything here?

What do you mean with "a good visualization"?

It's okay, already figured out. Thank you Francois.

1 Like