ERSD time-frequency figure does not display

Hi all, I encountered an error in displaying ERSD time-frequency figures. The error feedback is this:

Error using matlab.graphics.axis.Axes/set
Error setting property 'CLim' of class 'Axes':
Value must be a 1x2 vector of numeric type in which the second element is larger than the first and
may be Inf

Error in figure_timefreq>ConfigureAxes (line 1325)
set(hAxes, 'CLim', MinMaxVal);

Error in figure_timefreq>UpdateFigurePlot (line 1056)
ConfigureAxes(hAxes, Time, FullTimeVector, Freqs, TfInfo, MinMaxVal, LowFreq);

Error in figure_timefreq (line 28)
eval(macro_method);

Error in view_timefreq (line 215)
figure_timefreq('UpdateFigurePlot', hFig);

Error in tree_callbacks>@(h,ev)view_timefreq(filenameFull,'SingleSensor') (line 1983)
gui_component('MenuItem', jPopup, [], 'One channel',
IconLoader.ICON_TIMEFREQ, [], @(h,ev)view_timefreq(filenameFull,
'SingleSensor'));

If anyone know how to solve this error, please let me know. Thanks.

Can you please zip the file and share it with us?

  • Right-click on the time-frequency file > File > Show in file explorer.
  • Zip the timefreq_...mat file + the channel_...mat file together
  • Upload the .zip file somewhere (dropbox, google drive, wetransfer...)
  • Post the download link here

Thanks

Hi Francois, please access the data files via this link:
https://www.dropbox.com/s/um51a1dv9y9pzqu/ERSD_Data.zip?dl=0
Thank you.

The problem is that you have NaN values in this TF file. You computed the TF decomposition of all the sensors instead of limiting it to the MEG sensors. The non-MEG channels do not have any values, therefore the TF power estimated with Morlet wavelets is zero everywhere, and the ERDS normalization led to a division by zero.
In the future, select only the channels you want to process in the options of the TF process, it will also produce smaller files.

I pushed a fix allowing to display this file, replacing on the fly NaN with zeros. Update Brainstorm to get this fix.
https://github.com/brainstorm-tools/brainstorm3/commit/2cf94ce47cd8f9dc8ba19c211adb4e2ffeff1a6b