AjsL-how2
From Waisman Brain Imaging Wiki
[edit]
ICA/Pre-LORETA Steps
segraw2mat (‘.’)
-raws to .mat
-answer 'y' to all prompts
flagclip (‘.’, -800, 800)
filt60 (‘.’)
- .DAT -> no60.DAT
lowpass50forICA('.');
- .DAT -> LP50.DAT
- Identify bad channels and create badchans.asc. In order to accomplish this, you will use autoscore
- autoscore will be run using the following params autoscore('.','ShkExec_112_runs1_4002_LT20.DAT','TRIAL_LENGTH',.05,'KURT_Z_LEVEL',4,'DEV_THRESHOLD',4,'MAX_VAR',4500,'MIN_VAR',0.25);
- this will leave blinks intact...for shkexec, we'll want to run autoscore twice, once with and once w/o blinks removed...
- to run the matlab script autoscorefiles.m:
from the command line type: nice nohup matlab -r autoscorefiles >> autoscore.log
( NOTE: no *.m extension) to run script and be able to write to a logfile
- Then, in order to create a single document w/ all the bad channels listed, I just wrote a simple function to read all the basename_AS_CHAN.LOG files in a directory and condense their information into a single results file:
proc_AS_CHAN_LOGS('.',0.01);
where '.' is the current directory and 0.01 is the fraction threshold for bad channels (channels with < 1% good data are put on bad channel list) - Then you will need to create the badchans.asc file ((this assumes that each subject lives in a separate directory. Note, too, that you will need to determine which channels you want to drop from ALL subjects for the 128-ch net.
- use ICA_batch.m (which uses create_256bcrSets) to remove bad channels from data
- remove bad epochs from data
- use run_binica.m to preform ICA correction
- select bad components to remove
- use step4_batch.m to create final sets
[edit]
LORETA Section
- move badchans into ICA directories can use copy_badchans_batch
- you will then need to write a matlab batch to call larry's createLoretaEpochs for each file (see below). This will both spline interpolate and epoch, creating interpolated .epo files. Larry will need to hardwire the epoch event marks. In the case of shkexec, we're using the whole file.
Note that loreta expects the following dir conventions to be upheld:
- epo and lorb files should be sorted by subject and condition and group.
- kevin recommends that when running the stats in pseudobatch mode that you keep the script constant and just hide the results in a separate dir after each run of stats...
- use cross-spec (approx 15 min) from the loreta gui
- use cross-spec to create LORETA .lorb files (~10 min)
- run STATS
Read the LORETA Instructions (Larry Greischar)

