/usr/share/psychtoolbox-3/PsychHardware/iViewXToolbox/testcalibration.m is in psychtoolbox-3-common 3.0.11.20131230.dfsg1-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | clear all;
try
fprintf('Very simple OSX iViewX calibration demo\n\n\t');
% fprintf('At the end of the demo, press any key to quit\n\n\t');
% input('Hit the return key to continue.','s');
% fprintf('Thanks.\n');
screenNumber=max(Screen('Screens'));
white=WhiteIndex(screenNumber);
black=BlackIndex(screenNumber);
gray=round((white+black)/2);
% Open a double buffered fullscreen window and draw a gray background
% and front and back buffers.
[w, screenRect]=Screen('OpenWindow',screenNumber, 0,[],32,2);
Screen('FillRect',w, gray) ;
Screen('Flip',w);
% if 0
% rect=CenterRect(screenRect/4, screenRect);
% Screen('FillOval',w, [255 0 0], rect); % red circle
% Screen('Flip',w);
% else
%
% initialize
if 0 % if we're testing using the iviewxsimulator
host='localhost';
port=6666;
else
host=[];
port=[];
end
ivx=iViewXInitDefaults(w, [], host, port );
% change default positions of calibration points
offset=[0 0]; % default no offset
scale=[-40 -40]; % default sta ndard scaling
ivx=iViewXSetCalPoints(ivx, ivx.nCalPoints, offset, scale);
% if 0 ivx.localport=4444; end
[success, ivx]=iViewX('calibrate', ivx);
if success~=1
fprintf([mfilename ': calibration failed\n'])
end
% [result, ivx]=iViewX('driftcorrection', ivx);
%
% [result, ivx]=iViewX('driftcorrection', ivx, [200 200]);
%
% end
Screen('Flip',w);
% WaitSecs(2);
while KbCheck; end
tEnd=GetSecs+2;
while ~KbCheck && GetSecs<tEnd, end
Screen('CloseAll');
fprintf('\nEnd of demo.\n');
catch
%this "catch" section executes in case of an error in the "try" section
%above. Importantly, it closes the onscreen window if its open.
% pnet('closeall');
Screen('CloseAll'); rethrow(lasterror);
end %try..catch..
|