File: LumToRetIrradiance.m

package info (click to toggle)
psychtoolbox-3 3.0.19.14.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: 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,738 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
function irradiance = RadianceToRetIrradiance(luminance,radiance,radianceS,pupilAreaMM,eyeSizeMM)
% irradiance = RadianceToRetIrradiance(luminance,radiance,radianceS,pupilAreaMM,eyeSizeMM)
%
% Perform the geometric calculations necessary to convert a measurement of source
% radiance to corresponding retinal irradiance. 
%
%   Input radiance should be in units of power/m^2-sr-wlinterval.
%   Input radianceS gives the wavelength sampling information.
%   Input pupilAreaMM should be in units of mm^2.
%   Input eyeSizeMM should be the length of the eye in mm.
%   Output irradiance is in units of power/um^2-sec-wlinterval.
%
%   Light power may be expressed in watts or quanta-sec or in your
%   favorite units.  Indeed, it may also be passed as energy rather
%   than power.  
%
% This conversion does not take absorption in the eye into account,
% as this is more conveniently foldeded into the spectral absorptance.
%
% See also: PupilAreaFromLum, IsomerizationsInEyeDemo.
%
% 7/10/03  dhb  Wrote it.

% Convert spectral units to watts/sr-mm^2-wlinterval
radianceMM = radiance*1e-6;

% Define factor to convert radiance spectrum to retinal irradiance in watts/mm^2-wlinterval.
% Commented out code shows the logic, which is short circuited by actual code.
% but is conceptually convenient for doing the calculation.
%  distanceToSourceMM = 100;
%  fractionfSphere = pupilAreaMM/4*pi*distanceToSourceMM^2;
%  pupilAreaSR = 4*pi*fractionOfSphere;
%  sourceAreaMM = (distanceToSourceMM^2)/(eyeSizeMM^2);
%  conversionFactor = pupilAreaSR*sourceAreaMM;
conversionFactor = pupilAreaMM/(eyeSizeMM^2);
irradianceMM = conversionFactor*radianceMM;

% Convert irradiance to units of quanta/um^2-sec-wlinterval
irradiance = irradianceMM*1e-6;