1
function retIrradiance_PowerPerArea = RadianceAndPupilAreaEyeLengthToRetIrradiance(radiance_PowerPerAreaSr,radianceS,pupilArea,eyeLength)
2
% retIrradiance_PowerPerArea = RadianceAndPupilAreaEyeLengthToRetIrradiance(radiance_PowerPerAreaSr,radianceS,pupilArea,eyeLength)
4
% Perform the geometric calculations necessary to convert a measurement of source
5
% radiance to corresponding retinal irradiance.
7
% Let x be the units of distance (m, cm, mm, um, etc.)
9
% Input radiance_PowerPerAreaSr should be in units of power/x^2-sr-wlinterval.
10
% Input radianceS gives the wavelength sampling information (nm).
11
% Input pupilArea should be in units of x^2.
12
% Input eyeLength should be the length of the eye in units of x
14
% Output retIrradiance_PowerPerArea is in units of power/x^2-wlinterval.
16
% Light power may be expressed in watts or quanta-sec or in your
17
% favorite units. Indeed, it may also be passed as energy rather
20
% This conversion does not take absorption in the eye into account,
21
% as this is more conveniently foldeded into the spectral absorbtance.
23
% See also: PsychRadiometric, RetIrradianceAndPupilAreaEyeLengthToRadiance, PupilAreaFromLum, EyeLength.
25
% 3/6/13 dhb Wrote it.
27
% Define factor to convert radiance spectrum to retinal irradiance
28
% Commented out code shows the logic, which is short circuited by actual code.
29
% but is conceptually convenient for doing the calculation.
30
% distanceToSource = 100;
31
% fractionfSphere = pupilArea/4*pi*distanceToSource^2;
32
% pupilAreaSR = 4*pi*fractionOfSphere;
33
% sourceArea = (distanceToSource^2)/(eyeLength^2);
34
% conversionFactor = pupilAreaSR*sourceArea;
35
conversionFactor = pupilArea/(eyeLength^2);
36
retIrradiance_PowerPerArea = conversionFactor*radiance_PowerPerAreaSr;