[Eeglablist] problem going from merged to epoched
Nathan Hutcheson
nhutche at gmail.com
Tue Dec 8 14:41:19 PST 2009
Hello,
When I take my merged files and make them epoched something goes
wrong. When I look at the new epoched files they are all the same.
Below is my code. Please let me know where my problem is.
%event= 1; % 1 is remember 1 correct
%event= 2; % 2 is remember 1 incorrect
%event= 3; % 3 is ignore correct
%event= 4; % 4 is ignore incorrect
%event= 5; % 5 is remember 2 both correct
%event= 6; % 6 is remember 2 incorrect for probe 1, correct for probe 2
%event= 7; % 7 is remember 2 correct for probe 1, incorrect for probe 2
%event= 8; % 8 is remember 2 both incorrect
%event= 121; % 121 is remember 1, looking at S2, P1 correct
event= 221; % 221 is remember 2, looking at S2, P1 correct
%event= 1021; % 1021 is Ignore, looking at S2, Correct
%event= 1020; % 1020 is ignore, lookng at S2, incorrect
%subject= 'Mergedx02b2';
%subject= 'Mergedx03c2';
%subject= 'Mergedx04a2';
%subject= 'Mergedx05a2';
%subject= 'Mergedx06b2';
%subject= 'Mergedx07a2';
%subject= 'Mergedx08a2';
subject= 'Mergedx09a2';
EEG = pop_loadset( 'filename', [subject '.set'], 'filepath',
'/media/storage/Projects/Lesley/PreStimEEG/A/PreData/');
eeglab redraw %updates gui for viewing if desired
eventTrials = FindEvent_aftermerge(EEG, event);
[EEG typeNumber] = newEEGtype(EEG,eventTrials, event);
eeglab redraw %updates gui for viewing if desired
% Reject the bad channels
%EEG = pop_rejchan(EEG, 'elec',[1:69] , 'threshold',5, 'norm', 'on',
'measure', 'kurt');
% somehow the above isn't working correctly?
EEG = eeg_checkset( EEG );
eeglab redraw %updates gui for viewing if desired
% Epoch the data
fn = strcat(subject, ' filtered epochs');
EEG = pop_epoch( EEG, { typeNumber }, [-1 1], 'newname',
fn, 'epochinfo', 'yes'); %['yes'|'no'] Propagate event information
into the new epoch structure
EEG = eeg_checkset( EEG );
EEG = pop_rmbase( EEG, [-1000 0]);
EEG = eeg_checkset( EEG );
eeglab redraw
% remove bad channels
EEG = pop_select( EEG ); %removes bad channels
EEG = eeg_checkset( EEG );
% %pop_eegplot( EEG, 1, 1, 1);
% remove bad trials
EEG = pop_autorej(EEG, 'nogui', 'on', 'eegplot', 'on');
%autorejection of bad epochs
EEG.setname=[subject 'r_epochs'];
EEG = eeg_checkset( EEG );
eeglab redraw %updates gui for viewing if desired
More information about the eeglablist
mailing list