-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_gazepoint.m
25 lines (19 loc) · 984 Bytes
/
test_gazepoint.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
% This file imports a Gazepoint eye-tracking file as well as the corresponding
% EEG file from one subject of the Child Mind database and aligns the two
% Arnaud Delorme, Dec 2013
EEG = pop_loadset('hbn_eye_tracking_data/NDARAA773LUW_SurroundSupp_Block1.set');
EEG = pop_eegfiltnew(EEG, 1);
EEG = pop_eegfiltnew(EEG, 0, 40);
EYE = pop_read_gazepoint('hbn_eye_tracking_data/NDARAA773LUW_SurrSupp_Block1.tsv');
if isfield(EYE.event, 'description') % use for type
fprintf('Warning: using description field in eye-tracking channel for event type\n')
for iEvent = 1:length(EYE.event)
if ~isempty(EYE.event(iEvent).description)
EYE.event(iEvent).type = deblank(EYE.event(iEvent).description);
end
end
end
EYE = eeg_checkset(EYE, 'eventconsistency');
[MERGEDEEG] = eeg_mergechannels(EEG, EYE);
disp('there is no event in the eye-tracking file except for the experimental');
disp('events so checking alignment is not as easy as with SMI files');