brainstorm-tools / brainstorm3

Brainstorm software: MEG, EEG, fNIRS, ECoG, sEEG and electrophysiology
http://neuroimage.usc.edu/brainstorm
GNU General Public License v3.0
384 stars 162 forks source link

bugfix when display scout time series with a time series already open #705

Closed Edouard2laire closed 6 months ago

Edouard2laire commented 6 months ago

Hello,

This fix a bug that has been annoying me for years :)

To reproduce:

The second visualize time-course click results in an error if you don't close the previously opened time course. This PR fixes that and allows adding a new time course in the window without closing it first.

Here is the error that get fixed:

***************************************************************************
** Error: Line 63:  strcmp
** Inputs must be the same size or either one can be a scalar.
** 
** Call stack:
** >file_compare.m at 63
** >bst_figures.m>CreateFigure at 148
** >bst_figures.m at 59
** >view_timeseries_matrix.m at 152
** >view_scouts.m at 662
** >panel_scout.m>ViewTimeSeries at 3790
** >bst_call.m at 28
** >panel_scout.m>@(h,ev)bst_call(@ViewTimeSeries) at 91
** 
***************************************************************************

The only eventual issue with this fix, is that it is opening a new time-course viewer instead of reusing the previous one; but I guess this is better than an error :)

rcassani commented 6 months ago

@Edouard2laire, The proposed change was merged, as it could improve the comparison of file cells when different size.


However, regarding the bug, I tried with the steps above, and the second click opens a new time-series figure with two time series: Scout-File1 in green and Scout-File2 in red. For the steps 2, I'm using the button iconTSDisplay in the Scout tab.

Edouard2laire commented 6 months ago

tried with th

However, regarding the bug, I tried with the steps above, and the second click opens a new time-series figure with two time series: Scout-File1 in green and Scout-File2 in red. For the steps 2, I'm using the button iconTSDisplay in the Scout tab.

yes, me too. Did you selected file overlay in the time-series option ?

rcassani commented 6 months ago

yes, me too. Did you selected file overlay in the time-series option ?

Yup. Tried with links and with full source maps. With files with same Comment and with different one. All my tests where in the master branch, I guess yours as well