cvnlab preprocessing

cvnlab preprocessing

compute environment:

  • surly, stone
  • MATLAB
  • make sure path is set up well (e.g. matlab/startup.m)
  • /home/stone/software/commonmatlabcode/
  • /home/stone/generic/Dropbox/cvnlabsmall/code/
  • repositories:
  • knkutils (which vectorlength.m)
  • preprocessfmri (which preprocessfmri.m)
  • SPM (which spm_matrix.m)
  • NIFTI toolbox (which load_untouch_nii.m)
  • ba_interp3 toolbox (which ba_interp3.m)
  • FSL (which prelude)
  • FreeSurfer
  • Check your FS version and keep track of it (which recon-all)
  • Make sure SUBJECTS_DIR environment variable is set in your shell (perhaps in your .tcshrc file?)
  • Make sure it's set within your matlab environment, too, e.g. setenv('SUBJECTS_DIR','/home/stone-ext4/generic/Dropbox/nsddata/freesurfer');


notes on preprocessfmri.m stuff

  • "So I just had a session and ran into some issues so subject had to move quite a bit between run 2 and run 3. After the moving I redid shimming and also a field map. So now i have FRRFRRFRRRRFRRRRF (F=fieldmap, R=run). For preprocessing, do I just change fieldmaptimes=[1 5 9 13] to fieldmaptimes = [1 3 5 9 13] in both preprocess_INITIAL and preprocess_SECOND? Or should I do otherwise?"
Here's the approach:

1 2 3 4 5 <-- index of fieldmap
FRR ..moved.. FRRFRRRRFRRRRF <-- data acquisition
11 (interpolation) <-- strategy

And then in the script, you'll want to use:

% what are the time values to associate with the fieldmaps?
% if [], default to 1:N where N is the number of fieldmaps.
% *** EDIT ME ***
fieldmaptimes = [1 3 5 9 13]; % t=1, t=3, etc.

% what fieldmap should be used for each EPI run? ([] indicates default behavior, which is to attempt
% to match fieldmaps to EPI runs 1-to-1, or if there is only one fieldmap, apply that fieldmap
% to all EPI runs, or if there is one more fieldmap than EPI runs, interpolate each successive
% pair of fieldmaps; see preprocessfmri.m for details.)
%epifieldmapasst = {1 [1 2] [2 3] 3}; %%[splitmatrix([1:12; 2:13]',1) {4 4 4 4}];
%epifieldmapasst = {1 1 [1 2] [2 3] [3 4] [4 5] [5 6] [6 7]};
% *** EDIT ME ***
epifieldmapasst = splitmatrix([1:12; 2:13]',1);
epifieldmapasst{1} = 1; % use fieldmap index 1 for run 1
epifieldmapasst{2} = 1; % use fieldmap index 1 for run 2
% for run 3, use time interpolation between t=3 and t=4, and so on