Skip to content

Commit 8edfc09

Browse files
committed
Release v1.0
1 parent 6e1d377 commit 8edfc09

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

I2MC.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@
9898

9999
folders.func = 'functions'; % folder for functions, will add to matlab path
100100
addpath(genpath(folders.func));
101+
if ~isdir(folders.output)
102+
mkdir(folders.output);
103+
end
101104

102105
%% START ALGORITHM
103106

functions/import/importTobiiTX300.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
function [timestamp,lx,ly,rx,ry] = importTobiiTX300(file,nskip,res,missingx,missingy)
2-
% Imports data from Tobii TX300 as return by Tobii SDK (programmed by RH)
2+
% Imports data from Tobii TX300 as returned by Tobii SDK
33
% res = [xres yres]
44

5-
% faster using readintfile (uitgebreid getest, er is geen snellere
6-
% manier)
75
dat = readintfile(file,nskip,28);
86

97
timestamp = dat(:,28);
108
lx = dat(:,8 ) * res(1);
119
ly = dat(:,9 ) * res(2);
10+
lv = dat(:,14);
1211
rx = dat(:,21) * res(1);
1312
ry = dat(:,22) * res(2);
13+
rv = dat(:,27);
1414

1515
% sometimes we have weird peaks where one sample is (very) far outside the
1616
% monitor. Here, count as missing any data that is more than one monitor
1717
% distance outside the monitor.
18-
qMiss = lx<-res(1) | lx>2*res(1) | ly<-res(2) | ly>2*res(2);
18+
qMiss = lx<-res(1) | lx>2*res(1) | ly<-res(2) | ly>2*res(2) | lv>1;
1919
lx(qMiss) = missingx;
2020
ly(qMiss) = missingy;
21-
qMiss = rx<-res(1) | rx>2*res(1) | ry<-res(2) | ry>2*res(2);
21+
qMiss = rx<-res(1) | rx>2*res(1) | ry<-res(2) | ry>2*res(2) | rv>1;
2222
rx(qMiss) = missingx;
2323
ry(qMiss) = missingy;
2424

0 commit comments

Comments
 (0)