L-how2

From Waisman Brain Imaging Wiki

Original File: W:/d8b/larry/eeglab4.1/scriptsForEOG/LORETA_instructions.txt

Use lan106-109 or 149

Start Matlab and type 'setupEEGLAB' to run eeglab or any of the functions or scripts described below.

The function for creating ascii text file data epochs for input into LORETA is described below. The file listing the bad channels 'badchans.asc' must be in the source directory srcDirName with the _icaF.DAT data files from which the epochs will be created. A separate destination directory destDirName should be set up to hold the files created for input into LORETA. This program reads in the ica filtered data, finds the events from the event channels in order to select the proper time segments. It then determines which bad channels are in the set of 206 channels included for LORETA analyses and interpolates these using the spherical spline method and writes out sixteen separate 2.048 second segments for each condition RE, NI and PU. Also, if the data are sampled at 500 Hz it uses every other sample reducing the sampling rate to 250 Hz.

%function createLoretaEpochs(srcDirName,destDirName,datFileName,maskFileName,studyName);
%
% This function calls the proper function to create ascii data
% epoch files for input into LORETA cross spectral function.
%
% srcDirName: directory containing data file fileName
% destDirName: directory where EEGLAB work is to be done
% datFileName: name of .DAT source file from which to extract LORETA epochs
% maskFileName: name of .MASK file associated with the .DAT file
% studyName: currently only 'SKNKWRK' is supported
%
% .DAT and .MASK files are left unchanged and LORETA epochs are saved in destDirName
%

Wednesday, December 10, 2003

Channels dropped from 256 for LORETA analysis: 81 90:93 101:105 112:115 121:124 134:137 146:149 157:159 166:169 175:178 188:191 200:202 209 210 217:219 231:250 255 256

71 dropped

185 channels

We may want to re-evaluate this list.

As with the dopower work on this data set the time from 1.5-9.5 seconds is used to create four 2.048 second epochs for each event type. Since there are four events of each type in each run sixteen .EPO files are created.

My test example used srcDirName /dc/larry/skunkwrk_loreta which contained sknk223r1_LP50_icaF.DAT, sknk223r1_LP50_icaF.MASK and sknk223r1_LP50_CFG.m. destDirName was the subdirectory dc/larry/skunkwrk_loreta/sknk223_Loreta_Epochs into which the .EPO files were written:

sknk223r1_LP50_NI_01.EPO
    .
sknk223r1_LP50_NI_12.EPO


sknk223r1_LP50_RE_01.EPO
    .
sknk223r1_LP50_RE_12.EPO

  
sknk223r1_LP50_PU_01.EPO
    .
sknk223r1_LP50_PU_12.EPO

After creating EPOs for all runs, move them into separate folders for each condition.

Start Loreta-KEY

Choose EEG-CrossSpectra
Click right tab AllEEGs->Spect(aut)
Check radio button for 8 standard bands: Delta, Theta, Aplha1&2, Beta1-3, and Omega
Num Electrodes: 185
Time frames: 512
Sampling Freq: 250
Add folders for all Conditions
Make sure "Force Average Reference" is checked. Diego's notes say to NOT use "Normalize each EEG"
Click Go and expect to wait a few hours for results

One cross-spectral .crs file is created for each condition.

Choose EEG cross-spectral->LORETA
Click middle tab "Semi-automatic mode"
Select cross-spectral .crs files
Select transformation matrix /dc/larry/Loreta-KEY/206_sknkLORETA-s3.tm
Lower end: 0
Upper end: 0
Click "Go"

Choose LORETA Explorer for EEG cross-spectra or LORETA Viewer to view results.

Alternate to Choose EEG cross-spectra->LORETA

  • use pseudo batch mode
  • simply load your batch file into the pseudobatch mode tab and hit go

need a text file in the form - the .crs full filename - the LORETA transformation matrix (/dc/larry/Loreta-KEY/206_sknkLORETA-s3.tm) - the file name for saving the output - lower and upper frequency limit (0 0)

Example:
/dc/exp/skunkwrk/eeg_data/cohort1/sknk201/ICA/ICA_data/NI.crs
/dc/larry/Loreta-KEY/206_sknkLORETA-s3.tm
/dc/exp/skunkwrk/eeg_data/cohort1/sknk201/ICA/ICA_data/NI.lorb
0 0
/dc/exp/skunkwrk/eeg_data/cohort1/sknk201/ICA/ICA_data/PU.crs
/dc/larry/Loreta-KEY/206_sknkLORETA-s3.tm
/dc/exp/skunkwrk/eeg_data/cohort1/sknk201/ICA/ICA_data/PU.lorb
0 0
...