hi - I'm trying to implement batch realignment and I'm having trouble
getting it to deal with more than one session per subject. working from
Matthew Brett's example code, I came up with the following for the
realignment batch file:
%---------------------------------------------------------------
% user variables defined here
%---------------------------------------------------------------
load sdirs
% sdirs defines nsess and sdir
%---------------------------------------------------------------
% batch variables defined here for analysis 'realign'
%---------------------------------------------------------------
realign = struct(...
'subject_nb', 1, ...
'num_sessions', nsess, ...
'sessions',[1:nsess],...
'option', 3, ...
'modality', 1, ...
'reslice_method', 2, ...
'create', 3, ...
'mask', 0, ...
'adjust_sampling_errors', 0);
for i = 1:nsess
sdir = deblank(sdirs(i, :));
filts = 'te*.mnc';
sessions(i) = struct('images',...
{{spm_get('files',sdir, filts)}});
end
and for the main batch file:
%---------------------------------------------------------------
% batch variables defined here for analyses
%---------------------------------------------------------------
analyses = struct( ...
'type', [6], ...
'index', [1], ...
'work_dir', [1], ...
'mfile', [1] ...
);
%-------------------------------------------
type = {'model','contrasts','defaults_edit','headers',...
'means','realign','normalisation','smooth'};
%-------------------------------------------
work_dir = { ...
'/raid/part5/te_test/20000308',...
};
%-------------------------------------------
mfile = { ...
'/raid/part5/te_test/realign_norm_bch_ex.m',...
};
%-------------------------------------------
This works fine with a single subject and single session, but when I try
to do two sessions for a given subject spm_input puts up a window asking
for text input (without describing what it wants), after throwing the
following objection three times:
Warning: couldn't access the sub ref ...
> In /usr/fmri_progs/spm99/spm_input.m at line 191
In /homes/nmrnew/home/poldrack/matlab/spm_realign_ui.m at line 259
In /usr/fmri_progs/spm99/spm_bch.m at line 177
lastvar =
[192x63 char]
s_typ =
{}
subs =
[2]
If I enter zero into these input fields, the analysis reads the files
from the first session but then crashes when it gets to the second
session, appearing to be confused about the filename.
I can't tell from the batch documentation exactly how one should
represent multiple sessions - clearly I'm not doing it correctly. any
help would be greatly appreciated.
thanks,
russ
--
Russell A. Poldrack, Ph. D.
MGH-NMR Center
Building 149, 13th St.
Charlestown, MA 02129
Phone: 617-726-4060
FAX: 617-726-7422
Email: [log in to unmask]
Web Page: http://www.nmr.mgh.harvard.edu/~poldrack
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|