From 66efe57a8dda7bb33b2585f80c8715bc3d91998c Mon Sep 17 00:00:00 2001 From: michael asghar Date: Thu, 3 Mar 2016 21:58:32 +0000 Subject: [PATCH 1/2] Fixes length issue, specific to somato-pRF stuff. Unchecked on visual --- mrLoadRet/Plugin/pRF/pRFFit.m | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mrLoadRet/Plugin/pRF/pRFFit.m b/mrLoadRet/Plugin/pRF/pRFFit.m index 1302dde12..5a40e041f 100644 --- a/mrLoadRet/Plugin/pRF/pRFFit.m +++ b/mrLoadRet/Plugin/pRF/pRFFit.m @@ -372,7 +372,12 @@ % create the model for each concat for i = 1:fitParams.concatInfo.n % get model response - nFrames = fitParams.concatInfo.runTransition(i,2); + % nFrames = fitParams.concatInfo.runTransition(i,2); + % MA- Error with sizes of thisModelResponse and thisTSeries not being equal + % during the loop. Not sure if this is right, haven't looked at overall + % code. Problem with scaling now... + % MA- Fixed! Issue was in pRF_somatoPlot, removed +1 and it works fine. + nFrames = length(fitParams.concatInfo.runTransition(i,1):fitParams.concatInfo.runTransition(i,2)); thisModelResponse = convolveModelWithStimulus(rfModel,fitParams.stim{i},nFrames); % get a model hrf @@ -400,7 +405,7 @@ % check here for length if length(thisTSeries) ~= length(thisModelResponse) disp(sprintf('(pRFFit:getModelResidual) Voxel tSeries length of %i does not match model length of %i. This can happen, for instance, if the tSense factor was not set correctly or junk frames was not set correctly.',length(thisTSeries),length(thisModelResponse))); - keyboard + %keyboard end r(i) = corr(thisTSeries(:),thisModelResponse(:)); From f1043083c136cb80656a3ecee676707e6ae85ded Mon Sep 17 00:00:00 2001 From: michael asghar Date: Fri, 15 Jul 2016 20:32:28 +0100 Subject: [PATCH 2/2] rejects previous changes --- mrLoadRet/Plugin/pRF/pRFFit.m | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/mrLoadRet/Plugin/pRF/pRFFit.m b/mrLoadRet/Plugin/pRF/pRFFit.m index 5a40e041f..1302dde12 100644 --- a/mrLoadRet/Plugin/pRF/pRFFit.m +++ b/mrLoadRet/Plugin/pRF/pRFFit.m @@ -372,12 +372,7 @@ % create the model for each concat for i = 1:fitParams.concatInfo.n % get model response - % nFrames = fitParams.concatInfo.runTransition(i,2); - % MA- Error with sizes of thisModelResponse and thisTSeries not being equal - % during the loop. Not sure if this is right, haven't looked at overall - % code. Problem with scaling now... - % MA- Fixed! Issue was in pRF_somatoPlot, removed +1 and it works fine. - nFrames = length(fitParams.concatInfo.runTransition(i,1):fitParams.concatInfo.runTransition(i,2)); + nFrames = fitParams.concatInfo.runTransition(i,2); thisModelResponse = convolveModelWithStimulus(rfModel,fitParams.stim{i},nFrames); % get a model hrf @@ -405,7 +400,7 @@ % check here for length if length(thisTSeries) ~= length(thisModelResponse) disp(sprintf('(pRFFit:getModelResidual) Voxel tSeries length of %i does not match model length of %i. This can happen, for instance, if the tSense factor was not set correctly or junk frames was not set correctly.',length(thisTSeries),length(thisModelResponse))); - %keyboard + keyboard end r(i) = corr(thisTSeries(:),thisModelResponse(:));