AnalyzingData/MNE_FixingFIFF - Meg Wiki
location: AnalyzingData / MNE_FixingFIFF

Fixing EEG electrode positions in Fiff-files

According to the MNE manual, "Some versions of the Neuromag acquisition software did not copy the EEG channel location information properly from the Polhemus digitizer information data block to the EEG channel information records if the number of EEG channels exceeds 60." We have this problem at the CBSU. Unless you apply mne_check_eeg_locations to your data, MNE will get confused with the EEG electrode digitisation, and e.g. the creation of the forward solution for EEG will fail. Apply this function to your data as early as possible in your processing stream.

# Your variables

datapath='<myMEGdatapath>'       # root directory for your MEG data

# MEG IDs (your directory structure may differ)
        'meg10_0001' \
        'meg10_0002' \
        'meg10_0003' \

# MEG subdirectories (your directory structure may differ)      
         '100001' \
         '100002' \
         '100003' \

#condition names as used in file names
conds=('cond1' 'cond2' 'cond3')

# Processing:

lastsubj=`expr $nsubjects - 1`

lastcond=`expr $nconds - 1`

for m in `seq 0 ${lastsubj}`
  echo " "
  echo " Fixing electrodes for SUBJECT  ${subjects[m]}"
  echo " "
        for c in `seq 0 ${lastcond}`
                mne_check_eeg_locations \
                        --file ${datapath}/${subj_pre[m]}/${subj_dir[m]}/${conds[c]}.fif \
        done # conditions

done # subjects

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