1
function [val_UWattsPerCm2,limit_UWattsPerCm2] = ISO2007MPEComputeType1ContinuousCornealUVWeightedValue(S,radiance_WattsPerSrM2,weightingS,stimulusDurationSecs,stimulusAreaDegrees2)
2
% [val_UWattsPerCm2,limit_UWattsPerCm2] = ISO2007MPEComputeType1ContinuousCornealUVWeightedValue(S,radiance_WattsPerSrM2,weightingS,stimulusDurationSecs,stimulusAreaDegrees2)
4
% Compute the weighted UV radiation for Type 1 instruments as given on page 7, Table 2,
7
% Input spectrum is radiance in units of Watts/[sr-m2-wlinterval].
9
% Also return the exposure limit for this quantity.
11
% See page 6 for a definition of a Type 1 instrument. As far as I can tell, the key
12
% criterion is that it doesn't put out more light that exceeds the Type 1 limits.
14
% If the exposure time is longer than 2 hours the specified limits should be reduced by
15
% 1/exposureDuration in hours. This routine implements that adjustment for its returned
16
% limit value. It does not implement a further reduction of of the limit (by a factor of 2)
17
% for microscopes and endoilluminators.
19
% ****************************************************************************
20
% IMPORTANT: Before using the ISO2007MPE routines, please see the notes on usage
21
% and responsibility in PsychISO2007MPE/Contents.m (type "help PsychISO2007MPE"
22
% at the Matlab prompt.
23
% ****************************************************************************
25
% 6/25/13 dhb Wrote it.
27
%% Specify the limit (from table)
28
exposureDurationHours = stimulusDurationSecs/3600;
29
if (exposureDurationHours <= 2)
30
limit_UWattsPerCm2 = 0.4;
32
limit_UWattsPerCm2 = 0.4/(exposureDurationHours/2);
35
%% Convert radiance to corneal irradiance
36
cornealIrradiance_WattsPerM2 = RadianceAndDegrees2ToCornIrradiance(radiance_WattsPerSrM2,stimulusAreaDegrees2);
37
cornealIrradiance_UWattsPerM2 = (10^6)*cornealIrradiance_WattsPerM2;
38
cornealIrradiance_UWattsPerCm2 = (10^-4)*cornealIrradiance_UWattsPerM2;
40
%% Get weighted sum. The weighting function is zero outside the
41
% specified wavelength range, so we don't have to worry about the
42
% wavelength limits in the standard. We do perform a sanity check
43
% that something got passed in the wavelength region of interest.
45
index = find(wls >= 250 & wls <= 400, 1);
47
error('Should not call this routine with no spectral sampling between 250 and 400');
49
val_UWattsPerCm2 = sum(cornealIrradiance_UWattsPerCm2 .* weightingS);