Diff for "AnalyzingData/MNE_ComputeEstimates" - Meg Wiki
location: Diff for "AnalyzingData/MNE_ComputeEstimates"
Differences between revisions 1 and 2
Revision 1 as of 2010-06-09 16:00:21
Size: 2893
Editor: YaaraErez
Comment:
Revision 2 as of 2010-06-09 16:05:34
Size: 1513
Editor: YaaraErez
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
#before running script make sure you've typed:
# freesurfer_4.0.1
# mne_setup_2.5
# setenv SUBJECTS_DIR /imaging/ef02/lexpro/subject
# setenv SUBJECT 0319

## Your variables

path='<myMEGdatapath>' # where your MEG fiff-files are
MRIpath='/myMRIdirectory/' # where your MRI subdirectories are
outpath='/myoutpath' # path for output files

#condition names as used in file names to which inverse operator shall be applied
conds=('cond1' 'cond2' 'cond3')
Line 10: Line 14:
################
# PARAMETERS:
# subjects names used for MRI data
subjects=(\
        'Subject1' \
        'Subject1' \
        'Subject1' \
)
Line 13: Line 21:
# Input/Output file path: # MEG IDs (your directory structure may differ)
subj_pre=(\
        'meg10_0001' \
        'meg10_0002' \
        'meg10_0003' \
        )
Line 15: Line 28:
#path='/megdata/cbu/PATH/TO/YOUR/DATA'
path='/group/erp/data/caroline.coutout/MEG/data'
MRIpath='/group/erp/data/caroline.coutout/MEG/MRIs'
linkpath='/imaging/olaf/MEG/GoNoGo/STC' # necessary because of extra dot in "...olaf.hauk..."

#condition names as used in file names
conds=('lex_go' 'lex_nogo' 'lex_Go-NoGo' 'sem_go' 'sem_nogo' 'sem_Go-NoGo' 'freq_H' 'freq_L' 'freq_L-H')

# number of effective averages for mne_make_movie --nave
# not needed any more
#naves=('100' '100' '100' '100' '120')
# MEG subdirectories (your directory structure may differ)
subj_dir=(\
         '100001' \
         '100002' \
         '100003' \
        )
Line 28: Line 36:
subjects=(\
 '2' \
 '3' \
 '4' \
 '5' \
 '6' \
 '7' \
 '8' \
# '9' \
# '10' \
# '11' \
# '12' \
# '13' \
# '14' \
# '15' \
# '16' \
# '17' \
# '18' \
# '19' \
# '20' \
# '21' \
# '22' \
)
Line 52: Line 37:
subj_pre=(\
 'meg10_0047' \
 'meg10_0083' \
 'meg10_0084' \
 'meg10_0085' \
 'meg10_0086' \
 'meg10_0087' \
 'meg10_0088' \
# 'meg10_0091' \
# 'meg10_0094' \
# 'meg10_0096' \
# 'meg10_0098' \
# 'meg10_0101' \
# 'meg10_0101' \
# 'meg10_0102' \
# 'meg10_0104' \
# 'meg10_0106' \
# 'meg10_0108' \
# 'meg10_0109' \
# 'meg10_0110' \
# 'meg10_0112' \
# 'meg10_0114' \
 )
 
subj_dir=(\
  '100317' \
  '100407' \
  '100408' \
  '100409' \
  '100409' \
  '100412' \
  '100412' \
# '100413' \
# '100414' \
# '100415' \
# '100415' \
# '100416' \
# '100416' \
# '100419' \
# '100419' \
# '100420' \
# '100420' \
# '100421' \
# '100422' \
# '100422' \
# '100423' \
 )

 
Line 112: Line 48:
# REPORT number of files to be processed:
Line 117: Line 51:
  echo " "
Line 120: Line 53:
  echo " "
  echo " "
 
Line 128: Line 59:
  --subject Subject${subjects[m]} \
  --inv ${path}/${subj_pre[m]}/${subj_dir[m]}/${subj_pre[m]}_1L-fixed-inv.fif \
  --subject {subjects[m]} \
  --inv --inv ${path}/${subj_pre[m]}_0${subjects[m]}/${subj_dir[m]}/YourName_1L-MEG-loose0.2-inv.fif \
Line 131: Line 62:
  --set 1 --morph average --smooth 5 \
  --bmin -100 --bmax 0 \
  --stc ${path}/STC/${subj_pre[m]}_${conds[c]}   | tee -a GNG_make-movie.log
  --morph average \
               
--smooth 5 \
  --bmin -100 \
                
--bmax 0 \
  --stc ${outpath}/STC/${subj_pre[m]}_${conds[c]}

done # conditions
Line 135: Line 70:
  # symbolic links necessary because extra dot in "...olaf.hauk..." causes trouble!
  ln -s ${path}/STC/${subj_pre[m]}_${conds[c]}-lh.stc ${linkpath}/${subj_pre[m]}_${conds[c]}-lh.stc
  ln -s ${path}/STC/${subj_pre[m]}_${conds[c]}-rh.stc ${linkpath}/${subj_pre[m]}_${conds[c]}-rh.stc
 
 
  
 done # condition loop

done # subject loop


echo " "
echo "DONE"
echo " "

# END OF SCRIPT
######################
done # subjects

#

path='<myMEGdatapath>' # where your MEG fiff-files are MRIpath='/myMRIdirectory/' # where your MRI subdirectories are outpath='/myoutpath' # path for output files

#condition names as used in file names to which inverse operator shall be applied conds=('cond1' 'cond2' 'cond3')

# subjects names used for MRI data subjects=(\

  • 'Subject1' \ 'Subject1' \ 'Subject1' \

)

# MEG IDs (your directory structure may differ) subj_pre=(\

  • 'meg10_0001' \ 'meg10_0002' \ 'meg10_0003' \ )

# MEG subdirectories (your directory structure may differ) subj_dir=(\

  • '100001' \ '100002' \ '100003' \
  • )

# SCRIPT BEGINS HERE:

nsubjects=${#subjects[*]} lastsubj=expr $nsubjects - 1

nconds=${#conds[*]} lastcond=expr $nconds - 1

for m in seq 0 ${lastsubj} do

  • echo " " echo " Computing movies for SUBJECT ${subjects[m]}" echo " "
    • for c in seq 0 ${lastcond} do

      • # Current Estimates mne_make_movie \ --subject {subjects[m]} \

        --inv --inv ${path}/${subj_pre[m]}_0${subjects[m]}/${subj_dir[m]}/YourName_1L-MEG-loose0.2-inv.fif \ --meas ${path}/${subj_pre[m]}/${subj_dir[m]}/${conds[c]}.fif \ --morph average \ --smooth 5 \ --bmin -100 \ --bmax 0 \ --stc ${outpath}/STC/${subj_pre[m]}_${conds[c]}

      done # conditions

done # subjects

CbuMeg: AnalyzingData/MNE_ComputeEstimates (last edited 2013-03-08 10:02:25 by localhost)