help > Error with viewing results - blank brain image, no design matrix, cannot view activation
Showing 1-2 of 2 posts
Display:
Results per page:
Nov 13, 2018  01:11 AM | Karl Velik - The Ohio State University
Error with viewing results - blank brain image, no design matrix, cannot view activation
Hello all, 

I am experiencing some trouble with viewing results in spm_fnirs. I am able to follow all the steps until estimation just fine without errors, but when it comes to results I have experienced a variety of issues.

During the results step, after submitting my SPM.mat file which has had spatial registration, temporal preprocessing, first-level specification and estimation done to it, I get many repetitions of this warning.
Warning: Duplicate data points have been detected and removed - corresponding values have been averaged.
> In griddata>useScatteredInterp (line 185)
In griddata (line 126)
In spm_fnirs_spm_interp (line 107)
In spm_fnirs_results_ui (line 31)
In spm_fnirs>push_results_Callback (line 88)
In gui_mainfcn (line 95)
In spm_fnirs (line 25)
In matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)spm_fnirs('push_results_Callback',hObject,eventdata,guidata(hObject))

Then, IF spm_fnirs_viewer_stat shows up, it shows a blank brain image. When I try to select 'Contrast', the contrast manager does not show my design matrix and so I cannot create a contrast. When I try to select 'Activation', I get the following error:
Reference to non-existent field 'ic'.

Error in spm_fnirs_viewer_stat>push_activation_Callback (line 190)
ic = handles.ic;
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in spm_fnirs_viewer_stat (line 35)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)spm_fnirs_viewer_stat('push_activation_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.

I have also had a similar situation in which spm_fnirs_viewer_stat shows a brain image with no activation but which is colored. In that case, which I am not able to replicate currently, I get error quite similar to that one listed above, which instead says something to the effect of
Reference to non-existent field 'SPM'

and takes issue with the line
SPM = handles.spm;

These errors with 'ic' and 'SPM' fields are interesting because they are not mutually exclusive, as in I will choose all the same options for steps up until Results and sometimes get the ic error, sometimes get the SPM error.

LASTLY, I also occasionally run into the following error before the spm_fnirs_viewer_stat has time to show up. This error is replicable, and shows on these conditions: choosing HRF smoothing instead of no smoothing during temporal preprocessing, or not choosing AR(1) when specifying 1st level.

Error using *
Requested 51818x51818 (20.0GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information.
Error in spm_fnirs_spm_interp (line 127)
iResSS(indx_m) = diag(kern(:, indx_m)' * ResSS(indx_s) * kern(:, indx_m));
Error in spm_fnirs_results_ui (line 31)
[SPM] = spm_fnirs_spm_interp(SPM);
Error in spm_fnirs>push_results_Callback (line 87)
spm_fnirs_results_ui;
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in spm_fnirs (line 25)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)spm_fnirs('push_results_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback 

Has anyone in the community run into similar issues? Any pointers in the right direction would be greatly appreciated. For reference, I am running the most up-to-date version of spm_fnirs with spm12 on the most recent version of R2017b, with macOS High Sierra.

Karl V.
Nov 13, 2018  09:11 PM | Karl Velik - The Ohio State University
RE: Error with viewing results - blank brain image, no design matrix, cannot view activation
Hello again,

I have noticed an additional error during estimation pointed out by my colleague. I think that this might be the source of my issues, since the estimation is not being handled correctly. This is the message I get during estimation. It looks as though the estimation is not completing all iterations before saving to SPM.mat. Any ideas?

---------------------------------------------------------
Estimate parameters for SPM-HbO analysis...
---------------------------------------------------------
Apply a temporal filter to measurements and design matrix...
Completed.

Estimate intrinsic temporal correlation...
ReML Iteration 1 : ...0.000000e+00 [+4.25]
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = -1.000000e+00.
> In spm_inv (line 30)
In spm_fnirs_spm (line 77)
In spm_fnirs_estimate_ui (line 18)
In spm_fnirs>push_estimate_Callback (line 82)
In gui_mainfcn (line 95)
In spm_fnirs (line 25)
In matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)spm_fnirs('push_estimate_Callback',hObject,eventdata,guidata(hObject))
Completed.

Estimate GLM parameters...
Completed.

Save SPM.mat...
Completed.

---------------------------------------------------------
Completed. : 16:29:16 - 13/11/2018
---------------------------------------------------------