[Eeglablist] ICA on continuous v. epoched data?

Andrew Hill andrewhill at ucla.edu
Thu Jan 27 10:21:12 PST 2011


Still trying to get some clarification here...  If I epoch continuous files that have ICA weights calculated, and I epoch by different event/condition types.. how can I view the ICA results that only apply to specific epoch types, since it appears that all the ICA weights are preserved from a continuous file to specific epochs.

Thanks,
Andrew

On Jan 14, 2011, at 1:16 PM, Andrew Hill wrote:

> Hi Arno,
> 
> Thanks.. but how do I view ICA maps that only apply to specific epoch types/conditions?
> 
> Best,
> Andrew
> 
> On Jan 14, 2011, at 9:15 AM, Arnaud Delorme wrote:
> 
>> Dear Andrew,
>> 
>> this is fine. The ICA scalp maps are spatial filters. If you epoch the data  they are preserved.
>> Best,
>> 
>> Arno
>> 
>> On Jan 12, 2011, at 11:23 PM, Andrew Hill wrote:
>> 
>>> Hi folks,
>>> 
>>> A point of clarification needed, if someone has a moment.  
>>> 
>>> I'm running ICA against continuous data and then epoching the data per event codes.  
>>> 
>>> Plotting (scroll) data for the resulting epoched EEG files does show that my .sets are "different", but plotting 2-D Component maps for two different epoch file sets (though within a specific subject and session) shows the exact same set of (64) component maps even though the .set files do show different EEG.
>>> 
>>> I've looked at both component maps (2-D) and the contents of EEG.icawinv for two specific epoched sets, and they are identical even though I am  looking at two different "condition" .sets in my data.
>>> 
>>> Below is the script that I've been using to import, filter, and epoch my data, but I'm just not sure how to proceed from here, since the components are not "different" across different conditions.  
>>> 
>>> Can someone else perhaps share with me their "workflow" for getting data from continuous recording to epoched, ICA weighted, set files from different conditions that are used in a study?  
>>> 
>>> I posted a few days ago about problems with interpolating electrodes/clustering on a study, but it seems I have a more basic problem to sort out first.
>>> 
>>> Thanks,
>>> Andrew
>>> 
>>> for S = [101:140];  
>>> 
>>> [ALLEEG EEG CURRENTSET ALLCOM] = eeglab;
>>> 
>>> %set options
>>> pop_editoptions( 'option_storedisk', 1, 'option_savetwofiles', 1, 'option_saveica', 1, 'option_single', 0, 'option_computeica', 1, 'option_scaleicarms', 1, 'option_rememberfolder', 1);
>>> 
>>> for SESS = [1,3];
>>> 
>>> %%%% Operations on .SET file.
>>> % load a file
>>> EEG = pop_loadset( 'filename', [int2str(S) '_ATTN_' int2str(SESS) '.set'], 'filepath', ['/Users/andrew/Documents/Research/DATA/BFBLANTSETS/BFBLANTSETS64_31ref/S' int2str(S)]);
>>> 
>>> EEG = eeg_checkset( EEG );
>>> 
>>> EEG=pop_chanedit(EEG, 'lookup','/Users/andrew/Documents/MATLAB/eeglab9_0_3_4b/plugins/dipfit2.2/standard_BESA/standard-10-5-cap385.elp','changefield',{65 'labels' 'A1'},'changefield',{66 'labels' 'A2'});
>>> 
>>> %drop empty channels from the .bdf
>>> EEG = pop_select( EEG,'nochannel',{'EXG3' 'EXG4' 'EXG5' 'EXG6' 'EXG7' 'EXG8'});
>>> 
>>> EEG = eeg_checkset( EEG );
>>> 
>>> % remove any bad channels
>>> EEG = pop_rejchan(EEG, 'elec',[1:66] ,'threshold',5,'norm','on','measure','kurt');
>>> 
>>> EEG = pop_runica(EEG, 'icatype','runica','dataset',1,'options',{'extended' 1});
>>> 
>>> % store the channel adjusted set in ALLEEG.  *row 20 used to allow up to 19 condition/trigger groups)
>>>  [ALLEEG, EEG, CURRENTSET] = eeg_store( ALLEEG, EEG, 20);
>>> 
>>>  % Single-trigger coded epochs (trigger indicates unique combo of cue and target)
>>>  % Epoch using e (array size), Cond as name for several trigs for one Condidition
>>> %%%%%extract 12 different types of epochs, set Subject/Condition metadata.
>>> 
>>> for e = [1:12];
>>>       Cond =['LVF-ConTarg-CenCue'; 'LVF-ConTarg-ValCue'; 'LVF-ConTarg-InvCue'; 'LVF-IncTarg-CenCue'; 'LVF-IncTarg-ValCue'; 'LVF-IncTarg-InvCue'; 'RVF-ConTarg-CenCue'; 'RVF-ConTarg-ValCue'; 'RVF-ConTarg-InvCue'; 'RVF-IncTarg-CenCue';'RVF-IncTarg-ValCue';'RVF-IncTarg-InvCue'  ];
>>> 
>>>       trigs =[{'111'}; {'112'}; {'113'}; {'121'}; {'122'}; {'123'}; {'211'}; {'212'}; {'213'}; {'221'}; {'222'}; {'223'} ];   
>>>   EEG = pop_epoch(EEG, trigs(e,:), [-.75 .95], 'newname', Cond(e,:) );
>>> 
>>>      % baseline filter using pre-cue interval.
>>>      EEG = pop_rmbase( EEG, [-700  -450] );
>>>      [ALLEEG, EEG, CURRENTSET] = eeg_store( ALLEEG, EEG, e );
>>> 
>>>      %get current Condition
>>>      Current_Condition = Cond(e,:);
>>> 
>>>      %edit the dataset info
>>>      EEG = pop_editset(EEG, 'subject', ['Subject_',int2str(S)], 'condition', Current_Condition, 'session', [int2str(SESS)]);
>>> 
>>>      %auto-reject epochs statistically.
>>>      EEG = pop_autorej(EEG, 'nogui','on','eegplot','off');
>>> 
>>> % save a new set file for the extracted epochs
>>>      EEG = pop_saveset( EEG,  'filename', [int2str(S) '_' Current_Condition '_ICA_' int2str(SESS),'.set'], 'filepath', ['/Users/andrew/Documents/Research/DATA/BFBLANTSETS/BFBLANTEPOCHSICA/S' int2str(S)]);
>>> 
>>>      % select the unepoched, re-referenced .SET file
>>>      [EEG ALLEEG CURRENTSET] = eeg_retrieve(ALLEEG,20);
>>> end
>>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end of epoching 
>>> 
>>> 
>>>   ALLEEG = pop_delset( ALLEEG, [1:20] )
>>> 
>>>   end
>>> 
>>> end
>>> 
>>> 
>>> _______________________________________________
>>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>>> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
>>> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu
>> 
> 
> 
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu





More information about the eeglablist mailing list