25 lines
782 B
Mathematica
25 lines
782 B
Mathematica
|
function[obj h] = pupil_response_function(obj, t, n=10.1, t_max=930, f=1/(10^27))
|
||
|
|
||
|
%% Hoeks and Levelt, Behavior Research Methods 1993, vol 25(1) pp 16-26:
|
||
|
%
|
||
|
% Parameters of the Erlang Gamma are n, t_max
|
||
|
% # n+1 = number of laters
|
||
|
% # t_max = response maximum
|
||
|
% # f = scaling factor
|
||
|
%
|
||
|
% Erlang Gamma = Gamma distribution with shape parameter (k) set to an integer
|
||
|
% For more information, see: https://en.wikipedia.org/wiki/Erlang_distribution
|
||
|
%
|
||
|
% Hoeks and Levelt reported for n a range of 10.1 +/- 4.1,
|
||
|
% NB: They question the use of 10.1 as a value for all subjects,
|
||
|
% but following deconvolution this is a minor issue.
|
||
|
%
|
||
|
% t_max value reported in H&L : 930 ms with a standard deviation of 190
|
||
|
% ms.
|
||
|
%
|
||
|
|
||
|
h = f.*(t.^n) .* exp(-n .*t ./ t_max);
|
||
|
h(0) = 0;
|
||
|
|
||
|
|