Hi,
I am running into an error with fast_selxavg3 (NaN values in XtX). Other have people reported similar problems on the mailing list and I've tried implementing some of the suggestions (namely, using -nowhiten and checking that all events exist in my paradigm file), but I can't get rid of the error.
I have an event-related design with very short events (duration of 1 screen refresh = 16.6ms) presented at random intervals. The error only occurs for the -gammafit and -spmhrf analyses and not for -fir. When I check the Xtmp.mat there are indeed NaNs in the first 2 columns of the X matrix. The commands I issue and the output of bugr are below.I attach the paradigm file from one run of the experiment (there are 5 runs in all but I started focusing on just one in order to troubleshoot). TR=2 and numTRs=172.
Any help would be much appreciated.
Thanks in advance,
Leila
mkanalysis-sess -fsd bold -surface fsaverage lh -fwhm 3 -event-related -paradigm VRpara.para -nconditions 1 -gammafit 2.25 1.25 -TR 2 -refeventdur 0.016 -polyfit 2 -mcextreg -analysis TargDist-gammafit-sm3.lh -per-run -rlf runlist -force -nowhiten
mkcontrast-sess -analysis TargDist-gammafit-sm3.lh -contrast VR -a 1
selxavg3-sess -s $subj -analysis TargDist-gammafit-sm3.lh
Error message:
-------------------------
$Id: fast_selxavg3.m,v 1.100.2.2 2012/11/30 18:40:38 greve Exp $
/APPLICATIONS/freesurfer/fsfast/toolbox/fast_selxavg3.m
/APPLICATIONS/freesurfer/fsfast/toolbox/fast_ldanaflac.m
/APPLICATIONS/freesurfer/matlab/MRIread.m
-------------------------
outtop = /Volumes/LEILA_DATA/fMRI/Rodika/EEG_IRMF
Extension format = nii.gz
1 VR.mat
nruns = 1
autostimdur =
outanadir = /Volumes/LEILA_DATA/fMRI/Rodika/EEG_IRMF/BT/bold/TargDist-gammafit-sm3.lh
Found 149786/163842 (91.4) voxels in mask
Creating Design Matrix
... creation time = 0.005 sec
DoMCFit = 1
ntptot = 172, nX = 7, DOF = 165
Saving X matrix to /Volumes/LEILA_DATA/fMRI/Rodika/EEG_IRMF/BT/bold/TargDist-gammafit-sm3.lh/Xtmp.mat
Error using svd
Input to SVD must not contain NaN or Inf.
Error in cond (line 36)
s = svd(A);
Error in fast_selxavg3 (line 279)
XCond = cond(XtX);
>> ------------------------------------------
ERROR: fast_selxavg3() failed\n
Output of bugr:
---------------------------------------------------------------------
FREESURFER_HOME: /APPLICATIONS/freesurfer
Build stamp: freesurfer-Darwin-lion-stable-pub-v5.2.0
Kernel info: Darwin 12.0.0 x86_64
---------------------------------------------------------------------