Skip to content

Commit

Permalink
eeg_icartifact_eyes, enabled ICs to be output (i.e., second output)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjburwell committed Jun 4, 2019
1 parent 302e9eb commit dcda725
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion functions/basefunc/eeg_icartifact_eyes.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function EEG = eeg_icartifact_eyes(EEG, stat, crit);
function [EEG, ICs] = eeg_icartifact_eyes(EEG, stat, crit);
% EEG = eeg_icartifact_eyes(EEG, stat, crit);
% NOTE: this function is deprecated, see its replacement >>help proc_subcomp
%make sure ICA done!
Expand Down Expand Up @@ -47,6 +47,7 @@
CRIT_ELECS = { 'AF3' };
else,
disp([' eeg_icartifact_eyes; No criterion channel found for ' EEG.filename ', aborting blink correction...']);
ICs = [];
return
end
end
Expand Down Expand Up @@ -79,6 +80,7 @@
CRIT_ELECS = { 'F8'; 'F7'};
else
disp([' eeg_icartifact_eyes; No criterion channel found for ' EEG.filename ', aborting horizontal eye movement correction...']);
ICs = [];
return
end
[ICs, hem_corrs] = ic_temporalspatial(EEG, SPATIAL, CRIT_ELECS, THRESHOLD, 0);
Expand Down Expand Up @@ -129,6 +131,7 @@
EEG = pop_subcomp(EEG, ICs);
else,
disp([EEG.filename '; no temporal-spatial ICs identified, skipping IC-removal.']);
ICs = [];
end
end
end
Expand Down

0 comments on commit dcda725

Please sign in to comment.