help
help > Batch Condition Setup
Feb 10, 2016 02:02 AM | Bob Kraft
Batch Condition Setup
I am trying to write a batch script for resting state fMRI acquired
at different sessions. The snippet of code that I use to
setup the conditions is at the end of this post. I am
expecting to see the conditions in the CONN 15.h GUI to look like a
2x2 identity matrix where
Condition Session Onset Duration Session Onset Duration
pre 1 0 inf 2 [] []
post 1 [] [] 2 0 inf
After I run the CONN batch setup and load the project into the GUI. The Onsets and Durations for all conditions and sessions are set to 0 and inf. Please let me know what I am doing wrong or suggestions on how to debug the problem.
Thanks for your help,
Bob
for iiSession=1:nSessions
%
% Functional Images
%
batch.Setup.functionals{1}{iiSession} = fullfile(preprocDir, sprintf('%d_%s',iiSession,'bold2Mni_bold.nii'));
for iiCondition=1:nConditions
if iiCondition == iiSession
batch.Setup.conditions.onset{iiCondition}{1}{iiSession} = 0; % Condition{nCondition}{nSubject}{nSessions}
batch.Setup.conditions.durations{iiCondition}{1}{iiSession} = inf;
else
batch.Setup.conditions.onset{iiCondition}{1}{iiSession} = []; % Condition{nCondition}{nSubject}{nSessions}
batch.Setup.conditions.durations{iiCondition}{1}{iiSession} = [];
end
end
end
Condition Session Onset Duration Session Onset Duration
pre 1 0 inf 2 [] []
post 1 [] [] 2 0 inf
After I run the CONN batch setup and load the project into the GUI. The Onsets and Durations for all conditions and sessions are set to 0 and inf. Please let me know what I am doing wrong or suggestions on how to debug the problem.
Thanks for your help,
Bob
for iiSession=1:nSessions
%
% Functional Images
%
batch.Setup.functionals{1}{iiSession} = fullfile(preprocDir, sprintf('%d_%s',iiSession,'bold2Mni_bold.nii'));
for iiCondition=1:nConditions
if iiCondition == iiSession
batch.Setup.conditions.onset{iiCondition}{1}{iiSession} = 0; % Condition{nCondition}{nSubject}{nSessions}
batch.Setup.conditions.durations{iiCondition}{1}{iiSession} = inf;
else
batch.Setup.conditions.onset{iiCondition}{1}{iiSession} = []; % Condition{nCondition}{nSubject}{nSessions}
batch.Setup.conditions.durations{iiCondition}{1}{iiSession} = [];
end
end
end
Threaded View
Title | Author | Date |
---|---|---|
Bob Kraft | Feb 10, 2016 | |
Alfonso Nieto-Castanon | Feb 12, 2016 | |
Bob Kraft | Feb 13, 2016 | |