help > Input to SVD must not contain NaN or Inf.
Showing 1-6 of 6 posts
Display:
Results per page:
Jan 29, 2020  10:01 PM | mgarlinghouse
Input to SVD must not contain NaN or Inf.
Hi Group,

Has anyone encountered this error [see below] on a Mac before?  It occurs during step 5 / 7 when importing ROI Data.  I have traditionally used a windows machine and older versions of Matlab and CONN and have not encountered this error.......?

Any thoughts on the topic are much appreciated.

Best,

Matt

----------------------------------------------------------------------------------------

Error using svd
Input to SVD must not contain NaN or Inf.

Error in pinv (line 18)
[U,S,V] = svd(A,'econ');
Error in rex>rex_do (line 746)
proj=eye(size(tdata,1))-[cov1,0*cov0]*pinv([cov1,cov0]); % removes covariates keeping scale unchanged
Error in rex (line 180)
[params.ROIdata,params.ROInames,params.ROIinfo.basis,params.ROIinfo.voxels,params.ROIinfo.files,params.ROIinfo.select,params.ROIinfo.trans]=rex_do(params,1);
Error in conn_rex (line 8)
[varargout{1:nargout}]=rex(varargin{:});
Error in conn_process (line 858)
else [data{nroi1},namesroi{nroi},params]=conn_rex(Vsourcethis,Vmask{nroi}{min(nses,nsesstemp)},'summary_measure','eigenvariate','dims',CONN_x.Setup.rois.dimensions{nroi},'conjunction_mask',mask,'level',level,'scaling',scalinglevel,'select_clusters',0,'covariates',entercovariates,'fsanatomical',fsanatomical,'output_type',outputtype,'output_rex',filenamerex,'output_folder',filepath);
Error in conn_process (line 16)
case 'setup', conn_disp(['CONN: RUNNING SETUP STEP']); conn_process([0:4,4.5,5]);
Error in conn (line 5262)
else conn_process(processname); ispending=false;
Error in conn_menumanager (line 120)
feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end});
CONN18.b
SPM12 + DEM FieldMap MEEGtools
Matlab v.2018b
project: CONN18.b
Feb 5, 2020  11:02 PM | Alfonso Nieto-Castanon - Boston University
RE: Input to SVD must not contain NaN or Inf.
Hi Matt,

That is peculiar. It may be caused by having one of your first-level covariates containing either infinite or missing values (NaN). Which first-level covariates do you have in your conn project (and how were they entered/defined)?

Best
Alfonso
Originally posted by mgarlinghouse:
Hi Group,

Has anyone encountered this error [see below] on a Mac before?  It occurs during step 5 / 7 when importing ROI Data.  I have traditionally used a windows machine and older versions of Matlab and CONN and have not encountered this error.......?

Any thoughts on the topic are much appreciated.

Best,

Matt

----------------------------------------------------------------------------------------

Error using svd
Input to SVD must not contain NaN or Inf.

Error in pinv (line 18)
[U,S,V] = svd(A,'econ');
Error in rex>rex_do (line 746)
proj=eye(size(tdata,1))-[cov1,0*cov0]*pinv([cov1,cov0]); % removes covariates keeping scale unchanged
Error in rex (line 180)
[params.ROIdata,params.ROInames,params.ROIinfo.basis,params.ROIinfo.voxels,params.ROIinfo.files,params.ROIinfo.select,params.ROIinfo.trans]=rex_do(params,1);
Error in conn_rex (line 8)
[varargout{1:nargout}]=rex(varargin{:});
Error in conn_process (line 858)
else [data{nroi1},namesroi{nroi},params]=conn_rex(Vsourcethis,Vmask{nroi}{min(nses,nsesstemp)},'summary_measure','eigenvariate','dims',CONN_x.Setup.rois.dimensions{nroi},'conjunction_mask',mask,'level',level,'scaling',scalinglevel,'select_clusters',0,'covariates',entercovariates,'fsanatomical',fsanatomical,'output_type',outputtype,'output_rex',filenamerex,'output_folder',filepath);
Error in conn_process (line 16)
case 'setup', conn_disp(['CONN: RUNNING SETUP STEP']); conn_process([0:4,4.5,5]);
Error in conn (line 5262)
else conn_process(processname); ispending=false;
Error in conn_menumanager (line 120)
feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end});
CONN18.b
SPM12 + DEM FieldMap MEEGtools
Matlab v.2018b
project: CONN18.b
Jul 10, 2020  02:07 PM | Kasia Siuda - Institut du Cerveau et de la Moelle Epiniere
RE: Input to SVD must not contain NaN or Inf.
Dear Alfonso, 

I am encountering the same issue (I copied the error message below). I am processing my data in CONN v. 17, on Mac High Sierra. 
I have realignment, QA_timeseries and scrubbing as first level covariates.
I entered them using CONN GUI.
I checked the first level covariates in the subject where this error occured, and I don't see any NaNs ot Infs.

One precision regarding my current set up. A reviewer asked me to perform test-retest reliability measurements on my data set. I have only one resting state session so I decided to cut this session in half, enter the two halves into a new CONN project as session 1 and session 2, perform the first and second level analysis as in my initial project, and correlate the second level maps from the first and the second session. High correlations would implicate reliability. 
I have 200 volumes, so I cut in half the preprocessed (swauf*) nifti files, the rp*.txt files (realignment), the art_regression_outliers_auf*mat (scrubbing) and the art_regression_timeseries_auf*mat (QA). The resulting files have 100 volumes/rows each. I have then entered the cut files to a new CONN project via GUI. 

I'd be very grateful for your help.

I'm getting the following error message:
ERROR DESCRIPTION:

Error using svd
Input to SVD must not contain NaN or Inf.
Error in pinv (line 18)
[U,S,V] = svd(A,'econ');
Error in rex>rex_do (line 729)
proj=eye(size(tdata,1))-[cov1,0*cov0]*pinv([cov1,cov0]); % removes covariates keeping scale unchanged
Error in rex (line 179)
[params.ROIdata,params.ROInames,params.ROIinfo.basis,params.ROIinfo.voxels,params.ROIinfo.files,params.ROIinfo.select,params.ROIinfo.trans]=rex_do(params,1);
Error in conn_rex (line 8)
[varargout{1:nargout}]=rex(varargin{:});
Error in conn_process (line 815)
[data{nroi1},namesroi{nroi},params]=conn_rex(Vsourcethis,Vmask{nroi}{min(nses,nsesstemp)},'summary_measure','eigenvariate','dims',CONN_x.Setup.rois.dimensions{nroi},'conjunction_mask',mask,'level',level,'scaling',scalinglevel,'select_clusters',0,'covariates',entercovariates,'fsanatomical',fsanatomical,'output_type',outputtype,'output_rex',filenamerex,'output_folder',filepath);
Error in conn_process (line 16)
case 'setup', disp(['CONN: RUNNING SETUP STEP']); conn_process([0:4,4.5,5]);
Error in conn (line 4439)
else conn_process('setup'); ispending=false;
Error in conn_menumanager (line 120)
feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end});
CONN v.17.f
SPM12 + DEM FieldMap MEEGtools
Matlab v.2017b
storage: 310.9Gb available
spm @ /Users/k.siudakrzywicka/Desktop/tools/spm12
conn @ /Users/k.siudakrzywicka/Desktop/tools/conn
Jul 11, 2020  12:07 PM | Kasia Siuda - Institut du Cerveau et de la Moelle Epiniere
RE: Input to SVD must not contain NaN or Inf.
Dear all, I figured out the issue: there were indeed NaNs in my rp*.txt files, just on in the subjects where CONN reported an error. 
The NaNs resulted from a bug in matlab's readable function. Check your files carefully if you use it!

Have a nice weekend, Kasia
Originally posted by Kasia Siuda:
Dear Alfonso, 

I am encountering the same issue (I copied the error message below). I am processing my data in CONN v. 17, on Mac High Sierra. 
I have realignment, QA_timeseries and scrubbing as first level covariates.
I entered them using CONN GUI.
I checked the first level covariates in the subject where this error occured, and I don't see any NaNs ot Infs.

One precision regarding my current set up. A reviewer asked me to perform test-retest reliability measurements on my data set. I have only one resting state session so I decided to cut this session in half, enter the two halves into a new CONN project as session 1 and session 2, perform the first and second level analysis as in my initial project, and correlate the second level maps from the first and the second session. High correlations would implicate reliability. 
I have 200 volumes, so I cut in half the preprocessed (swauf*) nifti files, the rp*.txt files (realignment), the art_regression_outliers_auf*mat (scrubbing) and the art_regression_timeseries_auf*mat (QA). The resulting files have 100 volumes/rows each. I have then entered the cut files to a new CONN project via GUI. 

I'd be very grateful for your help.

I'm getting the following error message:
ERROR DESCRIPTION:

Error using svd
Input to SVD must not contain NaN or Inf.
Error in pinv (line 18)
[U,S,V] = svd(A,'econ');
Error in rex>rex_do (line 729)
proj=eye(size(tdata,1))-[cov1,0*cov0]*pinv([cov1,cov0]); % removes covariates keeping scale unchanged
Error in rex (line 179)
[params.ROIdata,params.ROInames,params.ROIinfo.basis,params.ROIinfo.voxels,params.ROIinfo.files,params.ROIinfo.select,params.ROIinfo.trans]=rex_do(params,1);
Error in conn_rex (line 8)
[varargout{1:nargout}]=rex(varargin{:});
Error in conn_process (line 815)
[data{nroi1},namesroi{nroi},params]=conn_rex(Vsourcethis,Vmask{nroi}{min(nses,nsesstemp)},'summary_measure','eigenvariate','dims',CONN_x.Setup.rois.dimensions{nroi},'conjunction_mask',mask,'level',level,'scaling',scalinglevel,'select_clusters',0,'covariates',entercovariates,'fsanatomical',fsanatomical,'output_type',outputtype,'output_rex',filenamerex,'output_folder',filepath);
Error in conn_process (line 16)
case 'setup', disp(['CONN: RUNNING SETUP STEP']); conn_process([0:4,4.5,5]);
Error in conn (line 4439)
else conn_process('setup'); ispending=false;
Error in conn_menumanager (line 120)
feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end});
CONN v.17.f
SPM12 + DEM FieldMap MEEGtools
Matlab v.2017b
storage: 310.9Gb available
spm @ /Users/k.siudakrzywicka/Desktop/tools/spm12
conn @ /Users/k.siudakrzywicka/Desktop/tools/conn
Sep 5, 2020  07:09 PM | Aishvarya Shri Rajasimman - AIIMS, Bhubaneswar
RE: Input to SVD must not contain NaN or Inf.
Originally posted by mgarlinghouse:
Hi Group,

Has anyone encountered this error [see below] on a Mac before?  It occurs during step 5 / 7 when importing ROI Data.  I have traditionally used a windows machine and older versions of Matlab and CONN and have not encountered this error.......?

Any thoughts on the topic are much appreciated.

Best,

Matt

----------------------------------------------------------------------------------------

Error using svd
Input to SVD must not contain NaN or Inf.

Error in pinv (line 18)
[U,S,V] = svd(A,'econ');
Error in rex>rex_do (line 746)
proj=eye(size(tdata,1))-[cov1,0*cov0]*pinv([cov1,cov0]); % removes covariates keeping scale unchanged
Error in rex (line 180)
[params.ROIdata,params.ROInames,params.ROIinfo.basis,params.ROIinfo.voxels,params.ROIinfo.files,params.ROIinfo.select,params.ROIinfo.trans]=rex_do(params,1);
Error in conn_rex (line 8)
[varargout{1:nargout}]=rex(varargin{:});
Error in conn_process (line 858)
else [data{nroi1},namesroi{nroi},params]=conn_rex(Vsourcethis,Vmask{nroi}{min(nses,nsesstemp)},'summary_measure','eigenvariate','dims',CONN_x.Setup.rois.dimensions{nroi},'conjunction_mask',mask,'level',level,'scaling',scalinglevel,'select_clusters',0,'covariates',entercovariates,'fsanatomical',fsanatomical,'output_type',outputtype,'output_rex',filenamerex,'output_folder',filepath);
Error in conn_process (line 16)
case 'setup', conn_disp(['CONN: RUNNING SETUP STEP']); conn_process([0:4,4.5,5]);
Error in conn (line 5262)
else conn_process(processname); ispending=false;
Error in conn_menumanager (line 120)
feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end});
CONN18.b
SPM12 + DEM FieldMap MEEGtools
Matlab v.2018b
project: CONN18.b


Dear Matt,

I ran into the same problem. I'm using conn standalone version. If you have found the solution, kindly guide us! :)


"
CONN: RUNNING SETUP STEP
Step 1/7: Checking data completeness
Checking if data files have been edited or moved. Please wait...
Step 2/7: Segmentation
Step 3/7: Importing conditions/covariates
Step 4/7: Importing functional data
Step 5/7: Importing ROI data
ERROR DESCRIPTION:

Error using svd
Input to SVD must not contain NaN or Inf.
Error in pinv (line 18)
Error in rex>rex_do (line 746)
Error in rex (line 180)
Error in conn_rex (line 8)
Error in conn_process (line 858)
Error in conn_process (line 16)
Error in conn (line 5262)
Error in conn_menumanager (line 120)
CONN18.b
SPM compiled
Matlab v.2018b
project: CONN18.b
storage: 214.4Gb available
ans =logical1 "


Regards,
Aishvarya
May 24, 2022  07:05 PM | sschoeneman27
RE: Input to SVD must not contain NaN or Inf.
Hi All,

   I am also having this error and have thoroughly checked the regressor tsv files for any NaN's and cannot find any, so I am confused why this error continues to result. I also did not find infinite number either.

Best,
Sam Patel