File: PupilDiameterTest.m

package info (click to toggle)
psychtoolbox-3 3.0.19.14.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 86,796 kB
  • sloc: ansic: 176,245; cpp: 20,103; objc: 5,393; sh: 2,753; python: 1,397; php: 384; makefile: 193; java: 113
file content (39 lines) | stat: -rw-r--r-- 1,055 bytes parent folder | download | duplicates (6)
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
% PupilDiameterTest
%
% Compare different formulae for computing
% pupil diamter from luminance.
%
% 4/2/99  dhb  Wrote it.
% 5/8/99  dhb  Update for new calling form.
% 4/25/02 awi,dgp  removed commands preventing plot 1 from appearing.  

% Calculate pupil size as a function of luminance
lums = logspace(-5,4,10);
[diamsPS,nil,trolands0] = PupilDiameterFromLum(lums,'Pokorny_Smith');
diamsMS = PupilDiameterFromLum(lums,'Moon_Spencer');
diamsDG = PupilDiameterFromLum(lums,'DeGroot_Gebhard');

% Plot them.
figure(1); clf;
plot(lums,diamsPS,'r');
hold on
plot(lums,diamsPS,'r+');
plot(lums,diamsMS,'g');
plot(lums,diamsMS,'g+');
plot(lums,diamsDG,'b');
plot(lums,diamsDG,'b+');
hold off
drawnow

% Compute effective trolands and compare with trolands
effTrolands1 = EffectiveTrolandsFromLum(lums,'Pokorny_Smith1');
effTrolands2 = EffectiveTrolandsFromLum(lums,'Pokorny_Smith2');

% Plots
figure(2); clf;
plot(lums,trolands0,'r');
hold on
plot(lums,effTrolands1,'g');
plot(lums,effTrolands2,'b');
hold off
drawnow