BitOfScript - MRC CBU Imaging Wiki

Here is a typical structure for a batch script

  1. Code to set up parameters across all the datasets 
    and do bits of analysis that are can be grouped
    
  2. Loop over Subjects and Sessions 
     and perform the Main Crunch
    

E.g.

  1. % reorientation, slice timing
    do_time_place5
    realign_spm5
    smooth_spm5
    
    % hp filter
    MYV.hf_cut = 60;
    
  2. % Run models
    for sb = 1:length(MYV.subjects)
      for ss = 1:length(MYV.sesses)
        one_sub_sess_model_moves5(MYV, sb, ss);
        one_sub_sess_con_moves5(MYV, sb, ss);
      end
    end
    

Here

  • do_time_place
    realign_spm5
    smooth_spm5
    one_sub_sess_model_moves5
    (OneSubSess)

and

  • one_sub_sess_con_moves5

are subscripts tailored to specialised parts of the sequence.


BitOfScript (last edited 2006-10-03 10:53:11 by IanNimmoSmith)

(c) MRC Cognition and Brain Sciences Unit 2009