function TetraColorSpace1b_2011_BETA

%THIS IS THE BETA VERSION OF TCS1b

%TETRACOLORSPACE VERSION 1b BETA, 2011

%Type 'TetraColorSpace1b_2011_BETA' in the workspace to begin or press run

%(F5).


%MATLAB COMPATIBILITY

%If the MATLAB version you are using does not recognize the "nanmean,"

%"mean2," or "std2" functions, simply uncomment the subfunctions of the

%same name included at the end of this file.


%==========================================================================  

%==========================================================================

%==========================================================================

%This is TCS1b BETA.  It follows the previous version TCS1a.

%Created by Mary Caswell Stoddard and Richard O. Prum.


% The visual systems of birds, many other reptiles, and many fish include four color-sensitive retinal cone-types. 

% As a consequence, their color vision is more complex than human color vision. We have developed a new computational 

% tool that allows users to model the visual color stimuli for these tetrahedral visual systems.

% 

% TETRACOLORSPACE is a computer program developed for the tetrahedral analysis of colors measured from reflectance spectra 

% or four cone stimulus values, using MATLAB 7 software (MathWorks, Natick, MA).  TETRACOLORSPACE can analyze colors based 

% on ultraviolet or violet cone-type avian visual systems, or use any four cone-sensitivity functions input by the user.  

% TETRACOLORSPACE provides an assortment of quantitative analyses and graphical tools for describing color stimulus variation 

% and diversity.  Details are available in Stoddard and Prum (2008).  

% 

% TETRACOLORSPACE is provided for free at http://www.zoo.cam.ac.uk/zoostaff/bbe/Stoddard/MaryCaswell1.html and http://www.yale.edu/eeb/prum/. 

% When using the program, please cite the original publication:

% 

% Stoddard, M. C. & Prum, R. O. 2008. Evolution of avian plumage color in a tetrahedral color space: A phylogenetic 

% analysis of new world buntings. American Naturalist, 171, 755-776.


%==========================================================================  

%==========================================================================

%==========================================================================


disp(' ')


disp('Welcome to TetraColorSpace Version 1b, 2011 BETA.')

disp(' ')

disp('Created by Mary Caswell Stoddard and Richard O. Prum ')

disp(' ')

disp('Please refer to the User''s Manual for instructions and details of analyses performed here.')

disp('When using the program, please cite the original publication:')

disp(' ')

disp('Stoddard, M. C. & Prum, R. O. 2008. Evolution of avian plumage color in a tetrahedral color space: A phylogenetic') 

disp('analysis of new world buntings. American Naturalist, 171, 755-776.')


disp(' ')

disp(' ')


datapathname = 'C:\';

pathname='C:\';


fileformat= 'xls';


active = 0;



%==========================================================================  

%======================MAIN MENU===========================================

%==========================================================================


while (active == 0)

    

spectra_loaded = 0; 

visiontype_selected = 0; 

spectra_normalized = 0; 


    qstring= 'TETRACOLORSPACE MAIN MENU: Select the type of data contained in Excel files.';

    choice = menu(qstring, ' 1)  Reflectance spectra.', '2)  Relative photon catch data (already calculated from digital photographs or reflectance spectra).', '3)  Quit.');


%===========REFLECTANCE SPECTRA============================================    

    if choice==1

        continu=1; 

        LightReply = 0; 

    end

    

%===========PHOTON CATCH DATA==============================================    

    if choice==2

        %Get user's Excel file containing u/v s m l values

        [filename,pathname]=uigetfile(strcat('*.',fileformat),'Choose Excel file containing photon catch data.');

            

        if (filename ~= 0)

            cd(pathname);

            [User, textdata] = xlsread(filename); 

           

            labeltxt = textdata(1,:);

            patnames = textdata(:, 1);

            patnames(1) = [];

            [patnum columns] = size(patnames); %patnum is the number of patches

            

            NormalizeU = User;

            for r=1:patnum

            sumUser = sum(User(r, :));

            NormalizeU(r,:) = User(r,:)/sumUser;           

            end

            

            Mega = NormalizeU;

            PhotonCatch = Mega; 

            

            %Convert cone stimulation values to Cartesian coordinates, store in vectors

            %X, Y, Z

            for i = 1:patnum

            X(i) = (1-2*Mega(i,2) - Mega(i,3) - Mega(i,1))/2*sqrt(3/2);

            end

            for i = 1:patnum

            Y(i) = (-1 + 3*Mega(i,3)+Mega(i,1))/(2*sqrt(2));

            end

            for i = 1:patnum

            Z(i) = (Mega(i,1))-1/4;

            end


            %Put X, Y, Z elements into one matrix, M, with dimensions [patnum x 3]

            for i = 1:patnum

            M(i, 1) = X(i);

            M(i, 2) = Y(i);

            M(i, 3) = Z(i);

            end

           

            continu = 2;

            UVreply = 0;

            

            photoncatch_loaded = 1;

            disp (['The following file has been loaded: ', char(filename)]); 

            disp(' ');

        end

    end

    

%===========QUIT===========================================================

    if choice==3

        clear all;

        close all;

        break;

    end

    

%==========================================================================

%=================SPECTRA MENU=============================================

%==========================================================================

while (continu==1)

    qstring= 'Spectra menu.';

    action = menu(qstring, '1)  Load spectra file.', '2)  Load additional spectra files (OPTIONAL).',  '3)  Load ambient light spectra (OPTIONAL).', '4)  Choose UVS-type vision or VS-type vision for color analyses.', '5)  Process spectra.', '6)  View analyses.', '7)  Return to main menu.');

    

   if (action==1)  

%==================LOAD SPECTRA FILES======================================

        close all;

        

        User = []; 

        rawpatnames = []; 

        

        %Get user's Excel file: should be in format with nanometers in column 1 and

        %color patches in each subsequent column

        [filename,pathname]=uigetfile(strcat('*.',fileformat),'Choose spectra file.');

     

        if (filename ~= 0)

            cd(pathname);

            [User, rawpatnames] = xlsread(filename); 

            spectra_loaded = 1;

            disp (['The following spectra file has been loaded: ', char(filename)]);            

        end

        

        %Define patnames, patnum

        rawpatnames(1) = [];

        patnames = rawpatnames; %patnames is a vector containing patch names

        [row patnum] = size(patnames); %patnum is the number of patches

        

        %Define rows, cols in the input matrix

        [rows cols] = size (User);

        

        %Averages the reflectance spectrum for each patch to give one number per

        %wavelength

        for r = 1: rows

           uround = User(r, 1);

           d = round(uround);

           User(r, 1) = d;

        end


        UserZero = User; 

        for c = 2: cols

            UserZero (:, c) = NaN;  

        end

       

        User = cat(1, User, UserZero);


        for i = 300:700

        meanMatrix((i-299),:) = nanmean(User(find(User(:,1)==i),:));

        end; 

   

        User = meanMatrix; 

        

        %Assign the non-normalized matrix to UserOriginal, keep this for

        %brilliance analysis

        UserOriginal = User; %This will remain untouched for brilliance analysis.

        UserPhotonCatch = User/100; %Divide reflectance spectra input by 100. This is done to generate photon catch values between 0 and 100 and does not affect relative cone stimulation values.

        UserPhotonCatch(:, 1) = UserOriginal(:, 1); %This restores column 1 to 300-700 nm      

        

        %Normalize reflectance spectra to sum 1

        NormalizeU = User;


        for c = 2: cols

            sumUser = sum(User(:, c));

            NormalizeU(:,c) = User(:, c)/sumUser;           

        end


        User = NormalizeU; %User has now been normalized so that reflectance spectra sum to 1.

        User(:, 1) = UserOriginal(:, 1); %This restores column 1 to 300-700 nm


    elseif ((action==2)&(spectra_loaded == 1))  

%================LOAD ADDITIONAL SPECTRA FILES (OPTIONAL)==================

    if spectra_loaded == 1;   

        

        User2 = []; 

        rawpatnames2 = [];

        

            [filename,pathname]=uigetfile(strcat('*.',fileformat),'Choose an additional spectra file.');

        

        if (filename ~= 0)

            cd(pathname);

            [User2, rawpatnames2] = xlsread(filename);

            disp (['The following additional spectra file has been loaded: ', char(filename)])

        end

                

        %Define patnames, patnum    

        rawpatnames2(1) = [];

        patnames2 = rawpatnames2; %patnames is a vector containing patch names

        [row2 patnum2] = size(patnames2); %patnum is the number of patches

        

        %Define rows, cols in the second input matrix

        [rows2 cols2] = size (User2);

        

        %Averages the reflectance spectrum for each patch to give one number per

        %wavelength

        for r2 = 1: rows2

           uround = User2(r2, 1);

           d = round(uround);

           User2(r2, 1) = d;

        end


        UserZero2 = User2; 

        for c2 = 2: cols2

            UserZero2 (:, c2) = NaN;  

        end

       

        User2 = cat(1, User2, UserZero2);

       

        for i = 300:700

        meanMatrix2((i-299),:) = nanmean(User2(find(User2(:,1)==i),:));

        end; 


        User2 = meanMatrix2; 

        disp(User2); 


        %Assign the non-normalized matrix to UserOriginal2, keep this for

        %brilliance analysis

        UserOriginal2 = User2; %This will remain untouched for brilliance analysis.

        UserPhotonCatch2 = User2/100; %Divide reflectance spectra input by 100.  This is done to generate photon catch values between 0 and 100 and does not affect relative cone stimulation values.

        UserPhotonCatch2(:, 1) = UserOriginal2(:, 1); %This restores column 1 to 300-700 nm

        

        %Normalize reflectance spectra to sum 1

        NormalizeU2 = User2;


        for c2 = 2: cols2

            sumUser2 = sum(User2(:, c2));

            NormalizeU2(:,c2) = User2(:, c2)/sumUser2;           

        end


        User2 = NormalizeU2; %User has now been normalized so that reflectance spectra sum to 1.

        User2(:, 1) = UserOriginal2(:, 1); %This restores column 1 to 300-700 nm

          

        %Concatenate User and User2, and respective patch names to create

        %combined matrix

       

        User2(:, 1) = []; %Removes first column from User2

        UserOriginal2(:, 1) = []; %Removes first column from UserOriginal2

        UserPhotonCatch2(:, 1) = []; %Removes first column from UserPhotonCatch2

        

        User = cat(2, User, User2);

        UserOriginal = cat(2, UserOriginal, UserOriginal2); 

        UserPhotonCatch = cat(2, UserPhotonCatch, UserPhotonCatch2); 

        patnames = cat(2, patnames, patnames2);

        [row patnum] = size(patnames);


    end


    elseif (action==3&(spectra_loaded == 1))     

%==================LOAD LIGHT SPECTRA FILE (OPTIONAL) =====================         

    if spectra_loaded == 1; 

    

        Light = []; 

        

        [filename,pathname]=uigetfile(strcat('*.',fileformat),'Choose ambient light spectra file.');

        

        if (filename ~= 0)

            cd(pathname);

            [Light] = xlsread(filename);  

            Light = Light(:, (1:2)); %Light matrix only includes first two columns

            LightReply = 2; 

            disp (['The following light spectra file has been loaded: ', char(filename)]); 

        end

        

        %Get size of Light matrix

        [rows cols] = size (Light);

        

        %Averages the reflectance spectrum to give one number per

        %wavelength

        for r = 1: rows %Puts Light into a 401 x 2 matrix, 300 - 700 nm

            uround = Light(r, 1);

            d = round(uround);

            Light(r, 1) = d;

        end

    

        LightZero = Light; 

        for c = 2: cols

        LightZero (:, c) = NaN;  

        end


        Light = cat(1, Light, LightZero);


        for i = 300:700

        LightMatrix((i-299),:) = nanmean(Light(find(Light(:,1)==i),:));

        end; 


        NormalizeLight = LightMatrix; 

        

        for c = 2: cols %Normalizes LightMatrix so that sum of LightMatrix = 1

            sumLightMatrix = sum(LightMatrix(:, c));

            NormalizeLight(:,c) = LightMatrix(:, c)/sumLightMatrix;          

        end


        LightMatrix = NormalizeLight;

        LightMatrix(:, 1) = [];%Removes first column from Light

            

    end

   

    

   elseif (action==4&(spectra_loaded == 1))     

%==================SELECT TYPE OF VISION===================================

if spectra_loaded == 1; 


    qstring = 'Choose UVS type or VS color vision.';

    UVreply = menu(qstring, '1) UVS - Average bird', '2) UVS - Blue tit', '3) UVS - Starling', '4) VS - Average bird', '5) VS - Peafowl', '6) Input your own curves');

    %Mega is the [patnum x 5] numbers-only matrix containing the u/v s m l

    %proportions for all colors, and double cone catch in column 5

    

    if visiontype_selected == 0; 

    UserDefinedCurves = [];    

    end


    if UVreply == 1

        visiontype = 'UVS Average bird';

        labeltxt = [' ' 'u' 's' 'm' 'l']; 

    end

    if UVreply ==2 

        visiontype = 'UVS Blue tit';

        labeltxt = [' ' 'u' 's' 'm' 'l']; 

    end

    if UVreply == 3

        visiontype = 'UVS Starling'; 

        labeltxt = [' ' 'u' 's' 'm' 'l']; 

    end

    if UVreply == 4

        visiontype = 'VS Average bird';

        labeltxt = [' ' 'v' 's' 'm' 'l'];

    end

    if UVreply == 5

        visiontype = 'VS Peafowl';

        labeltxt = [' ' 'v' 's' 'm' 'l'];

    end

    if UVreply == 6

        visiontype = 'User Defined'; 

        labeltxt = [' ' 'v' 's' 'm' 'l']; 

        [filename,pathname]=uigetfile(strcat('*.',fileformat),'Choose file containing spectral sensitivity curves.');

            

            if (filename ~= 0)

            cd(pathname);

            [UserDefinedCurves] = xlsread(filename); 

            

                    %Normalize user defined curves to sum 1

                    NormalizeUserDefinedCurves = UserDefinedCurves;

                    [rows cols] = size (UserDefinedCurves);


                    for c = 2: cols

           

                    sumUserDefinedCurves = sum(UserDefinedCurves(:, c));

                    NormalizeUserDefinedCurves(:,c) = UserDefinedCurves(:, c)/sumUserDefinedCurves;           

                    

                    end

                    

                    UserDefinedCurves=NormalizeUserDefinedCurves;

            end

    end

    


%Here the calculations are performed twice. FIRST: The relative stimulation

%values in Mega are based on User, which is normalized so that area under

%the curve = 1.  SECOND: PhotonCatch values for color and double cones are

%based on User divided by 100 (rather than normalized area =1).  This

%ensures that photon catch values are between 0 and 1. PhotonCatch and doubleConePhotonCatch replace

%the previous variables of the same name. The relative stimulation values in Mega are identical in both calculations.  


    if LightReply == 2

        [Mega, PhotonCatch, doubleConePhotonCatch] = LightProcessMatrix(User, LightMatrix, visiontype, UserDefinedCurves);

        [MegaIgnore, PhotonCatch, doubleConePhotonCatch] = LightProcessMatrix(UserPhotonCatch, LightMatrix, visiontype, UserDefinedCurves);

        disp(['This analysis is performed using light spectra and the vision type: ', char(visiontype)]);

        disp(' ');

        else

        [Mega, PhotonCatch, doubleConePhotonCatch] = processMatrix(User, visiontype, UserDefinedCurves);

        [MegaIgnore, PhotonCatch, doubleConePhotonCatch] = processMatrix(UserPhotonCatch, visiontype, UserDefinedCurves);

        disp(['This analysis is performed using vision type: ', char(visiontype)]); 

        disp(' ');

    end

 

    visiontype_selected=4; 

end

    elseif (action==5&(spectra_loaded == 1)&(visiontype_selected == 4))  

%==================PROCESS SPECTRA=========================================

    if spectra_loaded == 1;    

    

        if spectra_normalized == 5; 

            continu = 2; 

            break;

        end

    

    disp('The spectra file(s) has been processed.')

    disp(' ')

    spectra_normalized = 5;  


            %================(Brilliance analysis)=========================

            %Checks each cell of NormBril to determine whether normalized brilliance

            %for the patch is > or < 1%.  The NormBril matrix is not printed.

            %Patches with <5% normalized brilliance are placed at the

            %achromatic point. This is the default option.  You can make

            %this more conservative by changing ".05" below to a lower

            %value, e.g. ".01."

            

            NormBril = brillianceNoPrint(UserOriginal, patnum, patnames);


            for i=1:patnum

                if NormBril(i) < .05

                    Mega(i, 1) = .25; 

                    Mega(i, 2) = .25; 

                    Mega(i, 3) = .25; 

                    Mega(i, 4) = .25;

                end

            end

       

            %Convert cone stimulation values to Cartesian coordinates, store in vectors

            %X, Y, Z

            for i = 1:patnum

            X(i) = (1-2*Mega(i,2) - Mega(i,3) - Mega(i,1))/2*sqrt(3/2);

            end

            for i = 1:patnum

            Y(i) = (-1 + 3*Mega(i,3)+Mega(i,1))/(2*sqrt(2));

            end

            for i = 1:patnum

            Z(i) = (Mega(i,1))-1/4;

            end

    

            %Put X, Y, Z elements into one matrix, M, with dimensions [patnum x 3]

            for i = 1:patnum

            M(i, 1) = X(i);

            M(i, 2) = Y(i);

            M(i, 3) = Z(i);

            end

%           disp('The X Y Z coordinates of the color points are:')

%           disp(' '); 

%           disp(M); 

      end


   elseif (action==6&(spectra_loaded == 1)&(visiontype_selected == 4)&(spectra_normalized == 5))     

%==================ANALYSES================================================

        if spectra_loaded == 1;

            continu = 2; 

        end

        

        

   elseif (action==7)     

%======================RETURN TO MAIN MENU=================================

    active = 0; 

    break;

   end

end


%==========================================================================

%=================SELECT ANALYSIS MENU=====================================

%==========================================================================


while (continu==2)

qstring = 'Select analysis.';

option = menu(qstring, '1)  Relative stimulation values of the UVS/VS, SWS, MWS, and LWS cones for color patches.', '2)  Tetrahedron plot.', '3)  Robinson projection.', '4)   Hue functions.', '5)  Summary of hue and chroma for all colors.', '6)  Brilliance analysis.', '7)  Span analysis and distance matrix.', '8)  Volume analysis.', '9)  Hue disparity analysis.', '10)  Summary of color measurements.', '11) Absolute photon catch of color cones.',  '12) Absolute photon catch of double cones.',  '13)  Return to main menu.');

%========STIMULATION VALUES================================================

if option==1

    %Display matrix by calling showmatrix function

    disp(' ')

    disp('RELATIVE STIMULATION VALUES')

    disp('Relative stimulation values of the UVS/VS, SWS, MWS, and LWS cones for color patches:')

    showmatrix(patnum, Mega, labeltxt, patnames)

    disp(' ')

    disp(' ')

end


%========TETRAHEDRON PLOT==================================================

if option==2

%Set size and color of color patch points


S = 45; 

C = [0 0 0]; 

col = [.5 .5 .5]; 


%Ask user to submit preferences for tetrahedron display

disp(' ')

disp('TETRAHEDRON PLOT - SEE FIGURE')

reply = menu('Tetrahedron options.','Press 1 to view the tetrahedron in color.', 'Press 2 to view the tetrahedron in color with patches labeled.', 'Press 3 to view the tetrahedron in white.', 'Press 4 to view the tetrahedron in white with patches labeled.',  'Press 5 to view the tetrahedron with no grid lines or labels.','Return.'); 

disp(' ')

disp(' ')


%Plot color patch points and tetrahedron according to user's preferences


if reply ==1

    figure;

    scatter3(X,Y,Z,S,col, '.','filled', 'MarkerEdgeColor', 'k');

    hold on

    tetraplotter(UVreply)

elseif reply==2

    figure;

    scatter3(X,Y,Z,S,col, '.', 'filled', 'MarkerEdgeColor', 'k');

    hold on 

    for i = 1:patnum

        word = patnames(i);

        text(X(i), Y(i), Z(i),[' ' word])

    end

    tetraplotter(UVreply)

elseif reply==3

    figure;

    scatter3(X,Y,Z,S,col, '.','filled', 'MarkerEdgeColor', 'k');

%     TO SEE THE ACHROMATIC POINT, UNCOMMENT THESE LINES

%     originx = 0; originy = 0; originz =0; 

%     scatter3(originx, originy, originz, 30, 'k')

    hold on

    tetraplotterWhite(UVreply); 

elseif reply==4

    figure;

    scatter3(X,Y,Z,S,col, '.', 'filled', 'MarkerEdgeColor', 'k');

    hold on 

    for i = 1:patnum

        word = patnames(i);

        text(X(i), Y(i), Z(i),[' ' word])

    end

    tetraplotterWhite(UVreply); 

elseif reply==5

    figure;

    scatter3(X,Y,Z,S,col, '.','filled', 'MarkerEdgeColor', 'k');

    hold on

    tetraplotterNoGrid; 

end

end


%===========ROBINSON PROJECTION============================================

if option==3


%Robinson projections


disp(' ')

disp('ROBINSON PROJECTION - SEE FIGURE')

reply = menu('Robinson projection options.','Press 1 to view the labeled Robinson projection.','Press 2 to view the unlabeled Robinson projection.', 'Return.');

disp(' ')

disp(' ')


    if reply==1

    LabeledRobinson(X, Y, Z, patnum, patnames, UVreply);

    end

    if reply==2

    BasicRobinson(X, Y, Z, patnum, patnames)

    end

end


%============HUE FUNCTIONS=================================================

if option==4


%Display u(r), s(r), m(r), l(r), which provide, for any r, the increments

%by which u, s, m, and l stimulation can be changed and still preserve hue

disp(' ')

disp('HUE FUNCTIONS')

disp('A set of four functions describes how stimulation of the four color channels varies as a function of')

disp('chroma r for any given hue, theta and phi.')


disp(' ')


disp('Below is the matrix of color patch hues.')


disp(' ')


showmatrixnum(patnum, Mega, labeltxt, patnames);


disp(' ')


reply = menu('Hue functions options.', 'Press 1 to view the hue functions graphed in color.' , 'Press 2 to view the hue functions in black and white.');


disp(' ')


if reply==1

    reply = input('Press the appropriate number to view the u/v(r), s(r), m(r), and l(r) functions and their plots \nfor a specific color patch hue. Then press enter.');

    disp(' ')

    if isempty(reply)

        reply = 1;

    end

    for i = 1:patnum

        if reply == i

            huefunctions (M, reply, patnames, UVreply);  

        end

    end

elseif reply==2

      reply = input('Press the appropriate number to view the u/v(r), s(r), m(r), and l(r) functions and their plots \nfor a specific color patch hue. Then press enter.');

    disp(' ')

    if isempty(reply)

        reply = 1;

    end

    for i = 1:patnum

        if reply == i

            huefunctionsBlackLines (M, reply, patnames, UVreply);  

        end

    end

    disp(' ')

    disp(' ')

end

end


%=============SUMMARY OF HUE AND CHROMA FOR ALL COLORS=====================

if option==5

disp(' ')

disp('SUMMARY OF HUE AND CHROMA FOR ALL COLORS')

disp ('These are the spherical coordinates of all color patches along with the maximum and % achieved chromaticities of all hues.');

disp(' ')


avchroma = rmax(X, Y, Z, patnum, patnames);

disp(' ')

disp(' ')

end


%==============BRILLIANCE ANALYSIS=========================================

if option==6

disp(' ')

disp('BRILLIANCE')

if choice == 2

    disp('Brilliance analysis cannot be performed on photon catch data.')


else


disp('This is the normalized brilliance, wavelength of peak reflectance, and peak % reflectance of color patches.');

disp(' ')


[NormBril, avBril] = brilliance(UserOriginal, patnum, patnames);


disp(' ')

disp(' ')

end

end


%===============SPAN ANALYSIS==============================================

if option==7  

disp(' ')

disp('COLOR SPAN AND DISTANCE MATRIX')


%Calculate color span, variance of color span, and display the distance matrix


reply = menu('Color span options.','Press 1 to view the average color span and span variance.', 'Press 2 to also view the distance matrix.'); 



if choice == 2

        preference = 0; 

    if reply==1

        [avcolorspan, varcolorspan, maxcolorspan] = distmatrix(M, patnum, patnames, preference);

    elseif reply==2

        [avcolorspan, varcolorspan, maxcolorspan] = distmatrixprint(M, patnum, patnames, preference);

    end

    

else


preference = menu('Color span options.', 'Press 1 to include achromatic points in span analysis.' , 'Press 2 to exclude multiple achromatic points in span analysis.');


disp(' ')


if reply==1

    [avcolorspan, varcolorspan, maxcolorspan] = distmatrix(M, patnum, patnames, preference);

elseif reply==2

    [avcolorspan, varcolorspan, maxcolorspan] = distmatrixprint(M, patnum, patnames, preference);

end


disp(' ')

disp(' ')

end

end


%=============VOLUME ANALYSIS==============================================

if option==8  

disp(' ')

disp('VOLUME')



if patnum <= 3 

    disp('The volume cannot be calculated for three or fewer points.')

    v = 0;

else

    K = convhulln(M);

    [K, v] = convhulln(M);

    E = 'The volume of color space occupied is: ';

    [s] = sprintf(['%s', repmat('%.4e', 1, 1)], E , v); 

    disp(s)


    disp(' ')

    disp(' ')

    

%Ask user to submit preferences for tetrahedron display with volume

    disp('VOLUME PLOT - SEE FIGURE')

    reply = menu('Volume options.','Press 1 to view the convex hull in color.', 'Press 2 to view the convex hull in color with patches labeled.', 'Press 3 to view the convex hull in a white tetrahedron.','Press 4 to view the convex hull in a white tetrahedron with patches labeled.', 'Return.'); 

  

    disp(' ')

   

     

%Plot convex hull according to user's preferences


S = 45; 

C = [0 0 0]; 

col = [.5 .5 .5]; 

    

    if reply == 1

        figure;

        scatter3(X,Y,Z,S, col, 'o', 'filled', 'MarkerEdgeColor', 'k');

        hold on

        tetraplotterhull (K, M, UVreply); 

    elseif reply == 2

        figure;

        scatter3(X,Y,Z,S, col, 'o', 'filled', 'MarkerEdgeColor', 'k');

        hold on 

        for i = 1:patnum

            word = patnames(i);

            text(X(i), Y(i), Z(i),[' ' word])

        end

        tetraplotterhull (K, M, UVreply);

    elseif reply == 3

        figure;

        scatter3(X,Y,Z,S, col, 'o', 'filled', 'MarkerEdgeColor', 'k');

        hold on

        tetraplotterhullWhite (K, M, UVreply); 

    elseif reply == 4

        figure;

        scatter3(X,Y,Z,S, col, 'o', 'filled', 'MarkerEdgeColor', 'k');

        hold on 

        for i = 1:patnum

            word = patnames(i);

            text(X(i), Y(i), Z(i),[' ' word])

        end

        tetraplotterhullWhite (K, M, UVreply); 

    end

    disp('You may manipulate the color space tetrahedron in the figure window.')

end 

end


%==============HUE DISPARITY ANALYSIS======================================

if option==9 

disp(' ')

disp('HUE DISPARITY')


reply = menu('Hue disparity options.', 'Press 1 to view the hue disparity and variance of hue disparity.' , 'Press 2 to also view the hue disparity matrix.');


[theta, phi, r] = cart2sph(X, Y, Z);


for i = 1:patnum

Huemat(i, 1) = theta(i);

Huemat(i, 2) = phi(i);

end


if choice == 2

        preference = 0; 

    if reply==1

        [huedisparity, varhuedisparity, maxhuedisparity] = huedispmatrix(Huemat, patnum, patnames, preference);

    elseif reply==2

        [huedisparity, varhuedisparity, maxhuedisparity] = huedispmatrixprint(Huemat, patnum, patnames, preference);

    end

    

else

        

preference = menu('Hue disparity options.', 'Press 1 to include achromatic points in hue disparity analysis.' , 'Press 2 to exclude multiple achromatic points in hue disparity analysis.');


if reply==1

   [huedisparity, varhuedisparity, maxhuedisparity] = huedispmatrix(Huemat, patnum, patnames, preference);

elseif reply==2

   [huedisparity, varhuedisparity, maxhuedisparity] = huedispmatrixprint(Huemat, patnum, patnames, preference);

end


disp(' ')

disp(' ')


end

end


%=============OVERALL COLOR SUMMARY========================================

if option==10  

disp(' ')

disp('SUMMARY OF COLOR MEASUREMENTS')


%=====BRILLIANCE=============================

if choice == 2

    %do nothing

else

    [rows cols] = size (UserOriginal);

        for r = 1: rows


                   uround = UserOriginal(r, 1);

                   d = round(uround);

                   UserOriginal(r, 1) = d;     

        end

               UserZero = UserOriginal;


               for c = 2: cols

                    UserZero (:, c) = NaN;  

               end


            UserOriginal = cat(1, UserOriginal, UserZero); %stacks vertically User and User-size matrix full of Nans for calculating average in next step

        

        for i = 300:700

               brilMatrix((i-299),:) = nanmean(UserOriginal(find(UserOriginal(:,1)==i),:));

        end; 


        brilMatrix = roundn(brilMatrix, -6);


        for i = 1: patnum

           NormBril(i) = sum(brilMatrix(:,i+1))/(401*100); %(i+1) is desired column / column 1 of brilMatrix is 300 - 700

        end

           avBril = mean(NormBril);

end


%=====SPAN=======================================


        incZeroUpperMdist = pdist(M); %Changed from TCS1a

        avcolorspan = mean2(incZeroUpperMdist);

        varcolorspan = std2(incZeroUpperMdist) * std2(incZeroUpperMdist);

        maxcolorspan = max(incZeroUpperMdist);


%======CHROMA=======================================

        [theta, phi, r] = cart2sph(X, Y, Z); 

        avchroma = mean(r); 


%=====VOLUME========================================

       

        if patnum <= 3 

            v = 0;

        else

            K = convhulln(M);

            [K, v] = convhulln(M);

        end


%=====HUE DISPARITY==================================

[theta, phi, r] = cart2sph(X, Y, Z);


        for i = 1:patnum

        Huemat(i, 1) = theta(i);

        Huemat(i, 2) = phi(i);

        end


         for i = 1:patnum

             for j = 1:patnum

                Huedisp(i, j)= acos(cos(Huemat(j,2))*cos(Huemat(i,2))*cos(Huemat(j,1)-Huemat(i,1))+sin(Huemat(j,2))*sin(Huemat(i,2)));

             end

         end

         

    combined = []; 

    n=2; 

    upperHuedisp = triu(Huedisp);

    upperHuedisp = roundn(upperHuedisp, -6);

    for i = 1: patnum

        for c = n:patnum

            incZeroUpperHuedisp(i, :) = upperHuedisp(i, c);

            combined = [combined, incZeroUpperHuedisp(i, :)];

        end

        n = n+1; 

        c = n; 

    end

    

    incZeroUpperHuedisp = combined;

    huedisparity = mean2(incZeroUpperHuedisp);

    varhuedisparity = std2(incZeroUpperHuedisp) * std2(incZeroUpperHuedisp);

    maxhuedisparity = max(incZeroUpperHuedisp);

    

%=====SUMMARY OUTPUT==================================

if choice == 1 

    

[s] = sprintf(['%s\t\t', '%s\t', '%s\t\t', '%s\t\t\t', '%s\t\t', '%s\t', '%s\t', '%s\t', '%s\t'], 'Color span', 'Span variance', 'Max span', 'Volume', 'Hue disp', 'Hue disp var', 'Max hue disp', 'Average bril', 'Average chroma' );

disp(s)


[s] = sprintf([repmat('%.4e\t\t', 1, 9)], avcolorspan , varcolorspan, maxcolorspan, v,  huedisparity, varhuedisparity, maxhuedisparity, avBril, avchroma);

disp(s)


disp(' ')

disp(' ')


elseif choice == 2

    

[s] = sprintf(['%s\t\t', '%s\t', '%s\t\t', '%s\t\t\t', '%s\t\t', '%s\t', '%s\t', '%s\t'], 'Color span', 'Span variance', 'Max span', 'Volume', 'Hue disp', 'Hue disp var', 'Max hue disp', 'Average chroma' );

disp(s)


[s] = sprintf([repmat('%.4e\t\t', 1, 8)], avcolorspan , varcolorspan, maxcolorspan, v,  huedisparity, varhuedisparity, maxhuedisparity, avchroma);

disp(s)


    

disp(' ')

disp(' ')

end

end

%==========PHOTON CATCH====================================================

if option==11  

disp('PHOTON CATCH')   

%disp(PhotonCatch); 


D = ['                  '];

for i = 1:5

    cone = labeltxt(1,i);

    ncone = char(cone);

    ncone(end+1:12) = ' '; 

    D = [D ncone];

end

disp(D)

for i = 1:patnum

   C = PhotonCatch(i, :);

   word = patnames(i);

   S = char(word);

   S(end+1:30) = ' ';

   [s, errmsg] = sprintf(['%s', repmat('%.4f      ',1, 4)], S, C);

   disp(s)

end


disp(' ')

disp(' ')


end

%==========DOUBLE CONE PHOTON CATCH========================================

if option==12

disp('DOUBLE CONE PHOTON CATCH (LUMINANCE)') 

if choice == 2

    disp('Double cone photon catch cannot be calculated from input data.')


else


    if UVreply ==1 || UVreply ==4 || UVreply ==6

        disp('Double cone sensitivities not provided for this visual system.  Repeat the analysis with a new visual system.')

    else

        

%disp(doubleConePhotonCatch); 

   

    D = ['                              '];

    ncone = 'Double cones'; 

    D = [D ncone];

    

    disp(D)

    

    for i = 1:patnum

       C = doubleConePhotonCatch(i, :);

       word = patnames(i);

       S = char(word);

       S(end+1:30) = ' ';

       [s, errmsg] = sprintf(['%s', repmat('%.4f      ',1, 4)], S, C);

       disp(s)

    end


disp(' ')

disp(' ')


    end

end

end



%==========RETURN TO MAIN MENU=============================================

if option==13  %All but the specified variables are cleared.

continu = 0; 

keep('continu','datapathname', 'pathname', 'active', 'fileformat');

end

end

end


%==========================================================================

%========================QUIT==============================================

%==========================================================================


reply = input('Press enter to close all figures.', 's');


if reply 

    close all;

else 

    close all;

end


disp(' ')


disp('This is the end of the program.')


%**************************************************************************


%**************************************************************************


%*****************************SUBFUNCTIONS*********************************


%**************************************************************************


%**************************************************************************


%**************************************************************************

%Multiplies the input matrix by the sensitivity curves to generate the u/v s m l

%proportions for each color patch, incorportates ambient light.

function [Mega, PhotonCatch, doubleConePhotonCatch] = LightProcessMatrix(User, LightMatrix, visiontype, UserDefinedCurves)


%For cases where double cone sensitivities are unavailable

BlankDoubleCones = [0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0]; 


%columns are [nm uvs sws mws lws] with [double cones] added

switch visiontype


case('UVS Average bird')

%The color sone sensitivity curves are from Endler and Mielke 2005.

%The double cone sensitivities are not provided, blank matrix shown here.

%USML sensitivity curves [401 x 5]

sensitivityCurves = [300 0.00066924 0 0 0

301 0.00088357 0 0 0

302 0.00109922 0 0 0

303 0.00131585 0 0 0

304 0.00153312 0 0 0

305 0.00175074 0 0 0

306 0.00196843 0 0 0

307 0.00218598 0 0 0

308 0.00240318 0 0 0

309 0.00261987 0 0 0

310 0.00283592 0 0 0

311 0.00305125 0 0 0

312 0.0032658 0 0 0

313 0.00347955 0 0 0

314 0.0036925 0 0 0

315 0.0039047 0 0 0

316 0.00411622 0 0 0

317 0.00432715 0 0 0

318 0.00453758 0 0 0

319 0.00474765 0 0 0

320 0.0049575 0 0 0

321 0.00516727 0 0 0

322 0.00537711 0 0 0

323 0.00558717 0 0 0

324 0.0057976 0 0 0

325 0.00600854 0 0 0

326 0.00622011 0 0 0

327 0.00643243 0 0 0

328 0.00664559 0 0 0

329 0.00685967 0 0 0

330 0.00707471 0 0 0

331 0.00729074 0 0 0

332 0.00750776 0 0 0

333 0.00772575 0 0 0

334 0.00794463 0 0 0

335 0.00816433 0 0 0

336 0.00838472 0 0 0

337 0.00860567 0 0 0

338 0.00882698 0 0 0

339 0.00904846 0 0 0

340 0.00926987 0 0 0

341 0.00949096 0 0 0

342 0.00971144 0 0 0

343 0.00993101 0 0 0

344 0.01014935 0 0 0

345 0.0103661 0 0 0

346 0.0105809 0 0 0

347 0.01079337 0 0 0

348 0.01100311 0 0 0

349 0.01120972 0 0 0

350 0.01141277 0 0 0

351 0.01161184 0 0 0

352 0.01180646 0 0 0

353 0.01199621 0 0 0

354 0.01218061 0 0 0

355 0.0123592 0 0 0

356 0.01253152 0 0 0

357 0.01269707 0 0 0

358 0.01285537 0 0 0

359 0.01300595 0 0 0

360 0.01314829 0 0 0

361 0.01328191 0 0 0

362 0.01340629 0 0 0

363 0.01352093 0 0 0

364 0.01362532 0 0 0

365 0.01371894 0 0 0

366 0.01380128 0 0 0

367 0.0138718 0 0 0

368 0.01392999 0 0 0

369 0.01397533 0 0 0

370 0.01400727 0 0 0

371 0.01402531 0 0 0

372 0.01402892 0 0 0

373 0.01401758 0 0 0

374 0.01399077 0 0 0

375 0.013948 0 0 0

376 0.01388878 0 0 0

377 0.01381263 0 0 0

378 0.0137191 0 0 0

379 0.01360776 0 0 0

380 0.01347822 0 0 0

381 0.01333013 0 0 0

382 0.01316317 0 0 0

383 0.0129771 0 0 0

384 0.01277174 0 0 0

385 0.01254698 0 0 0

386 0.01230282 0 0 0

387 0.01203937 0 0 0

388 0.01175685 0 0 0

389 0.01145563 0 0 0

390 0.01113625 0 0 0

391 0.01079941 0 0 0

392 0.010446 0 0 0

393 0.01007714 0 0 0

394 0.00969412 0 0 0

395 0.00929849 0.00000001 0 0

396 0.00889198 0.00000003 0 0

397 0.00847655 0.00000008 0 0

398 0.00805434 0.00000021 0 0

399 0.00762765 0.00000052 0 0

400 0.00719891 0.00000119 0 0

401 0.00677065 0.00000254 0 0

402 0.0063454 0.00000514 0 0

403 0.00592571 0.0000098 0 0

404 0.00551403 0.00001778 0 0

405 0.00511269 0.00003075 0 0

406 0.00472383 0.00005092 0 0

407 0.00434937 0.00008102 0 0

408 0.00399095 0.00012427 0 0

409 0.00364991 0.00018426 0 0

410 0.00332729 0.00026484 0 0

411 0.00302382 0.00036993 0 0

412 0.00273991 0.00050331 0 0

413 0.00247569 0.00066841 0 0

414 0.00223102 0.0008681 0 0

415 0.00200552 0.00110459 0 0

416 0.00179862 0.00137924 0 0

417 0.00160958 0.00169253 0 0

418 0.00143754 0.00204404 0 0

419 0.00128154 0.00243248 0 0

420 0.00114056 0.00285574 0 0

421 0.00101355 0.00331103 0 0

422 0.00089946 0.00379495 0 0

423 0.00079724 0.00430369 0 0

424 0.00070586 0.00483311 0 0

425 0.00062436 0.00537887 0 0

426 0.00055181 0.00593661 0 0

427 0.00048734 0.006502 0 0

428 0.00043013 0.00707085 0 0

429 0.00037944 0.00763918 0 0

430 0.00033458 0.00820328 0 0

431 0.00029493 0.00875973 0 0

432 0.0002599 0.00930546 0 0

433 0.00022898 0.00983773 0 0

434 0.00020172 0.01035414 0 0

435 0.00017769 0.01085262 0 0

436 0.00015652 0.01133143 0 0

437 0.00013787 0.01178911 0 0

438 0.00012146 0.01222448 0 0

439 0.00010701 0.01263663 0 0

440 0.00009429 0.01302485 0 0

441 0.0000831 0.01338865 0 0

442 0.00007326 0.01372771 0 0

443 0.00006459 0.01404186 0 0

444 0.00005697 0.01433105 0 0

445 0.00005026 0.01459537 0 0

446 0.00004435 0.01483497 0 0

447 0.00003915 0.0150501 0 0

448 0.00003458 0.01524106 0 0

449 0.00003054 0.01540822 0 0

450 0.00002699 0.01555196 0 0

451 0.00002386 0.01567271 0 0

452 0.00002111 0.01577092 0 0

453 0.00001867 0.01584708 0 0

454 0.00001653 0.01590165 0 0

455 0.00001464 0.01593514 0 0

456 0.00001297 0.01594805 0 0

457 0.00001149 0.0159409 0 0

458 0.00001019 0.0159142 0 0

459 0.00000904 0.01586848 0 0

460 0.00000802 0.01580426 0 0

461 0.00000712 0.01572209 0 0

462 0.00000632 0.01562251 0 0

463 0.00000562 0.01550607 0 0

464 0.000005 0.01537332 0 0

465 0.00000444 0.01522484 0 0

466 0.00000395 0.0150612 0 0

467 0.00000352 0.014883 0 0

468 0.00000313 0.01469085 0 0

469 0.00000279 0.01448534 0 0

470 0.00000249 0.01426711 0 0

471 0.00000222 0.01403681 0 0

472 0.00000198 0.01379507 0 0

473 0.00000177 0.01354257 0 0

474 0.00000158 0.01327998 0 0

475 0.00000141 0.01300798 0 0

476 0.00000126 0.01272727 0 0

477 0.00000113 0.01243855 0 0

478 0.00000101 0.01214253 0 0

479 0.0000009 0.01183992 0 0

480 0.00000081 0.01153144 0 0

481 0.00000072 0.01121781 0 0

482 0.00000065 0.01089975 0 0

483 0.00000058 0.01057798 0 0

484 0.00000052 0.01025321 0 0

485 0.00000047 0.00992616 0.00000001 0

486 0.00000042 0.00959753 0.00000002 0

487 0.00000038 0.00926802 0.00000006 0

488 0.00000034 0.00893832 0.00000014 0

489 0.00000031 0.00860911 0.00000029 0

490 0.00000027 0.00828105 0.0000006 0

491 0.00000025 0.00795479 0.00000119 0

492 0.00000022 0.00763098 0.00000225 0

493 0.0000002 0.00731022 0.00000409 0

494 0.00000018 0.00699314 0.00000719 0

495 0.00000016 0.00668029 0.00001222 0

496 0.00000015 0.00637225 0.0000201 0

497 0.00000013 0.00606956 0.00003207 0

498 0.00000012 0.00577271 0.00004975 0

499 0.00000011 0.0054822 0.00007514 0

500 0.0000001 0.00519847 0.00011068 0

501 0.00000009 0.00492195 0.00015923 0

502 0.00000008 0.00465302 0.00022402 0

503 0.00000007 0.00439204 0.00030866 0

504 0.00000006 0.00413931 0.00041697 0

505 0.00000006 0.0038951 0.00055294 0

506 0.00000005 0.00365966 0.00072054 0

507 0.00000005 0.00343316 0.00092362 0

508 0.00000004 0.00321576 0.00116572 0

509 0.00000004 0.00300754 0.00144995 0

510 0.00000004 0.00280858 0.00177882 0

511 0.00000003 0.00261889 0.00215416 0

512 0.00000003 0.00243843 0.00257697 0

513 0.00000003 0.00226714 0.00304741 0

514 0.00000002 0.00210491 0.00356473 0

515 0.00000002 0.00195159 0.00412726 0

516 0.00000002 0.00180701 0.00473247 0

517 0.00000002 0.00167095 0.005377 0

518 0.00000002 0.00154319 0.00605674 0

519 0.00000002 0.00142345 0.00676691 0

520 0.00000001 0.00131145 0.00750222 0

521 0.00000001 0.0012069 0.00825694 0

522 0.00000001 0.00110948 0.00902506 0

523 0.00000001 0.00101887 0.00980039 0

524 0.00000001 0.00093473 0.01057668 0

525 0.00000001 0.00085675 0.01134774 0

526 0.00000001 0.00078457 0.01210758 0

527 0.00000001 0.00071788 0.01285041 0

528 0.00000001 0.00065634 0.01357082 0

529 0.00000001 0.00059963 0.01426375 0

530 0.00000001 0.00054745 0.01492463 0

531 0 0.0004995 0.01554935 0

532 0 0.00045547 0.01613431 0

533 0 0.00041511 0.01667643 0

534 0 0.00037813 0.01717318 0

535 0 0.00034429 0.01762253 0

536 0 0.00031335 0.01802294 0

537 0 0.00028508 0.01837338 0

538 0 0.00025928 0.01867328 0

539 0 0.00023574 0.01892249 0

540 0 0.00021428 0.01912126 0

541 0 0.00019474 0.01927019 0

542 0 0.00017694 0.01937023 0

543 0 0.00016074 0.01942259 0

544 0 0.00014601 0.01942877 0.00000001

545 0 0.00013261 0.01939046 0.00000002

546 0 0.00012044 0.01930955 0.00000004

547 0 0.00010937 0.01918807 0.00000009

548 0 0.00009932 0.01902818 0.00000019

549 0 0.00009019 0.01883214 0.00000038

550 0 0.0000819 0.01860226 0.00000072

551 0 0.00007438 0.01834092 0.00000133

552 0 0.00006755 0.0180505 0.00000237

553 0 0.00006135 0.0177334 0.00000409

554 0 0.00005573 0.017392 0.00000684

555 0 0.00005062 0.01702865 0.0000111

556 0 0.00004599 0.01664567 0.00001755

557 0 0.00004179 0.01624532 0.00002703

558 0 0.00003797 0.01582979 0.00004062

559 0 0.00003451 0.01540123 0.00005965

560 0 0.00003137 0.01496169 0.0000857

561 0 0.00002853 0.01451315 0.00012061

562 0 0.00002594 0.01405751 0.00016648

563 0 0.00002359 0.01359658 0.00022559

564 0 0.00002146 0.01313209 0.00030042

565 0 0.00001953 0.01266566 0.00039355

566 0 0.00001777 0.01219884 0.00050761

567 0 0.00001618 0.01173309 0.00064517

568 0 0.00001473 0.01126976 0.00080871

569 0 0.00001341 0.01081013 0.00100049

570 0 0.00001222 0.01035538 0.00122249

571 0 0.00001113 0.00990661 0.00147632

572 0 0.00001014 0.00946483 0.00176318

573 0 0.00000925 0.00903095 0.00208379

574 0 0.00000843 0.00860581 0.00243834

575 0 0.00000769 0.00819018 0.00282652

576 0 0.00000701 0.00778471 0.00324747

577 0 0.0000064 0.00739 0.00369979

578 0 0.00000584 0.00700657 0.00418162

579 0 0.00000533 0.00663485 0.0046906

580 0 0.00000487 0.00627521 0.00522398

581 0 0.00000445 0.00592793 0.00577864

582 0 0.00000406 0.00559324 0.00635117

583 0 0.00000371 0.00527129 0.00693794

584 0 0.0000034 0.00496218 0.00753515

585 0 0.0000031 0.00466593 0.00813889

586 0 0.00000284 0.00438254 0.00874525

587 0 0.0000026 0.0041119 0.00935031

588 0 0.00000238 0.00385391 0.00995024

589 0 0.00000218 0.00360839 0.01054136

590 0 0.00000199 0.00337511 0.01112013

591 0 0.00000183 0.00315385 0.01168324

592 0 0.00000167 0.0029443 0.01222761

593 0 0.00000153 0.00274615 0.01275041

594 0 0.0000014 0.00255907 0.0132491

595 0 0.00000129 0.0023827 0.01372141

596 0 0.00000118 0.00221666 0.01416538

597 0 0.00000108 0.00206056 0.01457933

598 0 0.00000099 0.00191401 0.01496187

599 0 0.00000091 0.00177659 0.01531191

600 0 0.00000084 0.00164789 0.01562862

601 0 0.00000077 0.00152752 0.01591142

602 0 0.00000071 0.00141505 0.01616

603 0 0.00000065 0.00131008 0.01637427

604 0 0.0000006 0.00121222 0.01655434

605 0 0.00000055 0.00112108 0.01670055

606 0 0.0000005 0.00103627 0.01681338

607 0 0.00000046 0.00095743 0.0168935

608 0 0.00000043 0.00088421 0.01694171

609 0 0.00000039 0.00081625 0.01695892

610 0 0.00000036 0.00075323 0.01694619

611 0 0.00000033 0.00069483 0.01690463

612 0 0.00000031 0.00064076 0.01683545

613 0 0.00000028 0.00059072 0.01673991

614 0 0.00000026 0.00054444 0.01661934

615 0 0.00000024 0.00050166 0.01647507

616 0 0.00000022 0.00046214 0.0163085

617 0 0.0000002 0.00042565 0.01612101

618 0 0.00000019 0.00039197 0.01591401

619 0 0.00000017 0.0003609 0.01568889

620 0 0.00000016 0.00033225 0.01544703

621 0 0.00000015 0.00030583 0.0151898

622 0 0.00000014 0.00028149 0.01491855

623 0 0.00000013 0.00025907 0.0146346

624 0 0.00000012 0.00023842 0.01433923

625 0 0.00000011 0.0002194 0.01403369

626 0 0.0000001 0.0002019 0.0137192

627 0 0.00000009 0.00018579 0.01339693

628 0 0.00000009 0.00017096 0.013068

629 0 0.00000008 0.00015732 0.01273351

630 0 0.00000007 0.00014477 0.01239448

631 0 0.00000007 0.00013323 0.01205192

632 0 0.00000006 0.00012261 0.01170677

633 0 0.00000006 0.00011284 0.01135994

634 0 0.00000005 0.00010386 0.01101229

635 0 0.00000005 0.00009561 0.01066462

636 0 0.00000005 0.00008801 0.01031771

637 0 0.00000004 0.00008103 0.00997228

638 0 0.00000004 0.00007461 0.00962901

639 0 0.00000004 0.0000687 0.00928854

640 0 0.00000003 0.00006327 0.00895147

641 0 0.00000003 0.00005828 0.00861836

642 0 0.00000003 0.00005369 0.00828972

643 0 0.00000003 0.00004946 0.00796604

644 0 0.00000003 0.00004558 0.00764775

645 0 0.00000002 0.000042 0.00733526

646 0 0.00000002 0.00003872 0.00702895

647 0 0.00000002 0.00003569 0.00672913

648 0 0.00000002 0.00003291 0.00643612

649 0 0.00000002 0.00003035 0.00615018

650 0 0.00000002 0.00002799 0.00587154

651 0 0.00000002 0.00002582 0.00560041

652 0 0.00000001 0.00002382 0.00533695

653 0 0.00000001 0.00002198 0.0050813

654 0 0.00000001 0.00002029 0.00483359

655 0 0.00000001 0.00001873 0.00459388

656 0 0.00000001 0.0000173 0.00436224

657 0 0.00000001 0.00001597 0.00413869

658 0 0.00000001 0.00001475 0.00392324

659 0 0.00000001 0.00001363 0.00371587

660 0 0.00000001 0.00001259 0.00351653

661 0 0.00000001 0.00001164 0.00332516

662 0 0.00000001 0.00001076 0.00314168

663 0 0.00000001 0.00000995 0.00296599

664 0 0.00000001 0.0000092 0.00279795

665 0 0.00000001 0.00000851 0.00263743

666 0 0.00000001 0.00000787 0.00248428

667 0 0 0.00000728 0.00233833

668 0 0 0.00000674 0.00219941

669 0 0 0.00000624 0.00206733

670 0 0 0.00000578 0.00194189

671 0 0 0.00000535 0.00182288

672 0 0 0.00000496 0.0017101

673 0 0 0.00000459 0.00160332

674 0 0 0.00000425 0.00150234

675 0 0 0.00000394 0.00140693

676 0 0 0.00000366 0.00131687

677 0 0 0.00000339 0.00123194

678 0 0 0.00000314 0.00115191

679 0 0 0.00000292 0.00107657

680 0 0 0.00000271 0.00100571

681 0 0 0.00000251 0.00093911

682 0 0 0.00000233 0.00087655

683 0 0 0.00000216 0.00081785

684 0 0 0.00000201 0.0007628

685 0 0 0.00000187 0.00071121

686 0 0 0.00000173 0.00066289

687 0 0 0.00000161 0.00061767

688 0 0 0.0000015 0.00057537

689 0 0 0.00000139 0.00053582

690 0 0 0.00000129 0.00049887

691 0 0 0.0000012 0.00046436

692 0 0 0.00000112 0.00043214

693 0 0 0.00000104 0.00040208

694 0 0 0.00000096 0.00036964

695 0 0 0.00000089 0.00034367

696 0 0 0.00000083 0.00031948

697 0 0 0.00000077 0.00029695

698 0 0 0.00000072 0.00027597

699 0 0 0.00000067 0.00025645

700 0 0 0.00000062 0.00023828

];


sensitivityCurves = cat(2, sensitivityCurves, BlankDoubleCones); 


case('UVS Blue tit')

%The color cone sensitivity curves are derived from data provided by Nathan Hart. 

%The double cone sensitivities are derived from data provided by Martin Stevens.

sensitivityCurves =[

300 6.37E-05 0.00E+00 0.00E+00 0.00E+00

301 7.55E-05 0.00E+00 0.00E+00 0.00E+00

302 9.39E-05 0.00E+00 0.00E+00 0.00E+00

303 1.22E-04 0.00E+00 0.00E+00 0.00E+00

304 1.66E-04 0.00E+00 0.00E+00 0.00E+00

305 2.31E-04 0.00E+00 0.00E+00 0.00E+00

306 3.29E-04 0.00E+00 0.00E+00 0.00E+00

307 4.77E-04 0.00E+00 0.00E+00 0.00E+00

308 6.98E-04 0.00E+00 0.00E+00 0.00E+00

309 1.01E-03 0.00E+00 0.00E+00 0.00E+00

310 1.42E-03 0.00E+00 0.00E+00 0.00E+00

311 1.92E-03 0.00E+00 0.00E+00 0.00E+00

312 2.49E-03 0.00E+00 0.00E+00 0.00E+00

313 3.07E-03 0.00E+00 0.00E+00 0.00E+00

314 3.64E-03 0.00E+00 0.00E+00 0.00E+00

315 4.17E-03 0.00E+00 0.00E+00 0.00E+00

316 4.65E-03 0.00E+00 0.00E+00 0.00E+00

317 5.06E-03 0.00E+00 0.00E+00 0.00E+00

318 5.42E-03 0.00E+00 0.00E+00 0.00E+00

319 5.72E-03 0.00E+00 0.00E+00 0.00E+00

320 5.97E-03 0.00E+00 0.00E+00 0.00E+00

321 6.19E-03 0.00E+00 0.00E+00 0.00E+00

322 6.39E-03 0.00E+00 0.00E+00 0.00E+00

323 6.57E-03 0.00E+00 0.00E+00 0.00E+00

324 6.75E-03 0.00E+00 0.00E+00 0.00E+00

325 6.91E-03 0.00E+00 0.00E+00 0.00E+00

326 7.06E-03 0.00E+00 0.00E+00 0.00E+00

327 7.22E-03 0.00E+00 0.00E+00 0.00E+00

328 7.36E-03 0.00E+00 0.00E+00 0.00E+00

329 7.51E-03 0.00E+00 0.00E+00 0.00E+00

330 7.65E-03 0.00E+00 0.00E+00 0.00E+00

331 7.81E-03 0.00E+00 0.00E+00 0.00E+00

332 7.96E-03 0.00E+00 0.00E+00 0.00E+00

333 8.10E-03 0.00E+00 0.00E+00 0.00E+00

334 8.24E-03 0.00E+00 0.00E+00 0.00E+00

335 8.37E-03 0.00E+00 0.00E+00 0.00E+00

336 8.52E-03 0.00E+00 0.00E+00 0.00E+00

337 8.66E-03 0.00E+00 0.00E+00 0.00E+00

338 8.81E-03 0.00E+00 0.00E+00 0.00E+00

339 8.96E-03 0.00E+00 0.00E+00 0.00E+00

340 9.12E-03 0.00E+00 0.00E+00 0.00E+00

341 9.28E-03 0.00E+00 0.00E+00 0.00E+00

342 9.45E-03 0.00E+00 0.00E+00 0.00E+00

343 9.62E-03 0.00E+00 0.00E+00 0.00E+00

344 9.79E-03 0.00E+00 0.00E+00 0.00E+00

345 9.97E-03 0.00E+00 0.00E+00 0.00E+00

346 1.02E-02 0.00E+00 0.00E+00 0.00E+00

347 1.03E-02 0.00E+00 0.00E+00 0.00E+00

348 1.05E-02 0.00E+00 0.00E+00 0.00E+00

349 1.07E-02 0.00E+00 0.00E+00 0.00E+00

350 1.09E-02 0.00E+00 0.00E+00 0.00E+00

351 1.10E-02 0.00E+00 0.00E+00 0.00E+00

352 1.12E-02 0.00E+00 0.00E+00 0.00E+00

353 1.13E-02 0.00E+00 0.00E+00 0.00E+00

354 1.15E-02 0.00E+00 0.00E+00 0.00E+00

355 1.17E-02 0.00E+00 0.00E+00 0.00E+00

356 1.18E-02 0.00E+00 0.00E+00 0.00E+00

357 1.19E-02 0.00E+00 0.00E+00 0.00E+00

358 1.20E-02 0.00E+00 0.00E+00 0.00E+00

359 1.21E-02 0.00E+00 0.00E+00 0.00E+00

360 1.22E-02 0.00E+00 0.00E+00 0.00E+00

361 1.23E-02 0.00E+00 0.00E+00 0.00E+00

362 1.24E-02 0.00E+00 0.00E+00 0.00E+00

363 1.25E-02 0.00E+00 0.00E+00 0.00E+00

364 1.25E-02 0.00E+00 0.00E+00 0.00E+00

365 1.26E-02 0.00E+00 0.00E+00 0.00E+00

366 1.26E-02 0.00E+00 0.00E+00 0.00E+00

367 1.27E-02 0.00E+00 0.00E+00 0.00E+00

368 1.28E-02 0.00E+00 0.00E+00 0.00E+00

369 1.28E-02 0.00E+00 0.00E+00 0.00E+00

370 1.29E-02 0.00E+00 0.00E+00 0.00E+00

371 1.29E-02 0.00E+00 0.00E+00 0.00E+00

372 1.30E-02 0.00E+00 0.00E+00 0.00E+00

373 1.30E-02 0.00E+00 0.00E+00 0.00E+00

374 1.30E-02 0.00E+00 0.00E+00 0.00E+00

375 1.30E-02 0.00E+00 0.00E+00 0.00E+00

376 1.30E-02 0.00E+00 0.00E+00 0.00E+00

377 1.29E-02 0.00E+00 0.00E+00 0.00E+00

378 1.29E-02 0.00E+00 0.00E+00 0.00E+00

379 1.28E-02 0.00E+00 0.00E+00 0.00E+00

380 1.27E-02 0.00E+00 0.00E+00 0.00E+00

381 1.27E-02 0.00E+00 0.00E+00 0.00E+00

382 1.26E-02 0.00E+00 0.00E+00 0.00E+00

383 1.24E-02 0.00E+00 0.00E+00 0.00E+00

384 1.23E-02 0.00E+00 0.00E+00 0.00E+00

385 1.22E-02 0.00E+00 0.00E+00 0.00E+00

386 1.20E-02 0.00E+00 0.00E+00 0.00E+00

387 1.18E-02 0.00E+00 0.00E+00 0.00E+00

388 1.17E-02 0.00E+00 0.00E+00 0.00E+00

389 1.15E-02 0.00E+00 0.00E+00 0.00E+00

390 1.12E-02 0.00E+00 0.00E+00 0.00E+00

391 1.10E-02 0.00E+00 0.00E+00 0.00E+00

392 1.08E-02 0.00E+00 0.00E+00 0.00E+00

393 1.05E-02 0.00E+00 0.00E+00 0.00E+00

394 1.02E-02 0.00E+00 0.00E+00 0.00E+00

395 9.92E-03 0.00E+00 0.00E+00 0.00E+00

396 9.61E-03 0.00E+00 0.00E+00 0.00E+00

397 9.29E-03 0.00E+00 0.00E+00 0.00E+00

398 8.96E-03 0.00E+00 0.00E+00 0.00E+00

399 8.62E-03 0.00E+00 0.00E+00 0.00E+00

400 8.27E-03 0.00E+00 0.00E+00 0.00E+00

401 7.91E-03 0.00E+00 0.00E+00 0.00E+00

402 7.55E-03 0.00E+00 0.00E+00 0.00E+00

403 7.18E-03 0.00E+00 0.00E+00 0.00E+00

404 6.81E-03 1.16E-05 0.00E+00 0.00E+00

405 6.44E-03 2.24E-05 0.00E+00 0.00E+00

406 6.07E-03 4.76E-05 0.00E+00 0.00E+00

407 5.70E-03 1.02E-04 0.00E+00 0.00E+00

408 5.33E-03 1.71E-04 0.00E+00 0.00E+00

409 4.98E-03 2.82E-04 0.00E+00 0.00E+00

410 4.63E-03 3.92E-04 0.00E+00 0.00E+00

411 4.30E-03 5.37E-04 0.00E+00 0.00E+00

412 3.98E-03 7.01E-04 0.00E+00 0.00E+00

413 3.66E-03 8.96E-04 0.00E+00 0.00E+00

414 3.37E-03 1.11E-03 0.00E+00 0.00E+00

415 3.09E-03 1.37E-03 0.00E+00 0.00E+00

416 2.82E-03 1.64E-03 0.00E+00 0.00E+00

417 2.57E-03 1.98E-03 0.00E+00 0.00E+00

418 2.34E-03 2.31E-03 0.00E+00 0.00E+00

419 2.12E-03 2.71E-03 0.00E+00 0.00E+00

420 1.92E-03 3.07E-03 0.00E+00 0.00E+00

421 1.74E-03 3.53E-03 0.00E+00 0.00E+00

422 1.57E-03 3.98E-03 0.00E+00 0.00E+00

423 1.41E-03 4.48E-03 0.00E+00 0.00E+00

424 1.27E-03 4.97E-03 0.00E+00 0.00E+00

425 1.14E-03 5.52E-03 0.00E+00 0.00E+00

426 1.02E-03 6.06E-03 0.00E+00 0.00E+00

427 9.08E-04 6.65E-03 0.00E+00 0.00E+00

428 8.11E-04 7.19E-03 0.00E+00 0.00E+00

429 7.23E-04 7.77E-03 0.00E+00 0.00E+00

430 6.43E-04 8.33E-03 0.00E+00 0.00E+00

431 5.72E-04 8.94E-03 0.00E+00 0.00E+00

432 5.08E-04 9.47E-03 0.00E+00 0.00E+00

433 4.51E-04 1.00E-02 0.00E+00 0.00E+00

434 3.99E-04 1.05E-02 0.00E+00 0.00E+00

435 3.54E-04 1.10E-02 0.00E+00 0.00E+00

436 3.13E-04 1.15E-02 0.00E+00 0.00E+00

437 2.77E-04 1.19E-02 0.00E+00 0.00E+00

438 2.45E-04 1.23E-02 0.00E+00 0.00E+00

439 2.17E-04 1.26E-02 0.00E+00 0.00E+00

440 1.92E-04 1.29E-02 0.00E+00 0.00E+00

441 1.69E-04 1.32E-02 0.00E+00 0.00E+00

442 1.50E-04 1.34E-02 0.00E+00 0.00E+00

443 1.32E-04 1.37E-02 0.00E+00 0.00E+00

444 1.17E-04 1.38E-02 0.00E+00 0.00E+00

445 1.03E-04 1.40E-02 0.00E+00 0.00E+00

446 9.11E-05 1.41E-02 0.00E+00 0.00E+00

447 8.05E-05 1.43E-02 0.00E+00 0.00E+00

448 7.11E-05 1.44E-02 0.00E+00 0.00E+00

449 6.28E-05 1.44E-02 0.00E+00 0.00E+00

450 5.55E-05 1.45E-02 0.00E+00 0.00E+00

451 4.91E-05 1.45E-02 0.00E+00 0.00E+00

452 4.34E-05 1.46E-02 0.00E+00 0.00E+00

453 3.84E-05 1.46E-02 0.00E+00 0.00E+00

454 3.40E-05 1.47E-02 0.00E+00 0.00E+00

455 3.01E-05 1.47E-02 0.00E+00 0.00E+00

456 2.66E-05 1.47E-02 0.00E+00 0.00E+00

457 2.36E-05 1.46E-02 0.00E+00 0.00E+00

458 2.09E-05 1.46E-02 0.00E+00 0.00E+00

459 1.85E-05 1.45E-02 0.00E+00 0.00E+00

460 1.64E-05 1.45E-02 0.00E+00 0.00E+00

461 1.46E-05 1.44E-02 0.00E+00 0.00E+00

462 1.29E-05 1.44E-02 0.00E+00 0.00E+00

463 1.15E-05 1.43E-02 0.00E+00 0.00E+00

464 1.02E-05 1.42E-02 0.00E+00 0.00E+00

465 9.04E-06 1.41E-02 0.00E+00 0.00E+00

466 8.04E-06 1.40E-02 0.00E+00 0.00E+00

467 7.15E-06 1.38E-02 0.00E+00 0.00E+00

468 6.36E-06 1.37E-02 0.00E+00 0.00E+00

469 5.66E-06 1.35E-02 0.00E+00 0.00E+00

470 5.04E-06 1.34E-02 0.00E+00 0.00E+00

471 4.49E-06 1.32E-02 0.00E+00 0.00E+00

472 4.00E-06 1.31E-02 0.00E+00 0.00E+00

473 3.56E-06 1.29E-02 0.00E+00 0.00E+00

474 3.18E-06 1.27E-02 0.00E+00 0.00E+00

475 2.84E-06 1.25E-02 0.00E+00 0.00E+00

476 2.53E-06 1.23E-02 0.00E+00 0.00E+00

477 2.26E-06 1.21E-02 0.00E+00 0.00E+00

478 2.02E-06 1.18E-02 0.00E+00 0.00E+00

479 1.81E-06 1.16E-02 0.00E+00 0.00E+00

480 1.61E-06 1.14E-02 0.00E+00 0.00E+00

481 1.44E-06 1.11E-02 0.00E+00 0.00E+00

482 1.29E-06 1.09E-02 0.00E+00 0.00E+00

483 1.16E-06 1.06E-02 0.00E+00 0.00E+00

484 1.04E-06 1.03E-02 0.00E+00 0.00E+00

485 9.28E-07 1.01E-02 0.00E+00 0.00E+00

486 8.32E-07 9.79E-03 0.00E+00 0.00E+00

487 7.47E-07 9.51E-03 0.00E+00 0.00E+00

488 6.70E-07 9.23E-03 9.46E-06 0.00E+00

489 6.01E-07 8.95E-03 0.00E+00 0.00E+00

490 5.40E-07 8.68E-03 2.08E-07 0.00E+00

491 4.86E-07 8.41E-03 6.54E-06 0.00E+00

492 4.36E-07 8.14E-03 1.84E-05 0.00E+00

493 3.92E-07 7.86E-03 3.98E-05 0.00E+00

494 3.53E-07 7.59E-03 6.61E-05 0.00E+00

495 3.18E-07 7.31E-03 1.11E-04 0.00E+00

496 2.86E-07 7.03E-03 1.63E-04 0.00E+00

497 2.58E-07 6.76E-03 2.41E-04 0.00E+00

498 2.32E-07 6.50E-03 3.22E-04 0.00E+00

499 2.09E-07 6.23E-03 4.43E-04 0.00E+00

500 1.89E-07 5.97E-03 5.70E-04 0.00E+00

501 1.70E-07 5.71E-03 7.46E-04 0.00E+00

502 1.54E-07 5.45E-03 9.21E-04 0.00E+00

503 1.39E-07 5.20E-03 1.16E-03 0.00E+00

504 1.25E-07 4.94E-03 1.40E-03 0.00E+00

505 1.13E-07 4.70E-03 1.71E-03 0.00E+00

506 1.02E-07 4.46E-03 2.02E-03 0.00E+00

507 9.25E-08 4.24E-03 2.41E-03 0.00E+00

508 8.36E-08 4.01E-03 2.78E-03 0.00E+00

509 7.57E-08 3.79E-03 3.25E-03 0.00E+00

510 6.85E-08 3.58E-03 3.71E-03 0.00E+00

511 6.21E-08 3.37E-03 4.27E-03 0.00E+00

512 5.62E-08 3.17E-03 4.79E-03 0.00E+00

513 5.09E-08 2.97E-03 5.42E-03 0.00E+00

514 4.62E-08 2.79E-03 6.01E-03 0.00E+00

515 4.19E-08 2.61E-03 6.71E-03 0.00E+00

516 3.80E-08 2.44E-03 7.35E-03 0.00E+00

517 3.45E-08 2.28E-03 8.08E-03 0.00E+00

518 3.13E-08 2.12E-03 8.75E-03 0.00E+00

519 2.85E-08 1.98E-03 9.51E-03 0.00E+00

520 2.58E-08 1.84E-03 1.02E-02 0.00E+00

521 2.35E-08 1.71E-03 1.10E-02 0.00E+00

522 2.14E-08 1.58E-03 1.16E-02 0.00E+00

523 1.94E-08 1.46E-03 1.24E-02 0.00E+00

524 1.77E-08 1.35E-03 1.30E-02 0.00E+00

525 1.61E-08 1.25E-03 1.38E-02 0.00E+00

526 1.47E-08 1.15E-03 1.44E-02 0.00E+00

527 1.33E-08 1.06E-03 1.50E-02 0.00E+00

528 1.22E-08 9.81E-04 1.56E-02 0.00E+00

529 1.11E-08 9.03E-04 1.61E-02 0.00E+00

530 1.01E-08 8.30E-04 1.66E-02 0.00E+00

531 9.23E-09 7.62E-04 1.71E-02 0.00E+00

532 8.42E-09 6.99E-04 1.75E-02 0.00E+00

533 7.69E-09 6.42E-04 1.79E-02 0.00E+00

534 7.02E-09 5.88E-04 1.82E-02 0.00E+00

535 6.41E-09 5.38E-04 1.85E-02 0.00E+00

536 5.86E-09 4.92E-04 1.87E-02 0.00E+00

537 5.36E-09 4.50E-04 1.89E-02 0.00E+00

538 4.90E-09 4.11E-04 1.90E-02 0.00E+00

539 4.48E-09 3.75E-04 1.90E-02 0.00E+00

540 4.10E-09 3.42E-04 1.90E-02 0.00E+00

541 3.75E-09 3.12E-04 1.90E-02 0.00E+00

542 3.44E-09 2.84E-04 1.90E-02 0.00E+00

543 3.15E-09 2.59E-04 1.89E-02 0.00E+00

544 2.88E-09 2.36E-04 1.87E-02 0.00E+00

545 2.64E-09 2.15E-04 1.85E-02 7.26E-07

546 2.42E-09 1.96E-04 1.83E-02 9.59E-07

547 2.22E-09 1.78E-04 1.81E-02 0.00E+00

548 2.04E-09 1.62E-04 1.78E-02 1.72E-06

549 1.87E-09 1.48E-04 1.75E-02 9.55E-07

550 1.72E-09 1.34E-04 1.71E-02 4.21E-06

551 1.58E-09 1.22E-04 1.68E-02 4.02E-06

552 1.45E-09 1.11E-04 1.64E-02 8.04E-06

553 1.33E-09 1.01E-04 1.60E-02 8.45E-06

554 1.22E-09 9.18E-05 1.56E-02 1.42E-05

555 1.13E-09 8.36E-05 1.52E-02 1.97E-05

556 1.04E-09 7.60E-05 1.48E-02 3.02E-05

557 9.53E-10 6.91E-05 1.44E-02 4.16E-05

558 8.77E-10 6.29E-05 1.39E-02 5.60E-05

559 8.07E-10 5.72E-05 1.35E-02 7.66E-05

560 7.44E-10 5.20E-05 1.31E-02 1.03E-04

561 6.85E-10 4.73E-05 1.26E-02 1.38E-04

562 6.31E-10 4.31E-05 1.22E-02 1.79E-04

563 5.82E-10 3.92E-05 1.18E-02 2.35E-04

564 5.36E-10 3.56E-05 1.13E-02 3.01E-04

565 4.94E-10 3.24E-05 1.09E-02 3.88E-04

566 4.56E-10 2.95E-05 1.05E-02 4.85E-04

567 4.21E-10 2.68E-05 1.00E-02 6.15E-04

568 3.88E-10 2.44E-05 9.62E-03 7.54E-04

569 3.58E-10 2.22E-05 9.21E-03 9.38E-04

570 3.31E-10 2.02E-05 8.80E-03 1.13E-03

571 3.05E-10 1.84E-05 8.41E-03 1.38E-03

572 2.82E-10 1.68E-05 8.02E-03 1.63E-03

573 2.61E-10 1.53E-05 7.65E-03 1.96E-03

574 2.41E-10 1.39E-05 7.28E-03 2.28E-03

575 2.23E-10 1.27E-05 6.92E-03 2.68E-03

576 2.06E-10 1.16E-05 6.57E-03 3.08E-03

577 1.91E-10 1.05E-05 6.24E-03 3.56E-03

578 1.76E-10 9.62E-06 5.91E-03 4.03E-03

579 1.63E-10 8.78E-06 5.60E-03 4.59E-03

580 1.51E-10 8.01E-06 5.30E-03 5.13E-03

581 1.40E-10 7.32E-06 5.01E-03 5.76E-03

582 1.30E-10 6.69E-06 4.73E-03 6.34E-03

583 1.21E-10 6.11E-06 4.46E-03 7.03E-03

584 1.12E-10 5.59E-06 4.20E-03 7.65E-03

585 1.04E-10 5.11E-06 3.95E-03 8.36E-03

586 9.62E-11 4.68E-06 3.72E-03 9.00E-03

587 8.93E-11 4.28E-06 3.49E-03 9.73E-03

588 8.30E-11 3.92E-06 3.28E-03 1.04E-02

589 7.70E-11 3.58E-06 3.07E-03 1.11E-02

590 7.15E-11 3.28E-06 2.87E-03 1.17E-02

591 6.65E-11 3.00E-06 2.69E-03 1.23E-02

592 6.18E-11 2.75E-06 2.51E-03 1.29E-02

593 5.74E-11 2.51E-06 2.35E-03 1.35E-02

594 5.33E-11 2.30E-06 2.19E-03 1.40E-02

595 4.96E-11 2.11E-06 2.04E-03 1.46E-02

596 4.61E-11 1.93E-06 1.90E-03 1.50E-02

597 4.29E-11 1.77E-06 1.77E-03 1.55E-02

598 3.99E-11 1.62E-06 1.64E-03 1.58E-02

599 3.71E-11 1.49E-06 1.53E-03 1.62E-02

600 3.46E-11 1.36E-06 1.42E-03 1.64E-02

601 3.22E-11 1.25E-06 1.31E-03 1.67E-02

602 3.00E-11 1.15E-06 1.22E-03 1.69E-02

603 2.79E-11 1.06E-06 1.13E-03 1.71E-02

604 2.60E-11 9.69E-07 1.05E-03 1.72E-02

605 2.42E-11 8.90E-07 9.68E-04 1.74E-02

606 2.26E-11 8.18E-07 8.96E-04 1.74E-02

607 2.11E-11 7.51E-07 8.28E-04 1.75E-02

608 1.96E-11 6.91E-07 7.65E-04 1.74E-02

609 1.83E-11 6.35E-07 7.07E-04 1.74E-02

610 1.71E-11 5.84E-07 6.53E-04 1.73E-02

611 1.59E-11 5.37E-07 6.03E-04 1.72E-02

612 1.49E-11 4.94E-07 5.56E-04 1.71E-02

613 1.39E-11 4.55E-07 5.13E-04 1.69E-02

614 1.30E-11 4.19E-07 4.73E-04 1.68E-02

615 1.21E-11 3.86E-07 4.36E-04 1.66E-02

616 1.13E-11 3.55E-07 4.02E-04 1.63E-02

617 1.06E-11 3.28E-07 3.71E-04 1.61E-02

618 9.89E-12 3.02E-07 3.41E-04 1.59E-02

619 9.24E-12 2.79E-07 3.15E-04 1.56E-02

620 8.64E-12 2.57E-07 2.90E-04 1.53E-02

621 8.08E-12 2.37E-07 2.67E-04 1.50E-02

622 7.56E-12 2.19E-07 2.46E-04 1.47E-02

623 7.07E-12 2.02E-07 2.26E-04 1.44E-02

624 6.62E-12 1.87E-07 2.08E-04 1.41E-02

625 6.19E-12 1.73E-07 1.92E-04 1.37E-02

626 5.80E-12 1.59E-07 1.76E-04 1.34E-02

627 5.43E-12 1.47E-07 1.62E-04 1.31E-02

628 5.09E-12 1.36E-07 1.49E-04 1.27E-02

629 4.77E-12 1.26E-07 1.38E-04 1.24E-02

630 4.47E-12 1.16E-07 1.27E-04 1.20E-02

631 4.19E-12 1.07E-07 1.17E-04 1.17E-02

632 3.92E-12 9.94E-08 1.07E-04 1.13E-02

633 3.68E-12 9.18E-08 9.89E-05 1.10E-02

634 3.45E-12 8.50E-08 9.11E-05 1.06E-02

635 3.24E-12 7.86E-08 8.39E-05 1.03E-02

636 3.04E-12 7.28E-08 7.72E-05 9.92E-03

637 2.85E-12 6.74E-08 7.11E-05 9.58E-03

638 2.67E-12 6.24E-08 6.55E-05 9.24E-03

639 2.51E-12 5.79E-08 6.03E-05 8.90E-03

640 2.36E-12 5.37E-08 5.56E-05 8.57E-03

641 2.21E-12 4.98E-08 5.12E-05 8.24E-03

642 2.08E-12 4.61E-08 4.72E-05 7.92E-03

643 1.95E-12 4.28E-08 4.35E-05 7.60E-03

644 1.83E-12 3.98E-08 4.00E-05 7.29E-03

645 1.72E-12 3.69E-08 3.69E-05 6.99E-03

646 1.62E-12 3.43E-08 3.40E-05 6.69E-03

647 1.52E-12 3.18E-08 3.14E-05 6.40E-03

648 1.43E-12 2.96E-08 2.89E-05 6.11E-03

649 1.35E-12 2.75E-08 2.67E-05 5.83E-03

650 1.27E-12 2.55E-08 2.46E-05 5.56E-03

651 1.19E-12 2.37E-08 2.27E-05 5.31E-03

652 1.12E-12 2.20E-08 2.10E-05 5.05E-03

653 1.06E-12 2.04E-08 1.94E-05 4.81E-03

654 9.96E-13 1.90E-08 1.79E-05 4.57E-03

655 9.38E-13 1.76E-08 1.65E-05 4.34E-03

656 8.83E-13 1.64E-08 1.52E-05 4.12E-03

657 8.32E-13 1.53E-08 1.41E-05 3.91E-03

658 7.84E-13 1.42E-08 1.30E-05 3.70E-03

659 7.39E-13 1.32E-08 1.20E-05 3.50E-03

660 6.96E-13 1.23E-08 1.11E-05 3.31E-03

661 6.56E-13 1.14E-08 1.03E-05 3.13E-03

662 6.19E-13 1.07E-08 9.48E-06 2.96E-03

663 5.83E-13 9.94E-09 8.77E-06 2.79E-03

664 5.50E-13 9.27E-09 8.11E-06 2.63E-03

665 5.19E-13 8.63E-09 7.50E-06 2.48E-03

666 4.90E-13 8.05E-09 6.94E-06 2.33E-03

667 4.62E-13 7.50E-09 6.42E-06 2.20E-03

668 4.36E-13 6.99E-09 5.95E-06 2.07E-03

669 4.12E-13 6.52E-09 5.50E-06 1.94E-03

670 3.89E-13 6.09E-09 5.10E-06 1.82E-03

671 3.67E-13 5.67E-09 4.72E-06 1.71E-03

672 3.47E-13 5.30E-09 4.38E-06 1.61E-03

673 3.28E-13 4.95E-09 4.05E-06 1.51E-03

674 3.10E-13 4.62E-09 3.76E-06 1.41E-03

675 2.93E-13 4.32E-09 3.48E-06 1.32E-03

676 2.76E-13 4.03E-09 3.23E-06 1.24E-03

677 2.61E-13 3.77E-09 3.00E-06 1.16E-03

678 2.47E-13 3.52E-09 2.78E-06 1.08E-03

679 2.34E-13 3.29E-09 2.58E-06 1.01E-03

680 2.21E-13 3.08E-09 2.39E-06 9.43E-04

681 2.09E-13 2.88E-09 2.22E-06 8.80E-04

682 1.98E-13 2.69E-09 2.06E-06 8.22E-04

683 1.87E-13 2.52E-09 1.91E-06 7.66E-04

684 1.77E-13 2.35E-09 1.78E-06 7.15E-04

685 1.68E-13 2.20E-09 1.65E-06 6.66E-04

686 1.59E-13 2.06E-09 1.53E-06 6.21E-04

687 1.50E-13 1.93E-09 1.42E-06 5.79E-04

688 1.42E-13 1.81E-09 1.32E-06 5.39E-04

689 1.35E-13 1.69E-09 1.23E-06 5.02E-04

690 1.28E-13 1.58E-09 1.14E-06 4.67E-04

691 1.21E-13 1.48E-09 1.06E-06 4.35E-04

692 1.14E-13 1.39E-09 9.90E-07 4.05E-04

693 1.08E-13 1.30E-09 9.21E-07 3.77E-04

694 1.03E-13 1.22E-09 8.57E-07 3.50E-04

695 9.74E-14 1.15E-09 7.97E-07 3.26E-04

696 9.23E-14 1.07E-09 7.42E-07 3.03E-04

697 8.75E-14 1.01E-09 6.91E-07 2.82E-04

698 8.30E-14 9.45E-10 6.43E-07 2.62E-04

699 7.87E-14 8.87E-10 5.99E-07 2.44E-04

700 7.46E-14 8.31E-10 5.58E-07 2.27E-04]; 


doublecones = [0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

2.51E-05

5.43E-05

8.26E-05

1.10E-04

1.37E-04

1.63E-04

1.89E-04

2.14E-04

2.38E-04

2.63E-04

2.87E-04

3.11E-04

3.36E-04

3.60E-04

3.84E-04

4.09E-04

4.34E-04

4.60E-04

4.86E-04

5.12E-04

5.39E-04

5.67E-04

5.95E-04

6.25E-04

6.54E-04

6.86E-04

7.15E-04

7.47E-04

7.76E-04

8.07E-04

8.35E-04

8.65E-04

8.93E-04

9.22E-04

9.49E-04

9.78E-04

1.01E-03

1.03E-03

1.06E-03

1.09E-03

1.12E-03

1.15E-03

1.18E-03

1.21E-03

1.24E-03

1.27E-03

1.31E-03

1.34E-03

1.38E-03

1.41E-03

1.45E-03

1.49E-03

1.53E-03

1.57E-03

1.61E-03

1.65E-03

1.70E-03

1.74E-03

1.78E-03

1.83E-03

1.88E-03

1.92E-03

1.97E-03

2.02E-03

2.07E-03

2.12E-03

2.17E-03

2.23E-03

2.28E-03

2.34E-03

2.39E-03

2.45E-03

2.51E-03

2.57E-03

2.63E-03

2.69E-03

2.75E-03

2.82E-03

2.88E-03

2.95E-03

3.01E-03

3.08E-03

3.15E-03

3.22E-03

3.29E-03

3.36E-03

3.43E-03

3.51E-03

3.58E-03

3.66E-03

3.73E-03

3.81E-03

3.88E-03

3.96E-03

4.04E-03

4.12E-03

4.20E-03

4.28E-03

4.36E-03

4.44E-03

4.52E-03

4.60E-03

4.68E-03

4.76E-03

4.84E-03

4.92E-03

5.00E-03

5.08E-03

5.16E-03

5.24E-03

5.32E-03

5.41E-03

5.49E-03

5.56E-03

5.65E-03

5.73E-03

5.81E-03

5.88E-03

5.96E-03

6.04E-03

6.11E-03

6.19E-03

6.27E-03

6.34E-03

6.42E-03

6.49E-03

6.56E-03

6.63E-03

6.70E-03

6.76E-03

6.83E-03

6.89E-03

6.95E-03

7.01E-03

7.07E-03

7.13E-03

7.19E-03

7.24E-03

7.29E-03

7.34E-03

7.39E-03

7.44E-03

7.48E-03

7.52E-03

7.56E-03

7.60E-03

7.63E-03

7.66E-03

7.69E-03

7.72E-03

7.74E-03

7.77E-03

7.79E-03

7.80E-03

7.81E-03

7.82E-03

7.83E-03

7.83E-03

7.84E-03

7.83E-03

7.83E-03

7.82E-03

7.80E-03

7.79E-03

7.77E-03

7.74E-03

7.72E-03

7.69E-03

7.66E-03

7.63E-03

7.59E-03

7.56E-03

7.52E-03

7.47E-03

7.43E-03

7.38E-03

7.33E-03

7.28E-03

7.23E-03

7.17E-03

7.11E-03

7.04E-03

6.98E-03

6.90E-03

6.83E-03

6.75E-03

6.67E-03

6.59E-03

6.51E-03

6.42E-03

6.33E-03

6.24E-03

6.14E-03

6.05E-03

5.95E-03

5.85E-03

5.75E-03

5.65E-03

5.54E-03

5.44E-03

5.33E-03

5.22E-03

5.12E-03

5.01E-03

4.90E-03

4.79E-03

4.68E-03

4.57E-03

4.46E-03

4.34E-03

4.23E-03

4.12E-03

4.01E-03

3.90E-03

3.79E-03

3.68E-03

3.57E-03

3.46E-03

3.35E-03

3.25E-03

3.14E-03

3.04E-03

2.94E-03

2.84E-03

2.74E-03

2.64E-03

2.54E-03

2.45E-03

2.36E-03

2.27E-03

2.18E-03

2.09E-03

2.00E-03

1.92E-03

1.84E-03

1.76E-03

1.68E-03

1.61E-03

1.54E-03

1.47E-03

1.40E-03

1.33E-03

1.27E-03

1.21E-03

1.15E-03

1.09E-03

1.03E-03

9.79E-04

9.28E-04

8.79E-04

8.31E-04

7.86E-04

7.42E-04

7.00E-04

6.60E-04

6.22E-04

5.85E-04

5.50E-04

5.17E-04

4.86E-04

4.56E-04

4.27E-04

4.00E-04

3.75E-04

3.51E-04

3.28E-04

3.06E-04

2.85E-04

2.66E-04

2.48E-04

2.31E-04

2.14E-04

1.92E-04

1.79E-04

1.66E-04

1.54E-04

1.43E-04

1.33E-04

1.24E-04

1.15E-04

1.07E-04

9.92E-05

9.22E-05

8.57E-05

7.97E-05

7.41E-05

6.89E-05

6.41E-05

5.96E-05

5.54E-05

5.15E-05

4.79E-05

4.46E-05];


sensitivityCurves = cat(2, sensitivityCurves, doublecones); 


case('UVS Starling')

%The color cone sensitivity curves are derived from data provided by Nathan Hart. 

%The double cone sensitivities are derived from data provided by Martin Stevens.

sensitivityCurves =[

300 6.38E-06 0.00E+00 0.00E+00 0.00E+00

301 8.41E-06 0.00E+00 0.00E+00 0.00E+00

302 1.16E-05 0.00E+00 0.00E+00 0.00E+00

303 1.66E-05 0.00E+00 0.00E+00 0.00E+00

304 2.48E-05 0.00E+00 0.00E+00 0.00E+00

305 3.84E-05 0.00E+00 0.00E+00 0.00E+00

306 6.09E-05 0.00E+00 0.00E+00 0.00E+00

307 9.85E-05 0.00E+00 0.00E+00 0.00E+00

308 1.59E-04 0.00E+00 0.00E+00 0.00E+00

309 2.59E-04 0.00E+00 0.00E+00 0.00E+00

310 4.19E-04 0.00E+00 0.00E+00 0.00E+00

311 6.62E-04 0.00E+00 0.00E+00 0.00E+00

312 1.00E-03 0.00E+00 0.00E+00 0.00E+00

313 1.44E-03 0.00E+00 0.00E+00 0.00E+00

314 1.97E-03 0.00E+00 0.00E+00 0.00E+00

315 2.56E-03 0.00E+00 0.00E+00 0.00E+00

316 3.17E-03 0.00E+00 0.00E+00 0.00E+00

317 3.75E-03 0.00E+00 0.00E+00 0.00E+00

318 4.29E-03 0.00E+00 0.00E+00 0.00E+00

319 4.77E-03 0.00E+00 0.00E+00 0.00E+00

320 5.19E-03 0.00E+00 0.00E+00 0.00E+00

321 5.56E-03 0.00E+00 0.00E+00 0.00E+00

322 5.89E-03 0.00E+00 0.00E+00 0.00E+00

323 6.18E-03 0.00E+00 0.00E+00 0.00E+00

324 6.45E-03 0.00E+00 0.00E+00 0.00E+00

325 6.69E-03 0.00E+00 0.00E+00 0.00E+00

326 6.93E-03 0.00E+00 0.00E+00 0.00E+00

327 7.15E-03 0.00E+00 0.00E+00 0.00E+00

328 7.37E-03 0.00E+00 0.00E+00 0.00E+00

329 7.58E-03 0.00E+00 0.00E+00 0.00E+00

330 7.77E-03 0.00E+00 0.00E+00 0.00E+00

331 8.00E-03 0.00E+00 0.00E+00 0.00E+00

332 8.21E-03 0.00E+00 0.00E+00 0.00E+00

333 8.43E-03 0.00E+00 0.00E+00 0.00E+00

334 8.66E-03 0.00E+00 0.00E+00 0.00E+00

335 8.90E-03 0.00E+00 0.00E+00 0.00E+00

336 9.16E-03 0.00E+00 0.00E+00 0.00E+00

337 9.41E-03 0.00E+00 0.00E+00 0.00E+00

338 9.66E-03 0.00E+00 0.00E+00 0.00E+00

339 9.92E-03 0.00E+00 0.00E+00 0.00E+00

340 1.02E-02 0.00E+00 0.00E+00 0.00E+00

341 1.05E-02 0.00E+00 0.00E+00 0.00E+00

342 1.08E-02 0.00E+00 0.00E+00 0.00E+00

343 1.11E-02 0.00E+00 0.00E+00 0.00E+00

344 1.14E-02 0.00E+00 0.00E+00 0.00E+00

345 1.16E-02 0.00E+00 0.00E+00 0.00E+00

346 1.19E-02 0.00E+00 0.00E+00 0.00E+00

347 1.21E-02 0.00E+00 0.00E+00 0.00E+00

348 1.24E-02 0.00E+00 0.00E+00 0.00E+00

349 1.26E-02 0.00E+00 0.00E+00 0.00E+00

350 1.29E-02 0.00E+00 0.00E+00 0.00E+00

351 1.31E-02 0.00E+00 0.00E+00 0.00E+00

352 1.33E-02 0.00E+00 0.00E+00 0.00E+00

353 1.36E-02 0.00E+00 0.00E+00 0.00E+00

354 1.39E-02 0.00E+00 0.00E+00 0.00E+00

355 1.41E-02 0.00E+00 0.00E+00 0.00E+00

356 1.43E-02 0.00E+00 1.32E-03 4.27E-04

357 1.45E-02 1.19E-06 1.32E-03 4.31E-04

358 1.47E-02 4.46E-06 1.33E-03 4.26E-04

359 1.49E-02 1.36E-05 1.33E-03 4.31E-04

360 1.51E-02 1.65E-05 1.35E-03 4.63E-04

361 1.52E-02 2.75E-05 1.37E-03 4.74E-04

362 1.54E-02 3.29E-05 1.39E-03 5.00E-04

363 1.55E-02 4.41E-05 1.39E-03 5.06E-04

364 1.55E-02 6.46E-05 1.41E-03 5.31E-04

365 1.55E-02 7.56E-05 1.39E-03 5.50E-04

366 1.56E-02 9.05E-05 1.40E-03 5.67E-04

367 1.56E-02 9.96E-05 1.38E-03 5.82E-04

368 1.57E-02 1.09E-04 1.37E-03 5.88E-04

369 1.57E-02 1.17E-04 1.34E-03 5.94E-04

370 1.57E-02 1.16E-04 1.32E-03 5.89E-04

371 1.56E-02 1.22E-04 1.27E-03 5.75E-04

372 1.55E-02 1.18E-04 1.23E-03 5.60E-04

373 1.54E-02 1.17E-04 1.17E-03 5.38E-04

374 1.53E-02 1.14E-04 1.12E-03 5.17E-04

375 1.52E-02 1.06E-04 1.05E-03 4.91E-04

376 1.50E-02 1.07E-04 1.02E-03 4.77E-04

377 1.48E-02 1.08E-04 9.48E-04 4.48E-04

378 1.46E-02 1.22E-04 9.17E-04 4.33E-04

379 1.44E-02 1.32E-04 8.49E-04 4.03E-04

380 1.41E-02 1.52E-04 8.18E-04 3.85E-04

381 1.39E-02 1.69E-04 7.52E-04 3.55E-04

382 1.36E-02 1.92E-04 7.23E-04 3.39E-04

383 1.33E-02 2.29E-04 6.61E-04 3.10E-04

384 1.29E-02 2.73E-04 6.35E-04 2.92E-04

385 1.26E-02 3.16E-04 5.83E-04 2.69E-04

386 1.22E-02 3.60E-04 5.55E-04 2.51E-04

387 1.17E-02 4.10E-04 5.02E-04 2.25E-04

388 1.13E-02 4.65E-04 4.82E-04 2.12E-04

389 1.08E-02 5.18E-04 4.39E-04 1.91E-04

390 1.04E-02 5.84E-04 4.25E-04 1.84E-04

391 9.89E-03 6.44E-04 3.88E-04 1.69E-04

392 9.39E-03 7.01E-04 3.79E-04 1.65E-04

393 8.88E-03 7.67E-04 3.52E-04 1.56E-04

394 8.38E-03 8.15E-04 3.45E-04 1.53E-04

395 7.87E-03 8.70E-04 3.20E-04 1.48E-04

396 7.37E-03 9.25E-04 3.13E-04 1.45E-04

397 6.87E-03 1.00E-03 2.92E-04 1.40E-04

398 6.38E-03 1.07E-03 2.86E-04 1.37E-04

399 5.90E-03 1.14E-03 2.65E-04 1.32E-04

400 5.44E-03 1.20E-03 2.58E-04 1.30E-04

401 5.00E-03 1.30E-03 2.40E-04 1.25E-04

402 4.57E-03 1.39E-03 2.34E-04 1.21E-04

403 4.17E-03 1.51E-03 2.19E-04 1.15E-04

404 3.79E-03 1.62E-03 2.13E-04 1.12E-04

405 3.43E-03 1.78E-03 2.01E-04 1.07E-04

406 3.09E-03 1.92E-03 1.98E-04 1.05E-04

407 2.79E-03 2.12E-03 1.86E-04 1.01E-04

408 2.50E-03 2.27E-03 1.86E-04 9.96E-05

409 2.24E-03 2.50E-03 1.76E-04 9.70E-05

410 2.00E-03 2.70E-03 1.77E-04 9.59E-05

411 1.78E-03 2.98E-03 1.68E-04 9.42E-05

412 1.58E-03 3.18E-03 1.69E-04 9.38E-05

413 1.41E-03 3.50E-03 1.62E-04 9.28E-05

414 1.25E-03 3.73E-03 1.65E-04 9.31E-05

415 1.10E-03 4.08E-03 1.58E-04 9.24E-05

416 9.75E-04 4.35E-03 1.63E-04 9.29E-05

417 8.61E-04 4.74E-03 1.56E-04 9.16E-05

418 7.60E-04 5.02E-03 1.66E-04 9.20E-05

419 6.70E-04 5.43E-03 1.58E-04 9.05E-05

420 5.91E-04 5.74E-03 1.70E-04 9.18E-05

421 5.20E-04 6.17E-03 1.64E-04 9.03E-05

422 4.58E-04 6.48E-03 1.77E-04 9.04E-05

423 4.03E-04 6.94E-03 1.73E-04 8.95E-05

424 3.55E-04 7.26E-03 1.93E-04 9.06E-05

425 3.13E-04 7.71E-03 1.87E-04 8.94E-05

426 2.75E-04 8.05E-03 2.06E-04 9.05E-05

427 2.42E-04 8.49E-03 1.98E-04 8.86E-05

428 2.13E-04 8.80E-03 2.18E-04 9.03E-05

429 1.87E-04 9.23E-03 2.08E-04 8.84E-05

430 1.65E-04 9.54E-03 2.34E-04 9.04E-05

431 1.45E-04 9.93E-03 2.23E-04 8.76E-05

432 1.27E-04 1.02E-02 2.54E-04 8.99E-05

433 1.12E-04 1.06E-02 2.40E-04 8.69E-05

434 9.86E-05 1.08E-02 2.73E-04 8.85E-05

435 8.68E-05 1.11E-02 2.51E-04 8.45E-05

436 7.65E-05 1.14E-02 2.85E-04 8.59E-05

437 6.73E-05 1.16E-02 2.67E-04 8.19E-05

438 5.93E-05 1.18E-02 2.95E-04 8.32E-05

439 5.23E-05 1.20E-02 2.75E-04 7.93E-05

440 4.61E-05 1.22E-02 3.05E-04 8.02E-05

441 4.06E-05 1.23E-02 2.78E-04 7.52E-05

442 3.58E-05 1.24E-02 3.09E-04 7.71E-05

443 3.16E-05 1.26E-02 2.75E-04 7.19E-05

444 2.78E-05 1.27E-02 3.14E-04 7.46E-05

445 2.46E-05 1.28E-02 2.77E-04 7.05E-05

446 2.17E-05 1.29E-02 3.19E-04 7.33E-05

447 1.92E-05 1.29E-02 2.74E-04 6.86E-05

448 1.69E-05 1.30E-02 3.09E-04 7.14E-05

449 1.50E-05 1.30E-02 2.68E-04 6.70E-05

450 1.33E-05 1.31E-02 3.09E-04 7.03E-05

451 1.17E-05 1.31E-02 2.67E-04 6.65E-05

452 1.04E-05 1.31E-02 3.03E-04 6.96E-05

453 9.21E-06 1.32E-02 2.59E-04 6.49E-05

454 8.16E-06 1.32E-02 2.95E-04 6.81E-05

455 7.24E-06 1.32E-02 2.41E-04 6.34E-05

456 6.42E-06 1.31E-02 2.70E-04 6.52E-05

457 5.69E-06 1.31E-02 2.10E-04 6.05E-05

458 5.05E-06 1.31E-02 2.53E-04 6.35E-05

459 4.49E-06 1.30E-02 2.00E-04 5.86E-05

460 3.98E-06 1.30E-02 2.49E-04 6.16E-05

461 3.54E-06 1.29E-02 1.93E-04 5.66E-05

462 3.15E-06 1.28E-02 2.22E-04 5.89E-05

463 2.80E-06 1.28E-02 1.74E-04 5.54E-05

464 2.50E-06 1.27E-02 2.00E-04 5.85E-05

465 2.22E-06 1.26E-02 1.52E-04 5.46E-05

466 1.98E-06 1.25E-02 1.78E-04 5.72E-05

467 1.77E-06 1.24E-02 1.38E-04 5.37E-05

468 1.58E-06 1.22E-02 1.67E-04 5.57E-05

469 1.41E-06 1.21E-02 1.13E-04 5.13E-05

470 1.26E-06 1.20E-02 1.44E-04 5.50E-05

471 1.12E-06 1.18E-02 8.40E-05 5.06E-05

472 1.00E-06 1.17E-02 1.08E-04 5.24E-05

473 8.95E-07 1.15E-02 7.07E-05 4.90E-05

474 8.00E-07 1.13E-02 9.31E-05 5.12E-05

475 7.16E-07 1.12E-02 5.93E-05 4.66E-05

476 6.41E-07 1.10E-02 8.53E-05 4.90E-05

477 5.74E-07 1.08E-02 5.37E-05 4.50E-05

478 5.15E-07 1.06E-02 8.76E-05 4.78E-05

479 4.61E-07 1.04E-02 5.53E-05 4.48E-05

480 4.14E-07 1.02E-02 9.35E-05 4.84E-05

481 3.71E-07 9.94E-03 5.04E-05 4.36E-05

482 3.33E-07 9.73E-03 8.60E-05 4.71E-05

483 2.99E-07 9.52E-03 5.30E-05 4.40E-05

484 2.69E-07 9.29E-03 8.19E-05 4.69E-05

485 2.42E-07 9.06E-03 4.69E-05 4.23E-05

486 2.17E-07 8.83E-03 6.79E-05 4.46E-05

487 1.96E-07 8.59E-03 3.56E-05 3.98E-05

488 1.76E-07 8.36E-03 5.63E-05 4.18E-05

489 1.59E-07 8.12E-03 2.20E-05 3.74E-05

490 1.43E-07 7.88E-03 4.08E-05 3.87E-05

491 1.29E-07 7.64E-03 6.60E-06 3.30E-05

492 1.16E-07 7.39E-03 2.48E-05 3.44E-05

493 1.05E-07 7.15E-03 0.00E+00 2.91E-05

494 9.44E-08 6.90E-03 2.19E-05 2.98E-05

495 8.51E-08 6.65E-03 6.69E-06 2.49E-05

496 7.68E-08 6.40E-03 3.24E-05 2.59E-05

497 6.94E-08 6.15E-03 3.53E-05 2.21E-05

498 6.27E-08 5.90E-03 6.52E-05 2.30E-05

499 5.66E-08 5.65E-03 7.93E-05 1.93E-05

500 5.12E-08 5.42E-03 1.14E-04 1.98E-05

501 4.63E-08 5.17E-03 1.57E-04 1.70E-05

502 4.19E-08 4.94E-03 2.09E-04 1.75E-05

503 3.79E-08 4.71E-03 2.88E-04 1.41E-05

504 3.43E-08 4.48E-03 3.69E-04 1.42E-05

505 3.11E-08 4.26E-03 4.86E-04 1.18E-05

506 2.82E-08 4.05E-03 5.98E-04 1.14E-05

507 2.56E-08 3.84E-03 7.68E-04 8.76E-06

508 2.32E-08 3.63E-03 9.18E-04 8.27E-06

509 2.10E-08 3.44E-03 1.15E-03 5.72E-06

510 1.91E-08 3.24E-03 1.36E-03 6.98E-06

511 1.73E-08 3.06E-03 1.66E-03 4.09E-06

512 1.57E-08 2.88E-03 1.91E-03 3.70E-06

513 1.43E-08 2.71E-03 2.30E-03 1.86E-06

514 1.30E-08 2.54E-03 2.61E-03 2.12E-06

515 1.18E-08 2.38E-03 3.08E-03 4.11E-07

516 1.08E-08 2.23E-03 3.44E-03 1.36E-06

517 9.80E-09 2.08E-03 3.99E-03 0.00E+00

518 8.91E-09 1.94E-03 4.41E-03 1.87E-06

519 8.11E-09 1.81E-03 5.04E-03 1.21E-06

520 7.39E-09 1.68E-03 5.51E-03 3.71E-06

521 6.73E-09 1.56E-03 6.21E-03 9.71E-07

522 6.14E-09 1.45E-03 6.72E-03 3.45E-06

523 5.60E-09 1.34E-03 7.49E-03 2.58E-06

524 5.10E-09 1.24E-03 8.04E-03 5.70E-06

525 4.66E-09 1.15E-03 8.86E-03 5.38E-06

526 4.25E-09 1.06E-03 9.43E-03 8.97E-06

527 3.88E-09 9.78E-04 1.03E-02 7.71E-06

528 3.55E-09 9.01E-04 1.09E-02 1.04E-05

529 3.25E-09 8.30E-04 1.17E-02 1.02E-05

530 2.97E-09 7.65E-04 1.23E-02 1.38E-05

531 2.72E-09 7.03E-04 1.31E-02 1.33E-05

532 2.49E-09 6.45E-04 1.37E-02 2.03E-05

533 2.28E-09 5.92E-04 1.44E-02 1.97E-05

534 2.09E-09 5.42E-04 1.49E-02 2.70E-05

535 1.91E-09 4.96E-04 1.56E-02 2.62E-05

536 1.75E-09 4.54E-04 1.60E-02 3.32E-05

537 1.61E-09 4.16E-04 1.66E-02 3.36E-05

538 1.47E-09 3.80E-04 1.70E-02 4.09E-05

539 1.35E-09 3.48E-04 1.74E-02 4.40E-05

540 1.24E-09 3.17E-04 1.77E-02 5.00E-05

541 1.14E-09 2.89E-04 1.80E-02 4.97E-05

542 1.04E-09 2.64E-04 1.82E-02 5.65E-05

543 9.57E-10 2.41E-04 1.84E-02 5.33E-05

544 8.79E-10 2.19E-04 1.84E-02 5.97E-05

545 8.08E-10 2.00E-04 1.86E-02 5.70E-05

546 7.43E-10 1.82E-04 1.85E-02 6.59E-05

547 6.82E-10 1.65E-04 1.85E-02 6.42E-05

548 6.27E-10 1.51E-04 1.84E-02 6.95E-05

549 5.77E-10 1.37E-04 1.83E-02 7.04E-05

550 5.31E-10 1.25E-04 1.81E-02 7.57E-05

551 4.89E-10 1.13E-04 1.79E-02 7.73E-05

552 4.50E-10 1.03E-04 1.76E-02 8.66E-05

553 4.14E-10 9.38E-05 1.74E-02 9.30E-05

554 3.81E-10 8.53E-05 1.70E-02 1.04E-04

555 3.51E-10 7.76E-05 1.67E-02 1.17E-04

556 3.24E-10 7.06E-05 1.64E-02 1.32E-04

557 2.99E-10 6.42E-05 1.60E-02 1.52E-04

558 2.76E-10 5.85E-05 1.56E-02 1.75E-04

559 2.55E-10 5.32E-05 1.53E-02 2.11E-04

560 2.35E-10 4.84E-05 1.48E-02 2.42E-04

561 2.17E-10 4.40E-05 1.44E-02 3.02E-04

562 2.00E-10 4.01E-05 1.40E-02 3.48E-04

563 1.85E-10 3.65E-05 1.36E-02 4.32E-04

564 1.71E-10 3.32E-05 1.31E-02 4.98E-04

565 1.58E-10 3.02E-05 1.27E-02 6.20E-04

566 1.46E-10 2.75E-05 1.22E-02 7.13E-04

567 1.35E-10 2.50E-05 1.18E-02 8.83E-04

568 1.25E-10 2.28E-05 1.14E-02 1.01E-03

569 1.16E-10 2.07E-05 1.09E-02 1.24E-03

570 1.07E-10 1.89E-05 1.05E-02 1.42E-03

571 9.90E-11 1.72E-05 1.01E-02 1.71E-03

572 9.16E-11 1.56E-05 9.66E-03 1.93E-03

573 8.48E-11 1.42E-05 9.24E-03 2.30E-03

574 7.85E-11 1.30E-05 8.83E-03 2.58E-03

575 7.27E-11 1.18E-05 8.43E-03 3.03E-03

576 6.74E-11 1.08E-05 8.04E-03 3.38E-03

577 6.25E-11 9.82E-06 7.67E-03 3.91E-03

578 5.80E-11 8.96E-06 7.30E-03 4.31E-03

579 5.38E-11 8.17E-06 6.94E-03 4.92E-03

580 4.99E-11 7.47E-06 6.59E-03 5.37E-03

581 4.64E-11 6.82E-06 6.26E-03 6.04E-03

582 4.31E-11 6.24E-06 5.93E-03 6.53E-03

583 4.00E-11 5.70E-06 5.61E-03 7.25E-03

584 3.72E-11 5.21E-06 5.31E-03 7.77E-03

585 3.45E-11 4.76E-06 5.01E-03 8.51E-03

586 3.21E-11 4.35E-06 4.73E-03 9.03E-03

587 2.98E-11 3.98E-06 4.45E-03 9.78E-03

588 2.77E-11 3.64E-06 4.19E-03 1.03E-02

589 2.58E-11 3.33E-06 3.94E-03 1.10E-02

590 2.40E-11 3.05E-06 3.70E-03 1.15E-02

591 2.23E-11 2.79E-06 3.47E-03 1.22E-02

592 2.08E-11 2.55E-06 3.26E-03 1.26E-02

593 1.93E-11 2.34E-06 3.05E-03 1.33E-02

594 1.80E-11 2.14E-06 2.85E-03 1.37E-02

595 1.68E-11 1.96E-06 2.67E-03 1.43E-02

596 1.56E-11 1.80E-06 2.49E-03 1.46E-02

597 1.46E-11 1.65E-06 2.33E-03 1.51E-02

598 1.36E-11 1.51E-06 2.17E-03 1.53E-02

599 1.27E-11 1.39E-06 2.02E-03 1.58E-02

600 1.18E-11 1.27E-06 1.88E-03 1.59E-02

601 1.10E-11 1.17E-06 1.75E-03 1.63E-02

602 1.03E-11 1.07E-06 1.63E-03 1.64E-02

603 9.60E-12 9.86E-07 1.51E-03 1.66E-02

604 8.96E-12 9.06E-07 1.40E-03 1.67E-02

605 8.36E-12 8.32E-07 1.30E-03 1.68E-02

606 7.81E-12 7.64E-07 1.21E-03 1.68E-02

607 7.29E-12 7.02E-07 1.12E-03 1.69E-02

608 6.81E-12 6.45E-07 1.04E-03 1.68E-02

609 6.36E-12 5.93E-07 9.59E-04 1.68E-02

610 5.94E-12 5.45E-07 8.87E-04 1.67E-02

611 5.55E-12 5.01E-07 8.20E-04 1.66E-02

612 5.19E-12 4.61E-07 7.58E-04 1.64E-02

613 4.85E-12 4.24E-07 7.00E-04 1.63E-02

614 4.54E-12 3.90E-07 6.46E-04 1.61E-02

615 4.24E-12 3.59E-07 5.96E-04 1.59E-02

616 3.97E-12 3.31E-07 5.50E-04 1.57E-02

617 3.72E-12 3.05E-07 5.08E-04 1.55E-02

618 3.48E-12 2.81E-07 4.69E-04 1.52E-02

619 3.26E-12 2.59E-07 4.32E-04 1.50E-02

620 3.06E-12 2.39E-07 3.99E-04 1.47E-02

621 2.87E-12 2.21E-07 3.68E-04 1.45E-02

622 2.69E-12 2.04E-07 3.40E-04 1.41E-02

623 2.52E-12 1.88E-07 3.13E-04 1.39E-02

624 2.36E-12 1.74E-07 2.89E-04 1.35E-02

625 2.22E-12 1.61E-07 2.66E-04 1.33E-02

626 2.08E-12 1.48E-07 2.45E-04 1.29E-02

627 1.95E-12 1.37E-07 2.26E-04 1.26E-02

628 1.83E-12 1.27E-07 2.08E-04 1.22E-02

629 1.72E-12 1.17E-07 1.92E-04 1.19E-02

630 1.61E-12 1.08E-07 1.77E-04 1.16E-02

631 1.51E-12 9.98E-08 1.63E-04 1.12E-02

632 1.42E-12 9.22E-08 1.50E-04 1.09E-02

633 1.33E-12 8.53E-08 1.38E-04 1.05E-02

634 1.25E-12 7.89E-08 1.27E-04 1.02E-02

635 1.17E-12 7.29E-08 1.17E-04 9.84E-03

636 1.10E-12 6.75E-08 1.07E-04 9.49E-03

637 1.04E-12 6.25E-08 9.90E-05 9.16E-03

638 9.75E-13 5.79E-08 9.13E-05 8.83E-03

639 9.16E-13 5.36E-08 8.41E-05 8.51E-03

640 8.62E-13 4.98E-08 7.76E-05 8.19E-03

641 8.11E-13 4.61E-08 7.15E-05 7.88E-03

642 7.64E-13 4.28E-08 6.59E-05 7.57E-03

643 7.19E-13 3.97E-08 6.08E-05 7.28E-03

644 6.77E-13 3.69E-08 5.61E-05 6.98E-03

645 6.37E-13 3.42E-08 5.17E-05 6.69E-03

646 6.00E-13 3.18E-08 4.77E-05 6.40E-03

647 5.65E-13 2.95E-08 4.40E-05 6.13E-03

648 5.32E-13 2.74E-08 4.05E-05 5.85E-03

649 5.01E-13 2.54E-08 3.74E-05 5.59E-03

650 4.72E-13 2.36E-08 3.45E-05 5.33E-03

651 4.44E-13 2.19E-08 3.18E-05 5.08E-03

652 4.19E-13 2.03E-08 2.93E-05 4.83E-03

653 3.94E-13 1.89E-08 2.71E-05 4.59E-03

654 3.72E-13 1.75E-08 2.50E-05 4.36E-03

655 3.51E-13 1.63E-08 2.31E-05 4.14E-03

656 3.31E-13 1.52E-08 2.13E-05 3.93E-03

657 3.12E-13 1.41E-08 1.97E-05 3.73E-03

658 2.95E-13 1.31E-08 1.82E-05 3.53E-03

659 2.78E-13 1.22E-08 1.68E-05 3.35E-03

660 2.63E-13 1.14E-08 1.55E-05 3.16E-03

661 2.48E-13 1.06E-08 1.44E-05 2.99E-03

662 2.34E-13 9.87E-09 1.33E-05 2.82E-03

663 2.21E-13 9.19E-09 1.23E-05 2.66E-03

664 2.09E-13 8.57E-09 1.14E-05 2.51E-03

665 1.97E-13 7.97E-09 1.05E-05 2.37E-03

666 1.86E-13 7.44E-09 9.72E-06 2.23E-03

667 1.76E-13 6.93E-09 8.99E-06 2.10E-03

668 1.67E-13 6.46E-09 8.33E-06 1.97E-03

669 1.57E-13 6.02E-09 7.70E-06 1.85E-03

670 1.49E-13 5.62E-09 7.13E-06 1.74E-03

671 1.41E-13 5.24E-09 6.60E-06 1.63E-03

672 1.33E-13 4.89E-09 6.11E-06 1.52E-03

673 1.26E-13 4.56E-09 5.65E-06 1.43E-03

674 1.19E-13 4.26E-09 5.24E-06 1.34E-03

675 1.12E-13 3.97E-09 4.85E-06 1.25E-03

676 1.06E-13 3.71E-09 4.49E-06 1.17E-03

677 1.01E-13 3.46E-09 4.16E-06 1.09E-03

678 9.51E-14 3.23E-09 3.86E-06 1.02E-03

679 9.00E-14 3.02E-09 3.58E-06 9.54E-04

680 8.52E-14 2.81E-09 3.32E-06 8.90E-04

681 8.07E-14 2.63E-09 3.08E-06 8.31E-04

682 7.65E-14 2.46E-09 2.86E-06 7.76E-04

683 7.25E-14 2.30E-09 2.65E-06 7.24E-04

684 6.87E-14 2.15E-09 2.46E-06 6.75E-04

685 6.51E-14 2.01E-09 2.29E-06 6.29E-04

686 6.17E-14 1.88E-09 2.12E-06 5.86E-04

687 5.85E-14 1.76E-09 1.97E-06 5.46E-04

688 5.55E-14 1.65E-09 1.83E-06 5.09E-04

689 5.26E-14 1.55E-09 1.70E-06 4.74E-04

690 4.99E-14 1.45E-09 1.58E-06 4.41E-04

691 4.73E-14 1.36E-09 1.47E-06 4.10E-04

692 4.49E-14 1.27E-09 1.37E-06 3.82E-04

693 4.25E-14 1.19E-09 1.27E-06 3.55E-04

694 4.03E-14 1.11E-09 1.18E-06 3.30E-04

695 3.83E-14 1.04E-09 1.10E-06 3.07E-04

696 3.63E-14 9.79E-10 1.02E-06 2.85E-04

697 3.45E-14 9.17E-10 9.52E-07 2.65E-04

698 3.27E-14 8.59E-10 8.86E-07 2.46E-04

699 3.10E-14 8.04E-10 8.24E-07 2.29E-04

700 2.95E-14 7.54E-10 7.67E-07 2.12E-04]; 


doublecones = [0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

2.58E-06

2.35E-05

4.47E-05

6.60E-05

8.74E-05

1.09E-04

1.30E-04

1.51E-04

1.73E-04

1.94E-04

2.14E-04

2.35E-04

2.55E-04

2.75E-04

2.95E-04

3.15E-04

3.34E-04

3.53E-04

3.71E-04

3.89E-04

4.05E-04

4.22E-04

4.38E-04

4.54E-04

4.69E-04

4.82E-04

4.96E-04

5.09E-04

5.22E-04

5.34E-04

5.45E-04

5.56E-04

5.66E-04

5.76E-04

5.86E-04

5.95E-04

6.04E-04

6.12E-04

6.19E-04

6.27E-04

6.34E-04

6.41E-04

6.48E-04

6.55E-04

6.61E-04

6.67E-04

6.74E-04

6.80E-04

6.87E-04

6.94E-04

7.02E-04

7.10E-04

7.18E-04

7.27E-04

7.37E-04

7.46E-04

7.58E-04

7.69E-04

7.84E-04

7.95E-04

8.12E-04

8.22E-04

8.40E-04

8.52E-04

8.69E-04

8.83E-04

9.02E-04

9.16E-04

9.35E-04

9.51E-04

9.70E-04

9.87E-04

1.01E-03

1.02E-03

1.04E-03

1.06E-03

1.08E-03

1.10E-03

1.13E-03

1.15E-03

1.17E-03

1.20E-03

1.22E-03

1.25E-03

1.28E-03

1.31E-03

1.34E-03

1.37E-03

1.40E-03

1.43E-03

1.47E-03

1.50E-03

1.54E-03

1.58E-03

1.61E-03

1.65E-03

1.69E-03

1.73E-03

1.78E-03

1.82E-03

1.87E-03

1.91E-03

1.96E-03

2.01E-03

2.06E-03

2.11E-03

2.16E-03

2.21E-03

2.26E-03

2.32E-03

2.37E-03

2.43E-03

2.49E-03

2.54E-03

2.60E-03

2.67E-03

2.73E-03

2.79E-03

2.86E-03

2.92E-03

2.99E-03

3.06E-03

3.12E-03

3.19E-03

3.26E-03

3.34E-03

3.41E-03

3.48E-03

3.55E-03

3.62E-03

3.69E-03

3.77E-03

3.84E-03

3.92E-03

3.99E-03

4.07E-03

4.14E-03

4.22E-03

4.30E-03

4.38E-03

4.46E-03

4.54E-03

4.62E-03

4.70E-03

4.78E-03

4.86E-03

4.94E-03

5.02E-03

5.10E-03

5.18E-03

5.26E-03

5.33E-03

5.41E-03

5.49E-03

5.57E-03

5.64E-03

5.72E-03

5.80E-03

5.87E-03

5.95E-03

6.02E-03

6.10E-03

6.18E-03

6.26E-03

6.33E-03

6.41E-03

6.48E-03

6.54E-03

6.61E-03

6.68E-03

6.74E-03

6.81E-03

6.87E-03

6.92E-03

6.98E-03

7.03E-03

7.09E-03

7.14E-03

7.19E-03

7.24E-03

7.28E-03

7.32E-03

7.36E-03

7.40E-03

7.44E-03

7.47E-03

7.50E-03

7.52E-03

7.55E-03

7.58E-03

7.60E-03

7.62E-03

7.64E-03

7.65E-03

7.67E-03

7.67E-03

7.68E-03

7.68E-03

7.68E-03

7.68E-03

7.67E-03

7.65E-03

7.64E-03

7.62E-03

7.60E-03

7.57E-03

7.54E-03

7.51E-03

7.47E-03

7.44E-03

7.40E-03

7.36E-03

7.32E-03

7.27E-03

7.23E-03

7.18E-03

7.12E-03

7.07E-03

7.01E-03

6.94E-03

6.88E-03

6.80E-03

6.73E-03

6.66E-03

6.58E-03

6.50E-03

6.41E-03

6.33E-03

6.24E-03

6.16E-03

6.07E-03

5.98E-03

5.89E-03

5.79E-03

5.69E-03

5.60E-03

5.49E-03

5.39E-03

5.29E-03

5.18E-03

5.08E-03

4.97E-03

4.86E-03

4.75E-03

4.64E-03

4.53E-03

4.42E-03

4.31E-03

4.20E-03

4.09E-03

3.98E-03

3.88E-03

3.77E-03

3.66E-03

3.56E-03

3.46E-03

3.35E-03

3.25E-03

3.15E-03

3.04E-03

2.94E-03

2.84E-03

2.74E-03

2.65E-03

2.55E-03

2.45E-03

2.36E-03

2.27E-03

2.18E-03

2.09E-03

2.01E-03

1.92E-03

1.84E-03

1.77E-03

1.69E-03

1.62E-03

1.54E-03

1.47E-03

1.41E-03

1.34E-03

1.28E-03

1.21E-03

1.15E-03

1.10E-03

1.04E-03

9.86E-04

9.34E-04

8.84E-04

8.36E-04

7.90E-04

7.47E-04

7.05E-04

6.66E-04

6.27E-04

5.91E-04

5.56E-04

5.22E-04

4.91E-04

4.60E-04

4.32E-04

4.05E-04

3.79E-04

3.54E-04

3.31E-04

3.09E-04

2.88E-04

2.68E-04

2.50E-04

2.32E-04

2.16E-04

1.94E-04

1.80E-04

1.67E-04

1.55E-04

1.44E-04

1.33E-04

1.24E-04

1.15E-04

1.07E-04

9.95E-05

9.24E-05

8.59E-05

7.98E-05

7.42E-05

6.89E-05

6.40E-05

5.94E-05

5.52E-05

5.13E-05

4.77E-05

4.44E-05

4.13E-05

3.83E-05

3.57E-05]; 


sensitivityCurves = cat(2, sensitivityCurves, doublecones); 


case('VS Average bird')

%The color sone sensitivity curves are from Endler and Mielke 2005.

%The double cone sensitivities are not provided, blank matrix shown here.

%VSML sensitivity curves [401 x 5]

sensitivityCurves =[300 0 0 0 0

301 0 0 0 0

302 0 0 0 0

303 0 0 0 0

304 0 0 0 0

305 0 0 0 0

306 0 0 0 0

307 0 0 0 0

308 0 0 0 0

309 0 0 0 0

310 0 0 0 0

311 0 0 0 0

312 0 0 0 0

313 0 0 0 0

314 0 0 0 0

315 0 0 0 0

316 0.00002333 0 0 0

317 0.00014856 0 0 0

318 0.0002716 0 0 0

319 0.00039242 0 0 0

320 0.00051098 0 0 0

321 0.00062724 0 0 0

322 0.00074121 0 0 0

323 0.00085288 0 0 0

324 0.00096228 0 0 0

325 0.00106943 0 0 0

326 0.00117438 0 0 0

327 0.0012772 0 0 0

328 0.00137797 0 0 0

329 0.00147678 0 0 0

330 0.00157373 0 0 0

331 0.00166897 0 0 0

332 0.00176263 0 0 0

333 0.00185487 0 0 0

334 0.00194585 0 0 0

335 0.00203576 0 0 0

336 0.00212478 0 0 0

337 0.00221312 0 0 0

338 0.00230099 0 0 0

339 0.0023886 0 0 0

340 0.00247618 0 0 0

341 0.00256396 0 0 0

342 0.00265215 0 0 0

343 0.00274099 0 0 0

344 0.0028307 0 0 0

345 0.00292151 0 0 0

346 0.00301363 0 0 0

347 0.00310728 0 0 0

348 0.00320265 0 0 0

349 0.00329994 0 0 0

350 0.00339933 0 0 0

351 0.00350098 0 0 0

352 0.00360505 0 0 0

353 0.00371168 0 0 0

354 0.00382098 0 0 0

355 0.00393306 0 0 0

356 0.004048 0 0 0

357 0.00416586 0 0 0

358 0.00428668 0 0 0

359 0.0044105 0 0 0

360 0.00453732 0 0 0

361 0.00466712 0 0 0

362 0.00479986 0 0 0

363 0.00493549 0 0 0

364 0.00507393 0 0 0

365 0.0052151 0 0 0

366 0.00535888 0 0 0

367 0.00550514 0 0 0

368 0.00565375 0 0 0

369 0.00580454 0 0 0

370 0.00595735 0 0 0

371 0.00611198 0 0 0

372 0.00626826 0 0 0

373 0.00642596 0 0 0

374 0.00658488 0 0 0

375 0.0067448 0 0 0

376 0.00690548 0 0 0

377 0.0070667 0 0 0

378 0.00722822 0 0 0

379 0.0073898 0 0 0

380 0.00755118 0 0 0

381 0.00771214 0 0 0

382 0.00787242 0 0 0

383 0.00803177 0 0 0

384 0.00818996 0 0 0

385 0.00834673 0 0 0

386 0.00850185 0 0 0

387 0.00865507 0 0 0

388 0.00880616 0 0 0

389 0.00895487 0 0 0

390 0.00910099 0 0 0

391 0.00924426 0 0 0

392 0.00938447 0 0 0

393 0.00952139 0 0 0

394 0.00965479 0 0 0

395 0.00978445 0 0 0

396 0.00991016 0 0 0

397 0.01003168 0 0 0

398 0.01014881 0 0 0

399 0.01026133 0 0 0

400 0.01036903 0 0 0

401 0.01047168 0 0 0

402 0.01056909 0 0 0

403 0.01066103 0 0 0

404 0.0107473 0 0 0

405 0.01082768 0 0 0

406 0.01090196 0 0 0

407 0.01096993 0 0 0

408 0.0110314 0 0 0

409 0.01108614 0 0 0

410 0.01113395 0 0 0

411 0.01117462 0 0 0

412 0.01120797 0 0 0

413 0.01123378 0 0 0

414 0.01125187 0 0 0

415 0.01126205 0 0 0

416 0.01126413 0 0 0

417 0.01125794 0 0 0

418 0.01124331 0 0 0

419 0.01122009 0 0 0

420 0.01118812 0 0 0

421 0.01114728 0 0 0

422 0.01109745 0 0 0

423 0.01103851 0 0 0

424 0.01097038 0 0 0

425 0.010893 0 0 0

426 0.01080632 0 0 0

427 0.01071031 0 0 0

428 0.01060497 0.00000001 0 0

429 0.01049031 0.00000002 0 0

430 0.0103664 0.00000007 0 0

431 0.01023331 0.0000002 0 0

432 0.01009114 0.00000055 0 0

433 0.00994003 0.00000137 0 0

434 0.00978015 0.00000317 0 0

435 0.0096117 0.00000684 0 0

436 0.00943489 0.00001386 0 0

437 0.00925001 0.00002644 0 0

438 0.00905735 0.0000478 0 0

439 0.00885722 0.00008223 0 0

440 0.00865001 0.00013515 0 0

441 0.0084361 0.00021307 0 0

442 0.00821592 0.0003233 0 0

443 0.00798993 0.00047366 0 0

444 0.00775863 0.00067199 0 0

445 0.00752252 0.00092566 0 0

446 0.00728217 0.00124107 0 0

447 0.00703815 0.00162315 0 0

448 0.00679107 0.00207507 0 0

449 0.00654154 0.00259793 0 0

450 0.00629023 0.00319072 0 0

451 0.00603779 0.00385031 0 0

452 0.00578491 0.00457163 0 0

453 0.00553228 0.00534791 0 0

454 0.00528061 0.006171 0 0

455 0.0050306 0.00703175 0 0

456 0.00478294 0.00792031 0 0

457 0.00453834 0.00882655 0 0

458 0.00429747 0.00974034 0 0

459 0.00406099 0.01065185 0 0

460 0.00382953 0.01155176 0 0

461 0.00360369 0.01243144 0 0

462 0.00338402 0.0132831 0 0

463 0.00317104 0.01409984 0 0

464 0.00296519 0.0148757 0 0

465 0.0027669 0.0156057 0 0

466 0.00257648 0.01628575 0 0

467 0.00239423 0.01691267 0 0

468 0.00222035 0.01748412 0 0

469 0.002055 0.01799849 0 0

470 0.00189825 0.0184549 0 0

471 0.00175011 0.01885304 0 0

472 0.00161055 0.01919317 0 0

473 0.00147946 0.01947601 0 0

474 0.0013567 0.01970266 0 0

475 0.00124205 0.01987457 0 0

476 0.00113528 0.01999345 0 0

477 0.00103612 0.02006126 0 0

478 0.00094426 0.02008009 0 0

479 0.00085936 0.02005222 0 0

480 0.0007811 0.01997997 0 0

481 0.0007091 0.01986578 0 0

482 0.00064301 0.0197121 0 0

483 0.00058246 0.01952141 0 0

484 0.0005271 0.01929619 0 0

485 0.00047658 0.01903889 0 0

486 0.00043053 0.01875195 0 0

487 0.00038864 0.01843775 0 0

488 0.00035059 0.01809865 0 0

489 0.00031606 0.01773691 0.00000001 0

490 0.00028477 0.01735478 0.00000003 0

491 0.00025645 0.01695439 0.00000009 0

492 0.00023084 0.01653784 0.00000023 0

493 0.00020771 0.01610716 0.00000056 0

494 0.00018684 0.01566426 0.00000124 0

495 0.00016801 0.01521104 0.0000026 0

496 0.00015104 0.01474928 0.00000519 0

497 0.00013576 0.01428071 0.00000984 0

498 0.00012201 0.01380697 0.00001781 0

499 0.00010963 0.01332964 0.00003088 0

500 0.00009851 0.01285022 0.00005146 0

501 0.00008851 0.01237016 0.00008263 0

502 0.00007952 0.0118908 0.00012818 0

503 0.00007144 0.01141345 0.00019259 0

504 0.00006419 0.01093934 0.00028089 0

505 0.00005768 0.01046963 0.00039852 0

506 0.00005183 0.0100054 0.00055111 0

507 0.00004658 0.0095477 0.00074418 0

508 0.00004187 0.00909747 0.00098289 0

509 0.00003764 0.00865563 0.00127175 0

510 0.00003384 0.00822298 0.00161431 0

511 0.00003043 0.0078003 0.00201305 0

512 0.00002737 0.00738827 0.00246909 0

513 0.00002463 0.00698753 0.00298223 0

514 0.00002216 0.00659863 0.00355081 0

515 0.00001994 0.00622205 0.00417186 0

516 0.00001796 0.00585821 0.00484112 0

517 0.00001617 0.00550745 0.00555323 0

518 0.00001456 0.00517005 0.00630192 0

519 0.00001312 0.00484622 0.00708018 0

520 0.00001183 0.00453608 0.00788054 0

521 0.00001066 0.00423971 0.0086952 0

522 0.00000961 0.00395711 0.00951631 0

523 0.00000867 0.00368822 0.01033611 0

524 0.00000782 0.00343292 0.01114711 0

525 0.00000706 0.00319103 0.01194222 0

526 0.00000637 0.00296232 0.01271488 0

527 0.00000576 0.00274652 0.01345911 0

528 0.0000052 0.00254331 0.01416957 0

529 0.0000047 0.00235233 0.01484163 0

530 0.00000425 0.00217318 0.01547136 0

531 0.00000384 0.00200545 0.0160555 0

532 0.00000348 0.00184869 0.01659151 0

533 0.00000314 0.00170245 0.01707745 0

534 0.00000285 0.00156625 0.01751203 0

535 0.00000258 0.0014396 0.01789449 0

536 0.00000233 0.00132203 0.01822462 0

537 0.00000211 0.00121305 0.01850263 0

538 0.00000192 0.00111217 0.01872918 0

539 0.00000174 0.00101893 0.01890526 0

540 0.00000158 0.00093286 0.0190322 0

541 0.00000143 0.0008535 0.01911157 0.00000001

542 0.0000013 0.00078043 0.01914515 0.00000002

543 0.00000118 0.0007132 0.01913493 0.00000004

544 0.00000107 0.00065144 0.01908302 0.00000008

545 0.00000097 0.00059473 0.01899162 0.00000017

546 0.00000088 0.00054273 0.01886303 0.00000033

547 0.0000008 0.00049508 0.01869958 0.00000063

548 0.00000073 0.00045145 0.01850362 0.00000117

549 0.00000066 0.00041153 0.01827753 0.00000209

550 0.0000006 0.00037504 0.01802363 0.0000036

551 0.00000055 0.00034169 0.01774424 0.00000603

552 0.0000005 0.00031124 0.01744162 0.00000981

553 0.00000046 0.00028345 0.01711798 0.00001552

554 0.00000042 0.0002581 0.01677546 0.00002394

555 0.00000038 0.00023498 0.01641613 0.00003601

556 0.00000035 0.00021392 0.016042 0.00005295

557 0.00000032 0.00019472 0.01565496 0.00007617

558 0.00000029 0.00017724 0.01525686 0.00010734

559 0.00000026 0.00016132 0.01484944 0.00014834

560 0.00000024 0.00014682 0.01443436 0.00020127

561 0.00000022 0.00013363 0.0140132 0.00026838

562 0.0000002 0.00012163 0.01358743 0.00035204

563 0.00000018 0.00011071 0.01315848 0.00045467

564 0.00000017 0.00010078 0.01272765 0.00057866

565 0.00000015 0.00009174 0.01229621 0.00072633

566 0.00000014 0.00008352 0.01186531 0.00089982

567 0.00000013 0.00007605 0.01143605 0.00110103

568 0.00000012 0.00006925 0.01100944 0.00133154

569 0.00000011 0.00006307 0.01058644 0.00159258

570 0.0000001 0.00005745 0.01016792 0.00188493

571 0.00000009 0.00005233 0.0097547 0.00220896

572 0.00000008 0.00004768 0.00934753 0.00256453

573 0.00000008 0.00004345 0.0089471 0.00295103

574 0.00000007 0.0000396 0.00855405 0.00336737

575 0.00000006 0.0000361 0.00816894 0.00381201

576 0.00000006 0.00003292 0.0077923 0.00428298

577 0.00000005 0.00003002 0.0074246 0.00477792

578 0.00000005 0.00002738 0.00706625 0.00529413

579 0.00000004 0.00002498 0.0067176 0.00582864

580 0.00000004 0.00002279 0.00637898 0.00637823

581 0.00000004 0.0000208 0.00605065 0.00693953

582 0.00000003 0.00001899 0.00573283 0.00750905

583 0.00000003 0.00001734 0.00542569 0.00808324

584 0.00000003 0.00001584 0.00512937 0.00865856

585 0.00000003 0.00001447 0.00484394 0.00923149

586 0.00000002 0.00001322 0.00456947 0.00979864

587 0.00000002 0.00001209 0.00430594 0.01035673

588 0.00000002 0.00001105 0.00405333 0.01090263

589 0.00000002 0.0000101 0.00381158 0.01143344

590 0.00000002 0.00000924 0.00358057 0.01194645

591 0.00000002 0.00000845 0.00336019 0.01243919

592 0.00000002 0.00000774 0.00315025 0.01290943

593 0.00000001 0.00000708 0.00295058 0.0133552

594 0.00000001 0.00000648 0.00276095 0.01377477

595 0.00000001 0.00000594 0.00258112 0.0141667

596 0.00000001 0.00000544 0.00241085 0.01452977

597 0.00000001 0.00000498 0.00224984 0.014863

598 0.00000001 0.00000457 0.0020978 0.01516568

599 0.00000001 0.00000419 0.00195444 0.01543729

600 0.00000001 0.00000384 0.00181943 0.01567754

601 0.00000001 0.00000352 0.00169246 0.01588634

602 0.00000001 0.00000323 0.00157319 0.01606378

603 0.00000001 0.00000297 0.0014613 0.01621011

604 0.00000001 0.00000272 0.00135645 0.01632576

605 0.00000001 0.0000025 0.00125831 0.01641128

606 0 0.0000023 0.00116656 0.01646734

607 0 0.00000211 0.00108086 0.01649475

608 0 0.00000194 0.00100091 0.01649438

609 0 0.00000178 0.00092638 0.0164672

610 0 0.00000164 0.00085698 0.01641426

611 0 0.00000151 0.00079241 0.01633666

612 0 0.00000138 0.00073239 0.01623553

613 0 0.00000127 0.00067663 0.01611206

614 0 0.00000117 0.00062488 0.01596746

615 0 0.00000108 0.00057689 0.01580295

616 0 0.00000099 0.0005324 0.01561977

617 0 0.00000092 0.0004912 0.01541915

618 0 0.00000084 0.00045307 0.01520232

619 0 0.00000078 0.00041778 0.0149705

620 0 0.00000072 0.00038516 0.01472491

621 0 0.00000066 0.00035501 0.01446671

622 0 0.00000061 0.00032716 0.01419707

623 0 0.00000056 0.00030145 0.01391713

624 0 0.00000052 0.00027771 0.01362797

625 0 0.00000048 0.00025581 0.01333068

626 0 0.00000044 0.00023562 0.01302628

627 0 0.00000041 0.000217 0.01271576

628 0 0.00000038 0.00019983 0.01240009

629 0 0.00000035 0.00018402 0.01208019

630 0 0.00000032 0.00016945 0.01175694

631 0 0.0000003 0.00015603 0.01143117

632 0 0.00000027 0.00014367 0.0111037

633 0 0.00000025 0.00013229 0.01077529

634 0 0.00000023 0.00012181 0.01044666

635 0 0.00000022 0.00011216 0.0101185

636 0 0.0000002 0.00010329 0.00979146

637 0 0.00000019 0.00009512 0.00946617

638 0 0.00000017 0.0000876 0.00914318

639 0 0.00000016 0.00008068 0.00882305

640 0 0.00000015 0.00007431 0.0085063

641 0 0.00000014 0.00006845 0.00819338

642 0 0.00000013 0.00006306 0.00788475

643 0 0.00000012 0.0000581 0.00758081

644 0 0.00000011 0.00005354 0.00728194

645 0 0.0000001 0.00004934 0.0069885

646 0 0.00000009 0.00004547 0.0067008

647 0 0.00000009 0.00004192 0.00641913

648 0 0.00000008 0.00003864 0.00614375

649 0 0.00000007 0.00003563 0.00587489

650 0 0.00000007 0.00003286 0.00561276

651 0 0.00000006 0.00003031 0.00535754

652 0 0.00000006 0.00002796 0.00510938

653 0 0.00000006 0.00002579 0.00486841

654 0 0.00000005 0.0000238 0.00463472

655 0 0.00000005 0.00002196 0.00440841

656 0 0.00000004 0.00002027 0.00418951

657 0 0.00000004 0.00001872 0.00397807

658 0 0.00000004 0.00001728 0.0037741

659 0 0.00000004 0.00001596 0.00357757

660 0 0.00000003 0.00001474 0.00338847

661 0 0.00000003 0.00001362 0.00320673

662 0 0.00000003 0.00001259 0.0030323

663 0 0.00000003 0.00001163 0.00286508

664 0 0.00000003 0.00001075 0.00270498

665 0 0.00000002 0.00000994 0.00255186

666 0 0.00000002 0.00000919 0.00240562

667 0 0.00000002 0.0000085 0.00226609

668 0 0.00000002 0.00000787 0.00213312

669 0 0.00000002 0.00000728 0.00200656

670 0 0.00000002 0.00000674 0.00188623

671 0 0.00000002 0.00000623 0.00177193

672 0 0.00000001 0.00000577 0.0016635

673 0 0.00000001 0.00000534 0.00156073

674 0 0.00000001 0.00000495 0.00146343

675 0 0.00000001 0.00000459 0.00137141

676 0 0.00000001 0.00000425 0.00128444

677 0 0.00000001 0.00000394 0.00120235

678 0 0.00000001 0.00000365 0.00112492

679 0 0.00000001 0.00000338 0.00105196

680 0 0.00000001 0.00000314 0.00098326

681 0 0.00000001 0.00000291 0.00091863

682 0 0.00000001 0.0000027 0.00085788

683 0 0.00000001 0.00000251 0.00080082

684 0 0.00000001 0.00000232 0.00074726

685 0 0.00000001 0.00000216 0.00069703

686 0 0.00000001 0.000002 0.00064994

687 0 0.00000001 0.00000186 0.00060584

688 0 0 0.00000173 0.00056456

689 0 0 0.00000161 0.00052594

690 0 0 0.00000149 0.00048982

691 0 0 0.00000139 0.00045608

692 0 0 0.00000129 0.00042455

693 0 0 0.0000012 0.00039513

694 0 0 0.00000111 0.00036766

695 0 0 0.00000104 0.00034205

696 0 0 0.00000096 0.00031817

697 0 0 0.0000009 0.0002959

698 0 0 0.00000084 0.00027516

699 0 0 0.00000078 0.00025585

700 0 0 0.00000072 0.00023786];


sensitivityCurves = cat(2, sensitivityCurves, BlankDoubleCones); 


case ('VS Peafowl')

%The color cone sensitivity curves are derived from data provided by Nathan Hart. 

%The double cone sensitivities are derived from data provided by Martin Stevens.

sensitivityCurves =[

300 1.98E-08 0.00E+00 1.38E-11 6.63E-13

301 2.64E-08 0.00E+00 1.84E-11 8.83E-13

302 3.34E-08 0.00E+00 2.33E-11 1.12E-12

303 4.42E-08 0.00E+00 3.10E-11 1.49E-12

304 6.17E-08 0.00E+00 4.33E-11 2.08E-12

305 8.43E-08 0.00E+00 5.94E-11 2.85E-12

306 1.13E-07 0.00E+00 7.98E-11 3.83E-12

307 1.56E-07 0.00E+00 1.11E-10 5.31E-12

308 2.28E-07 0.00E+00 1.63E-10 7.82E-12

309 3.30E-07 0.00E+00 2.36E-10 1.13E-11

310 4.73E-07 0.00E+00 3.40E-10 1.63E-11

311 6.68E-07 0.00E+00 4.84E-10 2.33E-11

312 9.41E-07 0.00E+00 6.85E-10 3.30E-11

313 1.33E-06 0.00E+00 9.75E-10 4.70E-11

314 1.80E-06 0.00E+00 1.32E-09 6.39E-11

315 2.46E-06 0.00E+00 1.82E-09 8.81E-11

316 3.34E-06 0.00E+00 2.49E-09 1.21E-10

317 4.20E-06 0.00E+00 3.15E-09 1.53E-10

318 4.85E-06 0.00E+00 3.66E-09 1.78E-10

319 5.36E-06 0.00E+00 4.07E-09 1.99E-10

320 5.95E-06 0.00E+00 4.55E-09 2.23E-10

321 6.89E-06 0.00E+00 5.31E-09 2.60E-10

322 8.39E-06 0.00E+00 6.51E-09 3.20E-10

323 1.03E-05 0.00E+00 8.02E-09 3.95E-10

324 1.22E-05 0.00E+00 9.58E-09 4.74E-10

325 1.37E-05 0.00E+00 1.09E-08 5.40E-10

326 1.53E-05 0.00E+00 1.22E-08 6.08E-10

327 1.71E-05 0.00E+00 1.38E-08 6.87E-10

328 2.04E-05 0.00E+00 1.65E-08 8.28E-10

329 2.62E-05 0.00E+00 2.13E-08 1.07E-09

330 3.43E-05 0.00E+00 2.81E-08 1.42E-09

331 4.48E-05 0.00E+00 3.69E-08 1.87E-09

332 5.71E-05 0.00E+00 4.74E-08 2.41E-09

333 7.20E-05 0.00E+00 6.00E-08 3.07E-09

334 9.08E-05 0.00E+00 7.60E-08 3.91E-09

335 1.17E-04 0.00E+00 9.82E-08 5.07E-09

336 1.56E-04 0.00E+00 1.32E-07 6.85E-09

337 2.05E-04 0.00E+00 1.74E-07 9.09E-09

338 2.61E-04 0.00E+00 2.22E-07 1.17E-08

339 3.31E-04 0.00E+00 2.82E-07 1.49E-08

340 4.12E-04 0.00E+00 3.52E-07 1.87E-08

341 5.05E-04 0.00E+00 4.33E-07 2.31E-08

342 6.10E-04 0.00E+00 5.23E-07 2.80E-08

343 7.24E-04 0.00E+00 6.21E-07 3.35E-08

344 8.49E-04 0.00E+00 7.27E-07 3.94E-08

345 9.84E-04 0.00E+00 8.41E-07 4.59E-08

346 1.13E-03 0.00E+00 9.60E-07 5.27E-08

347 1.27E-03 0.00E+00 1.08E-06 5.97E-08

348 1.42E-03 0.00E+00 1.20E-06 6.68E-08

349 1.57E-03 0.00E+00 1.32E-06 7.38E-08

350 1.71E-03 0.00E+00 1.43E-06 8.06E-08

351 1.85E-03 0.00E+00 1.54E-06 8.71E-08

352 1.99E-03 0.00E+00 1.64E-06 9.33E-08

353 2.12E-03 0.00E+00 1.73E-06 9.91E-08

354 2.25E-03 0.00E+00 1.81E-06 1.05E-07

355 2.37E-03 0.00E+00 1.89E-06 1.10E-07

356 2.50E-03 0.00E+00 1.96E-06 1.15E-07

357 2.61E-03 0.00E+00 2.03E-06 1.19E-07

358 2.72E-03 0.00E+00 2.08E-06 1.24E-07

359 2.84E-03 0.00E+00 2.13E-06 1.28E-07

360 2.95E-03 0.00E+00 2.18E-06 1.31E-07

361 3.07E-03 0.00E+00 2.23E-06 1.35E-07

362 3.18E-03 0.00E+00 2.27E-06 1.38E-07

363 3.29E-03 0.00E+00 2.30E-06 1.42E-07

364 3.42E-03 0.00E+00 2.34E-06 1.45E-07

365 3.55E-03 0.00E+00 2.38E-06 1.48E-07

366 3.67E-03 0.00E+00 2.41E-06 1.51E-07

367 3.79E-03 0.00E+00 2.43E-06 1.54E-07

368 3.92E-03 0.00E+00 2.46E-06 1.56E-07

369 4.05E-03 0.00E+00 2.48E-06 1.59E-07

370 4.19E-03 0.00E+00 2.50E-06 1.61E-07

371 4.33E-03 0.00E+00 2.52E-06 1.64E-07

372 4.48E-03 0.00E+00 2.54E-06 1.66E-07

373 4.63E-03 0.00E+00 2.56E-06 1.69E-07

374 4.79E-03 0.00E+00 2.58E-06 1.71E-07

375 4.95E-03 0.00E+00 2.60E-06 1.73E-07

376 5.10E-03 0.00E+00 2.61E-06 1.75E-07

377 5.26E-03 0.00E+00 2.62E-06 1.76E-07

378 5.43E-03 0.00E+00 2.64E-06 1.78E-07

379 5.60E-03 0.00E+00 2.65E-06 1.80E-07

380 5.77E-03 0.00E+00 2.66E-06 1.81E-07

381 5.94E-03 0.00E+00 2.67E-06 1.82E-07

382 6.11E-03 0.00E+00 2.67E-06 1.83E-07

383 6.27E-03 0.00E+00 2.68E-06 1.84E-07

384 6.44E-03 0.00E+00 2.68E-06 1.85E-07

385 6.61E-03 0.00E+00 2.69E-06 1.86E-07

386 6.78E-03 0.00E+00 2.69E-06 1.86E-07

387 6.94E-03 0.00E+00 2.69E-06 1.86E-07

388 7.11E-03 0.00E+00 2.70E-06 1.86E-07

389 7.27E-03 0.00E+00 2.70E-06 1.86E-07

390 7.43E-03 0.00E+00 2.70E-06 1.86E-07

391 7.58E-03 0.00E+00 2.70E-06 1.86E-07

392 7.73E-03 0.00E+00 2.70E-06 1.85E-07

393 7.87E-03 0.00E+00 2.70E-06 1.85E-07

394 8.02E-03 0.00E+00 2.70E-06 1.84E-07

395 8.16E-03 0.00E+00 2.71E-06 1.83E-07

396 8.30E-03 0.00E+00 2.71E-06 1.82E-07

397 8.43E-03 0.00E+00 2.71E-06 1.81E-07

398 8.56E-03 0.00E+00 2.72E-06 1.80E-07

399 8.68E-03 0.00E+00 2.72E-06 1.78E-07

400 8.80E-03 0.00E+00 2.73E-06 1.77E-07

401 8.91E-03 0.00E+00 2.74E-06 1.76E-07

402 9.02E-03 0.00E+00 2.75E-06 1.74E-07

403 9.12E-03 0.00E+00 2.76E-06 1.72E-07

404 9.21E-03 0.00E+00 2.78E-06 1.71E-07

405 9.30E-03 0.00E+00 2.79E-06 1.69E-07

406 9.39E-03 0.00E+00 2.81E-06 1.67E-07

407 9.47E-03 0.00E+00 2.83E-06 1.65E-07

408 9.55E-03 0.00E+00 2.86E-06 1.63E-07

409 9.63E-03 0.00E+00 2.89E-06 1.62E-07

410 9.70E-03 0.00E+00 2.92E-06 1.60E-07

411 9.78E-03 0.00E+00 2.95E-06 1.58E-07

412 9.85E-03 0.00E+00 2.99E-06 1.57E-07

413 9.92E-03 0.00E+00 3.03E-06 1.55E-07

414 1.00E-02 0.00E+00 3.08E-06 1.54E-07

415 1.01E-02 0.00E+00 3.13E-06 1.52E-07

416 1.01E-02 0.00E+00 3.19E-06 1.51E-07

417 1.02E-02 0.00E+00 3.25E-06 1.50E-07

418 1.03E-02 0.00E+00 3.32E-06 1.49E-07

419 1.04E-02 0.00E+00 3.39E-06 1.48E-07

420 1.04E-02 0.00E+00 3.47E-06 1.47E-07

421 1.05E-02 0.00E+00 3.55E-06 1.46E-07

422 1.06E-02 0.00E+00 3.64E-06 1.45E-07

423 1.07E-02 0.00E+00 3.74E-06 1.45E-07

424 1.07E-02 0.00E+00 3.83E-06 1.44E-07

425 1.08E-02 0.00E+00 3.94E-06 1.44E-07

426 1.08E-02 0.00E+00 4.05E-06 1.43E-07

427 1.09E-02 0.00E+00 4.16E-06 1.43E-07

428 1.10E-02 2.76E-06 4.28E-06 1.43E-07

429 1.10E-02 5.59E-06 4.40E-06 1.42E-07

430 1.10E-02 1.04E-05 4.52E-06 1.42E-07

431 1.10E-02 1.76E-05 4.65E-06 1.42E-07

432 1.11E-02 3.05E-05 4.78E-06 1.42E-07

433 1.11E-02 4.68E-05 4.92E-06 1.42E-07

434 1.10E-02 6.63E-05 5.05E-06 1.42E-07

435 1.10E-02 9.33E-05 5.19E-06 1.42E-07

436 1.10E-02 1.25E-04 5.33E-06 1.42E-07

437 1.09E-02 1.70E-04 5.48E-06 1.42E-07

438 1.09E-02 2.16E-04 5.62E-06 1.42E-07

439 1.08E-02 2.84E-04 5.76E-06 1.42E-07

440 1.07E-02 3.56E-04 5.91E-06 1.43E-07

441 1.07E-02 4.57E-04 6.06E-06 1.43E-07

442 1.06E-02 5.60E-04 6.22E-06 1.44E-07

443 1.04E-02 7.04E-04 6.37E-06 1.45E-07

444 1.03E-02 8.52E-04 6.52E-06 1.45E-07

445 1.02E-02 1.06E-03 6.68E-06 1.46E-07

446 1.01E-02 1.27E-03 6.84E-06 1.47E-07

447 9.92E-03 1.55E-03 6.99E-06 1.48E-07

448 9.76E-03 1.84E-03 7.15E-06 1.50E-07

449 9.60E-03 2.22E-03 7.32E-06 1.51E-07

450 9.43E-03 2.60E-03 7.48E-06 1.53E-07

451 9.26E-03 3.09E-03 7.64E-06 1.55E-07

452 9.07E-03 3.57E-03 7.80E-06 1.56E-07

453 8.88E-03 4.19E-03 7.97E-06 1.59E-07

454 8.67E-03 4.77E-03 8.13E-06 1.61E-07

455 8.46E-03 5.50E-03 8.29E-06 1.63E-07

456 8.25E-03 6.18E-03 8.45E-06 1.65E-07

457 8.04E-03 7.02E-03 8.61E-06 1.68E-07

458 7.81E-03 7.78E-03 8.77E-06 1.71E-07

459 7.59E-03 8.69E-03 8.94E-06 1.74E-07

460 7.36E-03 9.49E-03 9.10E-06 1.77E-07

461 7.13E-03 1.04E-02 9.26E-06 1.80E-07

462 6.89E-03 1.12E-02 9.42E-06 1.84E-07

463 6.65E-03 1.22E-02 9.58E-06 1.88E-07

464 6.41E-03 1.29E-02 9.73E-06 1.91E-07

465 6.17E-03 1.38E-02 9.89E-06 1.95E-07

466 5.93E-03 1.45E-02 1.01E-05 2.00E-07

467 5.69E-03 1.52E-02 1.02E-05 2.04E-07

468 5.45E-03 1.58E-02 1.04E-05 2.09E-07

469 5.22E-03 1.65E-02 1.05E-05 2.14E-07

470 4.98E-03 1.69E-02 1.07E-05 2.19E-07

471 4.75E-03 1.74E-02 1.08E-05 2.24E-07

472 4.51E-03 1.78E-02 1.10E-05 2.29E-07

473 4.29E-03 1.81E-02 1.11E-05 2.34E-07

474 4.06E-03 1.83E-02 1.12E-05 2.40E-07

475 3.84E-03 1.86E-02 1.14E-05 2.46E-07

476 3.63E-03 1.87E-02 1.15E-05 2.52E-07

477 3.42E-03 1.88E-02 1.16E-05 2.58E-07

478 3.21E-03 1.88E-02 1.18E-05 2.64E-07

479 3.02E-03 1.88E-02 1.19E-05 2.70E-07

480 2.83E-03 1.87E-02 1.20E-05 2.77E-07

481 2.64E-03 1.87E-02 1.21E-05 2.84E-07

482 2.47E-03 1.86E-02 1.22E-05 2.91E-07

483 2.30E-03 1.84E-02 1.24E-05 2.97E-07

484 2.14E-03 1.83E-02 1.25E-05 3.05E-07

485 1.99E-03 1.81E-02 1.26E-05 3.12E-07

486 1.84E-03 1.79E-02 1.27E-05 3.19E-07

487 1.70E-03 1.76E-02 8.95E-06 3.27E-07

488 1.57E-03 1.74E-02 6.65E-06 3.35E-07

489 1.45E-03 1.71E-02 2.53E-06 3.42E-07

490 1.34E-03 1.69E-02 2.16E-06 3.50E-07

491 1.23E-03 1.66E-02 0.00E+00 3.58E-07

492 1.13E-03 1.63E-02 4.13E-08 3.67E-07

493 1.03E-03 1.60E-02 1.72E-07 3.75E-07

494 9.48E-04 1.56E-02 3.95E-06 3.84E-07

495 8.67E-04 1.53E-02 8.25E-06 3.92E-07

496 7.92E-04 1.50E-02 1.60E-05 4.01E-07

497 7.23E-04 1.46E-02 2.97E-05 4.10E-07

498 6.59E-04 1.43E-02 4.65E-05 4.19E-07

499 6.00E-04 1.39E-02 7.58E-05 4.28E-07

500 5.46E-04 1.35E-02 1.09E-04 4.37E-07

501 4.97E-04 1.32E-02 1.63E-04 4.46E-07

502 4.52E-04 1.28E-02 2.21E-04 4.56E-07

503 4.10E-04 1.24E-02 3.16E-04 4.65E-07

504 3.72E-04 1.20E-02 4.13E-04 4.74E-07

505 3.37E-04 1.16E-02 5.66E-04 4.83E-07

506 3.05E-04 1.12E-02 7.21E-04 4.92E-07

507 2.76E-04 1.08E-02 9.57E-04 5.02E-07

508 2.50E-04 1.04E-02 1.19E-03 5.11E-07

509 2.26E-04 1.00E-02 1.53E-03 5.21E-07

510 2.05E-04 9.62E-03 1.87E-03 5.30E-07

511 1.85E-04 9.23E-03 2.34E-03 5.40E-07

512 1.67E-04 8.85E-03 2.79E-03 5.49E-07

513 1.51E-04 8.47E-03 3.41E-03 5.58E-07

514 1.36E-04 8.09E-03 3.99E-03 5.68E-07

515 1.23E-04 7.72E-03 4.75E-03 5.77E-07

516 1.11E-04 7.36E-03 5.46E-03 5.86E-07

517 1.00E-04 7.00E-03 6.36E-03 5.95E-07

518 9.05E-05 6.65E-03 7.17E-03 6.04E-07

519 8.16E-05 6.30E-03 8.16E-03 6.12E-07

520 7.36E-05 5.97E-03 9.04E-03 6.21E-07

521 6.65E-05 5.65E-03 1.01E-02 6.30E-07

522 6.00E-05 5.34E-03 1.10E-02 6.38E-07

523 5.41E-05 5.03E-03 1.20E-02 6.47E-07

524 4.89E-05 4.74E-03 1.29E-02 6.55E-07

525 4.41E-05 4.46E-03 1.39E-02 6.63E-07

526 3.97E-05 4.18E-03 1.46E-02 6.71E-07

527 3.58E-05 3.91E-03 1.55E-02 6.78E-07

528 3.23E-05 3.66E-03 1.62E-02 6.86E-07

529 2.92E-05 3.43E-03 1.69E-02 6.94E-07

530 2.64E-05 3.20E-03 1.74E-02 7.01E-07

531 2.38E-05 2.99E-03 1.80E-02 7.09E-07

532 2.15E-05 2.78E-03 1.84E-02 7.16E-07

533 1.94E-05 2.59E-03 1.88E-02 7.23E-07

534 1.76E-05 2.40E-03 1.91E-02 7.30E-07

535 1.59E-05 2.23E-03 1.93E-02 7.36E-07

536 1.43E-05 2.07E-03 1.95E-02 7.43E-07

537 1.30E-05 1.92E-03 1.96E-02 7.51E-07

538 1.18E-05 1.77E-03 1.97E-02 7.59E-07

539 1.07E-05 1.64E-03 1.97E-02 7.66E-07

540 9.66E-06 1.51E-03 1.96E-02 7.72E-07

541 8.75E-06 1.40E-03 1.95E-02 7.79E-07

542 7.93E-06 1.29E-03 1.94E-02 7.85E-07

543 7.19E-06 1.19E-03 1.92E-02 7.91E-07

544 6.52E-06 1.09E-03 1.90E-02 2.77E-07

545 5.91E-06 1.00E-03 1.88E-02 0.00E+00

546 5.36E-06 9.21E-04 1.85E-02 3.68E-08

547 4.86E-06 8.45E-04 1.82E-02 1.22E-06

548 4.42E-06 7.76E-04 1.79E-02 2.32E-06

549 4.01E-06 7.11E-04 1.76E-02 5.14E-06

550 3.64E-06 6.52E-04 1.73E-02 7.74E-06

551 3.31E-06 5.96E-04 1.69E-02 1.34E-05

552 3.00E-06 5.46E-04 1.65E-02 1.95E-05

553 2.73E-06 4.99E-04 1.61E-02 2.99E-05

554 2.48E-06 4.56E-04 1.57E-02 4.20E-05

555 2.26E-06 4.17E-04 1.53E-02 6.12E-05

556 2.06E-06 3.81E-04 1.49E-02 8.10E-05

557 1.87E-06 3.48E-04 1.45E-02 1.13E-04

558 1.70E-06 3.18E-04 1.41E-02 1.47E-04

559 1.55E-06 2.90E-04 1.37E-02 1.97E-04

560 1.41E-06 2.65E-04 1.33E-02 2.49E-04

561 1.29E-06 2.41E-04 1.29E-02 3.25E-04

562 1.17E-06 2.20E-04 1.24E-02 4.03E-04

563 1.07E-06 2.01E-04 1.20E-02 5.12E-04

564 9.77E-07 1.83E-04 1.16E-02 6.21E-04

565 8.91E-07 1.67E-04 1.12E-02 7.72E-04

566 8.13E-07 1.52E-04 1.08E-02 9.21E-04

567 7.42E-07 1.39E-04 1.04E-02 1.12E-03

568 6.77E-07 1.27E-04 9.98E-03 1.32E-03

569 6.18E-07 1.15E-04 9.58E-03 1.58E-03

570 5.64E-07 1.05E-04 9.19E-03 1.83E-03

571 5.16E-07 9.59E-05 8.81E-03 2.15E-03

572 4.71E-07 8.74E-05 8.43E-03 2.45E-03

573 4.31E-07 7.97E-05 8.06E-03 2.84E-03

574 3.94E-07 7.26E-05 7.70E-03 3.20E-03

575 3.60E-07 6.62E-05 7.35E-03 3.66E-03

576 3.30E-07 6.04E-05 7.01E-03 4.08E-03

577 3.02E-07 5.51E-05 6.67E-03 4.60E-03

578 2.77E-07 5.02E-05 6.35E-03 5.08E-03

579 2.53E-07 4.58E-05 6.04E-03 5.65E-03

580 2.32E-07 4.19E-05 5.74E-03 6.17E-03

581 2.13E-07 3.82E-05 5.45E-03 6.78E-03

582 1.95E-07 3.49E-05 5.16E-03 7.34E-03

583 1.79E-07 3.19E-05 4.89E-03 7.97E-03

584 1.65E-07 2.91E-05 4.62E-03 8.54E-03

585 1.51E-07 2.66E-05 4.37E-03 9.19E-03

586 1.39E-07 2.43E-05 4.12E-03 9.75E-03

587 1.28E-07 2.22E-05 3.89E-03 1.04E-02

588 1.17E-07 2.03E-05 3.66E-03 1.09E-02

589 1.08E-07 1.86E-05 3.45E-03 1.15E-02

590 9.91E-08 1.70E-05 3.24E-03 1.20E-02

591 9.11E-08 1.56E-05 3.04E-03 1.26E-02

592 8.38E-08 1.42E-05 2.85E-03 1.30E-02

593 7.71E-08 1.30E-05 2.68E-03 1.35E-02

594 7.10E-08 1.19E-05 2.51E-03 1.40E-02

595 6.54E-08 1.09E-05 2.35E-03 1.44E-02

596 6.02E-08 1.00E-05 2.19E-03 1.47E-02

597 5.55E-08 9.16E-06 2.05E-03 1.51E-02

598 5.11E-08 8.39E-06 1.91E-03 1.54E-02

599 4.71E-08 7.69E-06 1.78E-03 1.56E-02

600 4.34E-08 7.05E-06 1.66E-03 1.58E-02

601 4.00E-08 6.46E-06 1.54E-03 1.60E-02

602 3.69E-08 5.92E-06 1.43E-03 1.62E-02

603 3.40E-08 5.43E-06 1.33E-03 1.63E-02

604 3.14E-08 4.98E-06 1.24E-03 1.64E-02

605 2.89E-08 4.57E-06 1.15E-03 1.65E-02

606 2.67E-08 4.19E-06 1.06E-03 1.65E-02

607 2.47E-08 3.85E-06 9.86E-04 1.65E-02

608 2.28E-08 3.53E-06 9.13E-04 1.64E-02

609 2.10E-08 3.24E-06 8.46E-04 1.64E-02

610 1.94E-08 2.98E-06 7.82E-04 1.63E-02

611 1.80E-08 2.74E-06 7.24E-04 1.62E-02

612 1.66E-08 2.52E-06 6.69E-04 1.61E-02

613 1.54E-08 2.31E-06 6.18E-04 1.60E-02

614 1.42E-08 2.13E-06 5.71E-04 1.58E-02

615 1.31E-08 1.96E-06 5.27E-04 1.56E-02

616 1.22E-08 1.80E-06 4.87E-04 1.54E-02

617 1.13E-08 1.66E-06 4.49E-04 1.52E-02

618 1.04E-08 1.52E-06 4.14E-04 1.50E-02

619 9.64E-09 1.40E-06 3.82E-04 1.47E-02

620 8.93E-09 1.29E-06 3.52E-04 1.45E-02

621 8.27E-09 1.19E-06 3.25E-04 1.42E-02

622 7.67E-09 1.10E-06 2.99E-04 1.39E-02

623 7.11E-09 1.01E-06 2.76E-04 1.37E-02

624 6.59E-09 9.30E-07 2.54E-04 1.34E-02

625 6.11E-09 8.58E-07 2.34E-04 1.31E-02

626 5.67E-09 7.91E-07 2.16E-04 1.28E-02

627 5.26E-09 7.30E-07 1.99E-04 1.25E-02

628 4.88E-09 6.74E-07 1.83E-04 1.22E-02

629 4.53E-09 6.22E-07 1.68E-04 1.19E-02

630 4.21E-09 5.74E-07 1.55E-04 1.16E-02

631 3.91E-09 5.30E-07 1.43E-04 1.13E-02

632 3.63E-09 4.90E-07 1.32E-04 1.10E-02

633 3.38E-09 4.52E-07 1.21E-04 1.06E-02

634 3.14E-09 4.18E-07 1.12E-04 1.03E-02

635 2.92E-09 3.86E-07 1.03E-04 1.00E-02

636 2.71E-09 3.57E-07 9.47E-05 9.71E-03

637 2.52E-09 3.30E-07 8.72E-05 9.40E-03

638 2.35E-09 3.05E-07 8.03E-05 9.08E-03

639 2.18E-09 2.83E-07 7.40E-05 8.78E-03

640 2.03E-09 2.61E-07 6.81E-05 8.48E-03

641 1.89E-09 2.42E-07 6.28E-05 8.18E-03

642 1.76E-09 2.24E-07 5.79E-05 7.88E-03

643 1.64E-09 2.07E-07 5.33E-05 7.59E-03

644 1.53E-09 1.92E-07 4.91E-05 7.30E-03

645 1.42E-09 1.78E-07 4.52E-05 7.02E-03

646 1.33E-09 1.65E-07 4.17E-05 6.75E-03

647 1.24E-09 1.53E-07 3.84E-05 6.47E-03

648 1.15E-09 1.41E-07 3.54E-05 6.21E-03

649 1.07E-09 1.31E-07 3.27E-05 5.95E-03

650 1.00E-09 1.22E-07 3.01E-05 5.70E-03

651 9.34E-10 1.13E-07 2.78E-05 5.45E-03

652 8.72E-10 1.05E-07 2.56E-05 5.21E-03

653 8.13E-10 9.72E-08 2.37E-05 4.97E-03

654 7.59E-10 9.03E-08 2.18E-05 4.74E-03

655 7.09E-10 8.38E-08 2.01E-05 4.52E-03

656 6.62E-10 7.79E-08 1.86E-05 4.31E-03

657 6.19E-10 7.24E-08 1.72E-05 4.10E-03

658 5.78E-10 6.72E-08 1.59E-05 3.90E-03

659 5.40E-10 6.25E-08 1.47E-05 3.71E-03

660 5.05E-10 5.81E-08 1.35E-05 3.52E-03

661 4.72E-10 5.40E-08 1.25E-05 3.34E-03

662 4.41E-10 5.03E-08 1.16E-05 3.17E-03

663 4.13E-10 4.67E-08 1.07E-05 3.00E-03

664 3.86E-10 4.35E-08 9.87E-06 2.83E-03

665 3.61E-10 4.04E-08 9.12E-06 2.68E-03

666 3.37E-10 3.76E-08 8.43E-06 2.53E-03

667 3.16E-10 3.50E-08 7.79E-06 2.39E-03

668 2.96E-10 3.26E-08 7.21E-06 2.25E-03

669 2.77E-10 3.04E-08 6.68E-06 2.13E-03

670 2.59E-10 2.83E-08 6.18E-06 2.00E-03

671 2.43E-10 2.64E-08 5.72E-06 1.89E-03

672 2.28E-10 2.46E-08 5.30E-06 1.77E-03

673 2.13E-10 2.29E-08 4.91E-06 1.67E-03

674 2.00E-10 2.14E-08 4.55E-06 1.57E-03

675 1.88E-10 1.99E-08 4.21E-06 1.47E-03

676 1.76E-10 1.86E-08 3.91E-06 1.38E-03

677 1.65E-10 1.73E-08 3.62E-06 1.30E-03

678 1.55E-10 1.62E-08 3.35E-06 1.21E-03

679 1.45E-10 1.51E-08 3.11E-06 1.14E-03

680 1.36E-10 1.41E-08 2.88E-06 1.06E-03

681 1.28E-10 1.31E-08 2.67E-06 9.95E-04

682 1.20E-10 1.23E-08 2.47E-06 9.30E-04

683 1.12E-10 1.14E-08 2.29E-06 8.69E-04

684 1.05E-10 1.07E-08 2.13E-06 8.12E-04

685 9.89E-11 9.99E-09 1.98E-06 7.58E-04

686 9.29E-11 9.33E-09 1.83E-06 7.08E-04

687 8.73E-11 8.72E-09 1.70E-06 6.61E-04

688 8.20E-11 8.16E-09 1.58E-06 6.17E-04

689 7.71E-11 7.63E-09 1.47E-06 5.75E-04

690 7.24E-11 7.13E-09 1.37E-06 5.36E-04

691 6.81E-11 6.67E-09 1.27E-06 4.99E-04

692 6.40E-11 6.23E-09 1.18E-06 4.65E-04

693 6.01E-11 5.83E-09 1.09E-06 4.33E-04

694 5.66E-11 5.46E-09 1.02E-06 4.04E-04

695 5.32E-11 5.11E-09 9.46E-07 3.76E-04

696 5.00E-11 4.78E-09 8.80E-07 3.50E-04

697 4.70E-11 4.47E-09 8.18E-07 3.25E-04

698 4.42E-11 4.18E-09 7.61E-07 3.02E-04

699 4.16E-11 3.92E-09 7.08E-07 2.81E-04

700 3.92E-11 3.67E-09 6.59E-07 2.61E-04

];


doublecones = [0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

1.19E-06

2.31E-05

4.54E-05

6.81E-05

9.13E-05

1.15E-04

1.39E-04

1.64E-04

1.90E-04

2.17E-04

2.44E-04

2.72E-04

3.02E-04

3.32E-04

3.64E-04

3.97E-04

4.31E-04

4.67E-04

5.04E-04

5.43E-04

5.84E-04

6.26E-04

6.70E-04

7.17E-04

7.65E-04

8.15E-04

8.68E-04

9.22E-04

9.79E-04

1.04E-03

1.10E-03

1.16E-03

1.23E-03

1.30E-03

1.37E-03

1.45E-03

1.52E-03

1.60E-03

1.69E-03

1.77E-03

1.86E-03

1.95E-03

2.05E-03

2.14E-03

2.25E-03

2.35E-03

2.46E-03

2.57E-03

2.68E-03

2.80E-03

2.92E-03

3.05E-03

3.18E-03

3.31E-03

3.44E-03

3.58E-03

3.72E-03

3.87E-03

4.02E-03

4.16E-03

4.32E-03

4.47E-03

4.63E-03

4.78E-03

4.93E-03

5.08E-03

5.24E-03

5.38E-03

5.53E-03

5.67E-03

5.82E-03

5.95E-03

6.09E-03

6.21E-03

6.34E-03

6.46E-03

6.58E-03

6.70E-03

6.82E-03

6.93E-03

7.04E-03

7.13E-03

7.23E-03

7.32E-03

7.43E-03

7.52E-03

7.61E-03

7.70E-03

7.78E-03

7.87E-03

7.95E-03

8.03E-03

8.12E-03

8.21E-03

8.29E-03

8.36E-03

8.44E-03

8.51E-03

8.58E-03

8.65E-03

8.71E-03

8.77E-03

8.84E-03

8.89E-03

8.96E-03

9.01E-03

9.05E-03

9.10E-03

9.15E-03

9.19E-03

9.24E-03

9.28E-03

9.32E-03

9.35E-03

9.38E-03

9.41E-03

9.43E-03

9.46E-03

9.48E-03

9.49E-03

9.50E-03

9.50E-03

9.50E-03

9.50E-03

9.49E-03

9.47E-03

9.46E-03

9.44E-03

9.42E-03

9.40E-03

9.37E-03

9.33E-03

9.30E-03

9.26E-03

9.22E-03

9.17E-03

9.12E-03

9.07E-03

9.01E-03

8.94E-03

8.87E-03

8.79E-03

8.71E-03

8.62E-03

8.53E-03

8.43E-03

8.32E-03

8.20E-03

8.08E-03

7.95E-03

7.82E-03

7.68E-03

7.54E-03

7.39E-03

7.23E-03

7.06E-03

6.89E-03

6.72E-03

6.54E-03

6.35E-03

6.16E-03

5.96E-03

5.76E-03

5.56E-03

5.36E-03

5.16E-03

4.96E-03

4.75E-03

4.55E-03

4.34E-03

4.14E-03

3.94E-03

3.74E-03

3.55E-03

3.36E-03

3.17E-03

2.99E-03

2.82E-03

2.65E-03

2.49E-03

2.34E-03

2.19E-03

2.05E-03

1.91E-03

1.78E-03

1.66E-03

1.54E-03

1.43E-03

1.33E-03

1.23E-03

1.14E-03

1.06E-03

9.77E-04

9.02E-04

8.33E-04

7.68E-04

7.08E-04

6.53E-04

6.01E-04

5.53E-04

5.09E-04

4.68E-04

4.30E-04

3.95E-04

3.63E-04

3.34E-04

3.07E-04

2.81E-04

2.58E-04

2.37E-04

2.18E-04

2.00E-04

1.83E-04

1.68E-04

1.54E-04

1.42E-04

1.30E-04

1.19E-04

1.10E-04

1.01E-04

9.22E-05

8.46E-05

7.77E-05

7.13E-05

6.55E-05

6.02E-05

5.53E-05

5.08E-05

4.66E-05

4.28E-05

3.94E-05

3.62E-05

3.33E-05

3.06E-05

2.81E-05

2.58E-05

2.37E-05

2.18E-05

2.01E-05

1.85E-05

1.70E-05

1.56E-05

1.44E-05

1.33E-05

1.22E-05

1.13E-05

1.04E-05

9.55E-06

8.80E-06

8.12E-06

7.48E-06

6.90E-06

6.36E-06

5.86E-06

5.41E-06

4.99E-06]; 


sensitivityCurves = cat(2, sensitivityCurves, doublecones);


case  ('User Defined')

%It is assumed that the UserDefinedCurves do not include double cone

%sensitivities

sensitivityCurves = cat(2, UserDefinedCurves, BlankDoubleCones); 

end


%Get size of user matrix

[rows cols] = size (User);

%This should be 401 rows  x (number of patches)columns


meanMatrix = User; 

meanMatrix(:, 1) = [];%Removes first column from meanMatrix, leaving 401 x (number of patches)


for i = 300 : 700

    meanMatrix(i-299, :) = meanMatrix(i - 299, :)* LightMatrix (i-299); 

end


%sensitivityCurves 401 x 6

sensitivityCurves = sensitivityCurves.';%Transposes sensitivityCurves to make a 6 X 401

sensitivityCurves(1, :) = [];%Removes the first row(300 - 700 nm) from sensitivityCurves, now 5 x 401


newMatrix = sensitivityCurves * meanMatrix; %[5 x 401] * [401 x numpatches] gives a [5 x numpatches]

newMatrix = newMatrix.';%Transposes to numpatches x 5 matrix


lightUSMLmatrix = sensitivityCurves * LightMatrix; %[5 x 401] x [401 x 1] = [5 x 1]

lightUSMLmatrix = lightUSMLmatrix.'; %Transposes to [1 x 5]


[newrows newcols] = size(newMatrix); 


for n = 1: newrows 

    newMatrix(n, :) = newMatrix(n, :)./lightUSMLmatrix(1, :);

end 


for n = 1:newrows

    doubleConePhotonCatch(n, 1) = newMatrix(n, 5); 

end


newMatrix(:, 5) = []; %Removes double cone photon catch values from newMatrix


%The idealized stimulation values of the four color cones are normalized to

%sum to 1. 

for n = 1:newrows

    rowSum = sum(newMatrix(n, :));

    for c = 1:4

      photonCatchMatrix (n, c) = newMatrix(n, c); %preserves photon catch data before normalization of u s m l to sum of 1

      newMatrix(n, c) = newMatrix(n, c) / rowSum;

    end

end


PhotonCatch = photonCatchMatrix; %contains the patches * 4 matrix with absolute u/v s m l stimulation values

Mega = newMatrix; %Mega contains the patches x 4 matrix containing u/v s m l relative stimulation values

Mega = roundn(Mega, -6);



%*************************************************************************%

%Multiplies the input matrix by the sensitivity curves to generate the u/v s m l

%proportions for each color patch. 


function [Mega, PhotonCatch, doubleConePhotonCatch] = processMatrix(User, visiontype, UserDefinedCurves)


%For cases where double cone sensitivities are unavailable

BlankDoubleCones = [0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0]; 


%columns are [nm uvs sws mws lws] with [double cones] added

switch visiontype


case('UVS Average bird')

%The color sone sensitivity curves are from Endler and Mielke 2005.

%The double cone sensitivities are not provided, blank matrix shown here.

%USML sensitivity curves [401 x 5]

sensitivityCurves = [300 0.00066924 0 0 0

301 0.00088357 0 0 0

302 0.00109922 0 0 0

303 0.00131585 0 0 0

304 0.00153312 0 0 0

305 0.00175074 0 0 0

306 0.00196843 0 0 0

307 0.00218598 0 0 0

308 0.00240318 0 0 0

309 0.00261987 0 0 0

310 0.00283592 0 0 0

311 0.00305125 0 0 0

312 0.0032658 0 0 0

313 0.00347955 0 0 0

314 0.0036925 0 0 0

315 0.0039047 0 0 0

316 0.00411622 0 0 0

317 0.00432715 0 0 0

318 0.00453758 0 0 0

319 0.00474765 0 0 0

320 0.0049575 0 0 0

321 0.00516727 0 0 0

322 0.00537711 0 0 0

323 0.00558717 0 0 0

324 0.0057976 0 0 0

325 0.00600854 0 0 0

326 0.00622011 0 0 0

327 0.00643243 0 0 0

328 0.00664559 0 0 0

329 0.00685967 0 0 0

330 0.00707471 0 0 0

331 0.00729074 0 0 0

332 0.00750776 0 0 0

333 0.00772575 0 0 0

334 0.00794463 0 0 0

335 0.00816433 0 0 0

336 0.00838472 0 0 0

337 0.00860567 0 0 0

338 0.00882698 0 0 0

339 0.00904846 0 0 0

340 0.00926987 0 0 0

341 0.00949096 0 0 0

342 0.00971144 0 0 0

343 0.00993101 0 0 0

344 0.01014935 0 0 0

345 0.0103661 0 0 0

346 0.0105809 0 0 0

347 0.01079337 0 0 0

348 0.01100311 0 0 0

349 0.01120972 0 0 0

350 0.01141277 0 0 0

351 0.01161184 0 0 0

352 0.01180646 0 0 0

353 0.01199621 0 0 0

354 0.01218061 0 0 0

355 0.0123592 0 0 0

356 0.01253152 0 0 0

357 0.01269707 0 0 0

358 0.01285537 0 0 0

359 0.01300595 0 0 0

360 0.01314829 0 0 0

361 0.01328191 0 0 0

362 0.01340629 0 0 0

363 0.01352093 0 0 0

364 0.01362532 0 0 0

365 0.01371894 0 0 0

366 0.01380128 0 0 0

367 0.0138718 0 0 0

368 0.01392999 0 0 0

369 0.01397533 0 0 0

370 0.01400727 0 0 0

371 0.01402531 0 0 0

372 0.01402892 0 0 0

373 0.01401758 0 0 0

374 0.01399077 0 0 0

375 0.013948 0 0 0

376 0.01388878 0 0 0

377 0.01381263 0 0 0

378 0.0137191 0 0 0

379 0.01360776 0 0 0

380 0.01347822 0 0 0

381 0.01333013 0 0 0

382 0.01316317 0 0 0

383 0.0129771 0 0 0

384 0.01277174 0 0 0

385 0.01254698 0 0 0

386 0.01230282 0 0 0

387 0.01203937 0 0 0

388 0.01175685 0 0 0

389 0.01145563 0 0 0

390 0.01113625 0 0 0

391 0.01079941 0 0 0

392 0.010446 0 0 0

393 0.01007714 0 0 0

394 0.00969412 0 0 0

395 0.00929849 0.00000001 0 0

396 0.00889198 0.00000003 0 0

397 0.00847655 0.00000008 0 0

398 0.00805434 0.00000021 0 0

399 0.00762765 0.00000052 0 0

400 0.00719891 0.00000119 0 0

401 0.00677065 0.00000254 0 0

402 0.0063454 0.00000514 0 0

403 0.00592571 0.0000098 0 0

404 0.00551403 0.00001778 0 0

405 0.00511269 0.00003075 0 0

406 0.00472383 0.00005092 0 0

407 0.00434937 0.00008102 0 0

408 0.00399095 0.00012427 0 0

409 0.00364991 0.00018426 0 0

410 0.00332729 0.00026484 0 0

411 0.00302382 0.00036993 0 0

412 0.00273991 0.00050331 0 0

413 0.00247569 0.00066841 0 0

414 0.00223102 0.0008681 0 0

415 0.00200552 0.00110459 0 0

416 0.00179862 0.00137924 0 0

417 0.00160958 0.00169253 0 0

418 0.00143754 0.00204404 0 0

419 0.00128154 0.00243248 0 0

420 0.00114056 0.00285574 0 0

421 0.00101355 0.00331103 0 0

422 0.00089946 0.00379495 0 0

423 0.00079724 0.00430369 0 0

424 0.00070586 0.00483311 0 0

425 0.00062436 0.00537887 0 0

426 0.00055181 0.00593661 0 0

427 0.00048734 0.006502 0 0

428 0.00043013 0.00707085 0 0

429 0.00037944 0.00763918 0 0

430 0.00033458 0.00820328 0 0

431 0.00029493 0.00875973 0 0

432 0.0002599 0.00930546 0 0

433 0.00022898 0.00983773 0 0

434 0.00020172 0.01035414 0 0

435 0.00017769 0.01085262 0 0

436 0.00015652 0.01133143 0 0

437 0.00013787 0.01178911 0 0

438 0.00012146 0.01222448 0 0

439 0.00010701 0.01263663 0 0

440 0.00009429 0.01302485 0 0

441 0.0000831 0.01338865 0 0

442 0.00007326 0.01372771 0 0

443 0.00006459 0.01404186 0 0

444 0.00005697 0.01433105 0 0

445 0.00005026 0.01459537 0 0

446 0.00004435 0.01483497 0 0

447 0.00003915 0.0150501 0 0

448 0.00003458 0.01524106 0 0

449 0.00003054 0.01540822 0 0

450 0.00002699 0.01555196 0 0

451 0.00002386 0.01567271 0 0

452 0.00002111 0.01577092 0 0

453 0.00001867 0.01584708 0 0

454 0.00001653 0.01590165 0 0

455 0.00001464 0.01593514 0 0

456 0.00001297 0.01594805 0 0

457 0.00001149 0.0159409 0 0

458 0.00001019 0.0159142 0 0

459 0.00000904 0.01586848 0 0

460 0.00000802 0.01580426 0 0

461 0.00000712 0.01572209 0 0

462 0.00000632 0.01562251 0 0

463 0.00000562 0.01550607 0 0

464 0.000005 0.01537332 0 0

465 0.00000444 0.01522484 0 0

466 0.00000395 0.0150612 0 0

467 0.00000352 0.014883 0 0

468 0.00000313 0.01469085 0 0

469 0.00000279 0.01448534 0 0

470 0.00000249 0.01426711 0 0

471 0.00000222 0.01403681 0 0

472 0.00000198 0.01379507 0 0

473 0.00000177 0.01354257 0 0

474 0.00000158 0.01327998 0 0

475 0.00000141 0.01300798 0 0

476 0.00000126 0.01272727 0 0

477 0.00000113 0.01243855 0 0

478 0.00000101 0.01214253 0 0

479 0.0000009 0.01183992 0 0

480 0.00000081 0.01153144 0 0

481 0.00000072 0.01121781 0 0

482 0.00000065 0.01089975 0 0

483 0.00000058 0.01057798 0 0

484 0.00000052 0.01025321 0 0

485 0.00000047 0.00992616 0.00000001 0

486 0.00000042 0.00959753 0.00000002 0

487 0.00000038 0.00926802 0.00000006 0

488 0.00000034 0.00893832 0.00000014 0

489 0.00000031 0.00860911 0.00000029 0

490 0.00000027 0.00828105 0.0000006 0

491 0.00000025 0.00795479 0.00000119 0

492 0.00000022 0.00763098 0.00000225 0

493 0.0000002 0.00731022 0.00000409 0

494 0.00000018 0.00699314 0.00000719 0

495 0.00000016 0.00668029 0.00001222 0

496 0.00000015 0.00637225 0.0000201 0

497 0.00000013 0.00606956 0.00003207 0

498 0.00000012 0.00577271 0.00004975 0

499 0.00000011 0.0054822 0.00007514 0

500 0.0000001 0.00519847 0.00011068 0

501 0.00000009 0.00492195 0.00015923 0

502 0.00000008 0.00465302 0.00022402 0

503 0.00000007 0.00439204 0.00030866 0

504 0.00000006 0.00413931 0.00041697 0

505 0.00000006 0.0038951 0.00055294 0

506 0.00000005 0.00365966 0.00072054 0

507 0.00000005 0.00343316 0.00092362 0

508 0.00000004 0.00321576 0.00116572 0

509 0.00000004 0.00300754 0.00144995 0

510 0.00000004 0.00280858 0.00177882 0

511 0.00000003 0.00261889 0.00215416 0

512 0.00000003 0.00243843 0.00257697 0

513 0.00000003 0.00226714 0.00304741 0

514 0.00000002 0.00210491 0.00356473 0

515 0.00000002 0.00195159 0.00412726 0

516 0.00000002 0.00180701 0.00473247 0

517 0.00000002 0.00167095 0.005377 0

518 0.00000002 0.00154319 0.00605674 0

519 0.00000002 0.00142345 0.00676691 0

520 0.00000001 0.00131145 0.00750222 0

521 0.00000001 0.0012069 0.00825694 0

522 0.00000001 0.00110948 0.00902506 0

523 0.00000001 0.00101887 0.00980039 0

524 0.00000001 0.00093473 0.01057668 0

525 0.00000001 0.00085675 0.01134774 0

526 0.00000001 0.00078457 0.01210758 0

527 0.00000001 0.00071788 0.01285041 0

528 0.00000001 0.00065634 0.01357082 0

529 0.00000001 0.00059963 0.01426375 0

530 0.00000001 0.00054745 0.01492463 0

531 0 0.0004995 0.01554935 0

532 0 0.00045547 0.01613431 0

533 0 0.00041511 0.01667643 0

534 0 0.00037813 0.01717318 0

535 0 0.00034429 0.01762253 0

536 0 0.00031335 0.01802294 0

537 0 0.00028508 0.01837338 0

538 0 0.00025928 0.01867328 0

539 0 0.00023574 0.01892249 0

540 0 0.00021428 0.01912126 0

541 0 0.00019474 0.01927019 0

542 0 0.00017694 0.01937023 0

543 0 0.00016074 0.01942259 0

544 0 0.00014601 0.01942877 0.00000001

545 0 0.00013261 0.01939046 0.00000002

546 0 0.00012044 0.01930955 0.00000004

547 0 0.00010937 0.01918807 0.00000009

548 0 0.00009932 0.01902818 0.00000019

549 0 0.00009019 0.01883214 0.00000038

550 0 0.0000819 0.01860226 0.00000072

551 0 0.00007438 0.01834092 0.00000133

552 0 0.00006755 0.0180505 0.00000237

553 0 0.00006135 0.0177334 0.00000409

554 0 0.00005573 0.017392 0.00000684

555 0 0.00005062 0.01702865 0.0000111

556 0 0.00004599 0.01664567 0.00001755

557 0 0.00004179 0.01624532 0.00002703

558 0 0.00003797 0.01582979 0.00004062

559 0 0.00003451 0.01540123 0.00005965

560 0 0.00003137 0.01496169 0.0000857

561 0 0.00002853 0.01451315 0.00012061

562 0 0.00002594 0.01405751 0.00016648

563 0 0.00002359 0.01359658 0.00022559

564 0 0.00002146 0.01313209 0.00030042

565 0 0.00001953 0.01266566 0.00039355

566 0 0.00001777 0.01219884 0.00050761

567 0 0.00001618 0.01173309 0.00064517

568 0 0.00001473 0.01126976 0.00080871

569 0 0.00001341 0.01081013 0.00100049

570 0 0.00001222 0.01035538 0.00122249

571 0 0.00001113 0.00990661 0.00147632

572 0 0.00001014 0.00946483 0.00176318

573 0 0.00000925 0.00903095 0.00208379

574 0 0.00000843 0.00860581 0.00243834

575 0 0.00000769 0.00819018 0.00282652

576 0 0.00000701 0.00778471 0.00324747

577 0 0.0000064 0.00739 0.00369979

578 0 0.00000584 0.00700657 0.00418162

579 0 0.00000533 0.00663485 0.0046906

580 0 0.00000487 0.00627521 0.00522398

581 0 0.00000445 0.00592793 0.00577864

582 0 0.00000406 0.00559324 0.00635117

583 0 0.00000371 0.00527129 0.00693794

584 0 0.0000034 0.00496218 0.00753515

585 0 0.0000031 0.00466593 0.00813889

586 0 0.00000284 0.00438254 0.00874525

587 0 0.0000026 0.0041119 0.00935031

588 0 0.00000238 0.00385391 0.00995024

589 0 0.00000218 0.00360839 0.01054136

590 0 0.00000199 0.00337511 0.01112013

591 0 0.00000183 0.00315385 0.01168324

592 0 0.00000167 0.0029443 0.01222761

593 0 0.00000153 0.00274615 0.01275041

594 0 0.0000014 0.00255907 0.0132491

595 0 0.00000129 0.0023827 0.01372141

596 0 0.00000118 0.00221666 0.01416538

597 0 0.00000108 0.00206056 0.01457933

598 0 0.00000099 0.00191401 0.01496187

599 0 0.00000091 0.00177659 0.01531191

600 0 0.00000084 0.00164789 0.01562862

601 0 0.00000077 0.00152752 0.01591142

602 0 0.00000071 0.00141505 0.01616

603 0 0.00000065 0.00131008 0.01637427

604 0 0.0000006 0.00121222 0.01655434

605 0 0.00000055 0.00112108 0.01670055

606 0 0.0000005 0.00103627 0.01681338

607 0 0.00000046 0.00095743 0.0168935

608 0 0.00000043 0.00088421 0.01694171

609 0 0.00000039 0.00081625 0.01695892

610 0 0.00000036 0.00075323 0.01694619

611 0 0.00000033 0.00069483 0.01690463

612 0 0.00000031 0.00064076 0.01683545

613 0 0.00000028 0.00059072 0.01673991

614 0 0.00000026 0.00054444 0.01661934

615 0 0.00000024 0.00050166 0.01647507

616 0 0.00000022 0.00046214 0.0163085

617 0 0.0000002 0.00042565 0.01612101

618 0 0.00000019 0.00039197 0.01591401

619 0 0.00000017 0.0003609 0.01568889

620 0 0.00000016 0.00033225 0.01544703

621 0 0.00000015 0.00030583 0.0151898

622 0 0.00000014 0.00028149 0.01491855

623 0 0.00000013 0.00025907 0.0146346

624 0 0.00000012 0.00023842 0.01433923

625 0 0.00000011 0.0002194 0.01403369

626 0 0.0000001 0.0002019 0.0137192

627 0 0.00000009 0.00018579 0.01339693

628 0 0.00000009 0.00017096 0.013068

629 0 0.00000008 0.00015732 0.01273351

630 0 0.00000007 0.00014477 0.01239448

631 0 0.00000007 0.00013323 0.01205192

632 0 0.00000006 0.00012261 0.01170677

633 0 0.00000006 0.00011284 0.01135994

634 0 0.00000005 0.00010386 0.01101229

635 0 0.00000005 0.00009561 0.01066462

636 0 0.00000005 0.00008801 0.01031771

637 0 0.00000004 0.00008103 0.00997228

638 0 0.00000004 0.00007461 0.00962901

639 0 0.00000004 0.0000687 0.00928854

640 0 0.00000003 0.00006327 0.00895147

641 0 0.00000003 0.00005828 0.00861836

642 0 0.00000003 0.00005369 0.00828972

643 0 0.00000003 0.00004946 0.00796604

644 0 0.00000003 0.00004558 0.00764775

645 0 0.00000002 0.000042 0.00733526

646 0 0.00000002 0.00003872 0.00702895

647 0 0.00000002 0.00003569 0.00672913

648 0 0.00000002 0.00003291 0.00643612

649 0 0.00000002 0.00003035 0.00615018

650 0 0.00000002 0.00002799 0.00587154

651 0 0.00000002 0.00002582 0.00560041

652 0 0.00000001 0.00002382 0.00533695

653 0 0.00000001 0.00002198 0.0050813

654 0 0.00000001 0.00002029 0.00483359

655 0 0.00000001 0.00001873 0.00459388

656 0 0.00000001 0.0000173 0.00436224

657 0 0.00000001 0.00001597 0.00413869

658 0 0.00000001 0.00001475 0.00392324

659 0 0.00000001 0.00001363 0.00371587

660 0 0.00000001 0.00001259 0.00351653

661 0 0.00000001 0.00001164 0.00332516

662 0 0.00000001 0.00001076 0.00314168

663 0 0.00000001 0.00000995 0.00296599

664 0 0.00000001 0.0000092 0.00279795

665 0 0.00000001 0.00000851 0.00263743

666 0 0.00000001 0.00000787 0.00248428

667 0 0 0.00000728 0.00233833

668 0 0 0.00000674 0.00219941

669 0 0 0.00000624 0.00206733

670 0 0 0.00000578 0.00194189

671 0 0 0.00000535 0.00182288

672 0 0 0.00000496 0.0017101

673 0 0 0.00000459 0.00160332

674 0 0 0.00000425 0.00150234

675 0 0 0.00000394 0.00140693

676 0 0 0.00000366 0.00131687

677 0 0 0.00000339 0.00123194

678 0 0 0.00000314 0.00115191

679 0 0 0.00000292 0.00107657

680 0 0 0.00000271 0.00100571

681 0 0 0.00000251 0.00093911

682 0 0 0.00000233 0.00087655

683 0 0 0.00000216 0.00081785

684 0 0 0.00000201 0.0007628

685 0 0 0.00000187 0.00071121

686 0 0 0.00000173 0.00066289

687 0 0 0.00000161 0.00061767

688 0 0 0.0000015 0.00057537

689 0 0 0.00000139 0.00053582

690 0 0 0.00000129 0.00049887

691 0 0 0.0000012 0.00046436

692 0 0 0.00000112 0.00043214

693 0 0 0.00000104 0.00040208

694 0 0 0.00000096 0.00036964

695 0 0 0.00000089 0.00034367

696 0 0 0.00000083 0.00031948

697 0 0 0.00000077 0.00029695

698 0 0 0.00000072 0.00027597

699 0 0 0.00000067 0.00025645

700 0 0 0.00000062 0.00023828

];


sensitivityCurves = cat(2, sensitivityCurves, BlankDoubleCones); 


case('UVS Blue tit')

%The color cone sensitivity curves are derived from data provided by Nathan Hart. 

%The double cone sensitivities are derived from data provided by Martin Stevens.

sensitivityCurves =[

300 6.37E-05 0.00E+00 0.00E+00 0.00E+00

301 7.55E-05 0.00E+00 0.00E+00 0.00E+00

302 9.39E-05 0.00E+00 0.00E+00 0.00E+00

303 1.22E-04 0.00E+00 0.00E+00 0.00E+00

304 1.66E-04 0.00E+00 0.00E+00 0.00E+00

305 2.31E-04 0.00E+00 0.00E+00 0.00E+00

306 3.29E-04 0.00E+00 0.00E+00 0.00E+00

307 4.77E-04 0.00E+00 0.00E+00 0.00E+00

308 6.98E-04 0.00E+00 0.00E+00 0.00E+00

309 1.01E-03 0.00E+00 0.00E+00 0.00E+00

310 1.42E-03 0.00E+00 0.00E+00 0.00E+00

311 1.92E-03 0.00E+00 0.00E+00 0.00E+00

312 2.49E-03 0.00E+00 0.00E+00 0.00E+00

313 3.07E-03 0.00E+00 0.00E+00 0.00E+00

314 3.64E-03 0.00E+00 0.00E+00 0.00E+00

315 4.17E-03 0.00E+00 0.00E+00 0.00E+00

316 4.65E-03 0.00E+00 0.00E+00 0.00E+00

317 5.06E-03 0.00E+00 0.00E+00 0.00E+00

318 5.42E-03 0.00E+00 0.00E+00 0.00E+00

319 5.72E-03 0.00E+00 0.00E+00 0.00E+00

320 5.97E-03 0.00E+00 0.00E+00 0.00E+00

321 6.19E-03 0.00E+00 0.00E+00 0.00E+00

322 6.39E-03 0.00E+00 0.00E+00 0.00E+00

323 6.57E-03 0.00E+00 0.00E+00 0.00E+00

324 6.75E-03 0.00E+00 0.00E+00 0.00E+00

325 6.91E-03 0.00E+00 0.00E+00 0.00E+00

326 7.06E-03 0.00E+00 0.00E+00 0.00E+00

327 7.22E-03 0.00E+00 0.00E+00 0.00E+00

328 7.36E-03 0.00E+00 0.00E+00 0.00E+00

329 7.51E-03 0.00E+00 0.00E+00 0.00E+00

330 7.65E-03 0.00E+00 0.00E+00 0.00E+00

331 7.81E-03 0.00E+00 0.00E+00 0.00E+00

332 7.96E-03 0.00E+00 0.00E+00 0.00E+00

333 8.10E-03 0.00E+00 0.00E+00 0.00E+00

334 8.24E-03 0.00E+00 0.00E+00 0.00E+00

335 8.37E-03 0.00E+00 0.00E+00 0.00E+00

336 8.52E-03 0.00E+00 0.00E+00 0.00E+00

337 8.66E-03 0.00E+00 0.00E+00 0.00E+00

338 8.81E-03 0.00E+00 0.00E+00 0.00E+00

339 8.96E-03 0.00E+00 0.00E+00 0.00E+00

340 9.12E-03 0.00E+00 0.00E+00 0.00E+00

341 9.28E-03 0.00E+00 0.00E+00 0.00E+00

342 9.45E-03 0.00E+00 0.00E+00 0.00E+00

343 9.62E-03 0.00E+00 0.00E+00 0.00E+00

344 9.79E-03 0.00E+00 0.00E+00 0.00E+00

345 9.97E-03 0.00E+00 0.00E+00 0.00E+00

346 1.02E-02 0.00E+00 0.00E+00 0.00E+00

347 1.03E-02 0.00E+00 0.00E+00 0.00E+00

348 1.05E-02 0.00E+00 0.00E+00 0.00E+00

349 1.07E-02 0.00E+00 0.00E+00 0.00E+00

350 1.09E-02 0.00E+00 0.00E+00 0.00E+00

351 1.10E-02 0.00E+00 0.00E+00 0.00E+00

352 1.12E-02 0.00E+00 0.00E+00 0.00E+00

353 1.13E-02 0.00E+00 0.00E+00 0.00E+00

354 1.15E-02 0.00E+00 0.00E+00 0.00E+00

355 1.17E-02 0.00E+00 0.00E+00 0.00E+00

356 1.18E-02 0.00E+00 0.00E+00 0.00E+00

357 1.19E-02 0.00E+00 0.00E+00 0.00E+00

358 1.20E-02 0.00E+00 0.00E+00 0.00E+00

359 1.21E-02 0.00E+00 0.00E+00 0.00E+00

360 1.22E-02 0.00E+00 0.00E+00 0.00E+00

361 1.23E-02 0.00E+00 0.00E+00 0.00E+00

362 1.24E-02 0.00E+00 0.00E+00 0.00E+00

363 1.25E-02 0.00E+00 0.00E+00 0.00E+00

364 1.25E-02 0.00E+00 0.00E+00 0.00E+00

365 1.26E-02 0.00E+00 0.00E+00 0.00E+00

366 1.26E-02 0.00E+00 0.00E+00 0.00E+00

367 1.27E-02 0.00E+00 0.00E+00 0.00E+00

368 1.28E-02 0.00E+00 0.00E+00 0.00E+00

369 1.28E-02 0.00E+00 0.00E+00 0.00E+00

370 1.29E-02 0.00E+00 0.00E+00 0.00E+00

371 1.29E-02 0.00E+00 0.00E+00 0.00E+00

372 1.30E-02 0.00E+00 0.00E+00 0.00E+00

373 1.30E-02 0.00E+00 0.00E+00 0.00E+00

374 1.30E-02 0.00E+00 0.00E+00 0.00E+00

375 1.30E-02 0.00E+00 0.00E+00 0.00E+00

376 1.30E-02 0.00E+00 0.00E+00 0.00E+00

377 1.29E-02 0.00E+00 0.00E+00 0.00E+00

378 1.29E-02 0.00E+00 0.00E+00 0.00E+00

379 1.28E-02 0.00E+00 0.00E+00 0.00E+00

380 1.27E-02 0.00E+00 0.00E+00 0.00E+00

381 1.27E-02 0.00E+00 0.00E+00 0.00E+00

382 1.26E-02 0.00E+00 0.00E+00 0.00E+00

383 1.24E-02 0.00E+00 0.00E+00 0.00E+00

384 1.23E-02 0.00E+00 0.00E+00 0.00E+00

385 1.22E-02 0.00E+00 0.00E+00 0.00E+00

386 1.20E-02 0.00E+00 0.00E+00 0.00E+00

387 1.18E-02 0.00E+00 0.00E+00 0.00E+00

388 1.17E-02 0.00E+00 0.00E+00 0.00E+00

389 1.15E-02 0.00E+00 0.00E+00 0.00E+00

390 1.12E-02 0.00E+00 0.00E+00 0.00E+00

391 1.10E-02 0.00E+00 0.00E+00 0.00E+00

392 1.08E-02 0.00E+00 0.00E+00 0.00E+00

393 1.05E-02 0.00E+00 0.00E+00 0.00E+00

394 1.02E-02 0.00E+00 0.00E+00 0.00E+00

395 9.92E-03 0.00E+00 0.00E+00 0.00E+00

396 9.61E-03 0.00E+00 0.00E+00 0.00E+00

397 9.29E-03 0.00E+00 0.00E+00 0.00E+00

398 8.96E-03 0.00E+00 0.00E+00 0.00E+00

399 8.62E-03 0.00E+00 0.00E+00 0.00E+00

400 8.27E-03 0.00E+00 0.00E+00 0.00E+00

401 7.91E-03 0.00E+00 0.00E+00 0.00E+00

402 7.55E-03 0.00E+00 0.00E+00 0.00E+00

403 7.18E-03 0.00E+00 0.00E+00 0.00E+00

404 6.81E-03 1.16E-05 0.00E+00 0.00E+00

405 6.44E-03 2.24E-05 0.00E+00 0.00E+00

406 6.07E-03 4.76E-05 0.00E+00 0.00E+00

407 5.70E-03 1.02E-04 0.00E+00 0.00E+00

408 5.33E-03 1.71E-04 0.00E+00 0.00E+00

409 4.98E-03 2.82E-04 0.00E+00 0.00E+00

410 4.63E-03 3.92E-04 0.00E+00 0.00E+00

411 4.30E-03 5.37E-04 0.00E+00 0.00E+00

412 3.98E-03 7.01E-04 0.00E+00 0.00E+00

413 3.66E-03 8.96E-04 0.00E+00 0.00E+00

414 3.37E-03 1.11E-03 0.00E+00 0.00E+00

415 3.09E-03 1.37E-03 0.00E+00 0.00E+00

416 2.82E-03 1.64E-03 0.00E+00 0.00E+00

417 2.57E-03 1.98E-03 0.00E+00 0.00E+00

418 2.34E-03 2.31E-03 0.00E+00 0.00E+00

419 2.12E-03 2.71E-03 0.00E+00 0.00E+00

420 1.92E-03 3.07E-03 0.00E+00 0.00E+00

421 1.74E-03 3.53E-03 0.00E+00 0.00E+00

422 1.57E-03 3.98E-03 0.00E+00 0.00E+00

423 1.41E-03 4.48E-03 0.00E+00 0.00E+00

424 1.27E-03 4.97E-03 0.00E+00 0.00E+00

425 1.14E-03 5.52E-03 0.00E+00 0.00E+00

426 1.02E-03 6.06E-03 0.00E+00 0.00E+00

427 9.08E-04 6.65E-03 0.00E+00 0.00E+00

428 8.11E-04 7.19E-03 0.00E+00 0.00E+00

429 7.23E-04 7.77E-03 0.00E+00 0.00E+00

430 6.43E-04 8.33E-03 0.00E+00 0.00E+00

431 5.72E-04 8.94E-03 0.00E+00 0.00E+00

432 5.08E-04 9.47E-03 0.00E+00 0.00E+00

433 4.51E-04 1.00E-02 0.00E+00 0.00E+00

434 3.99E-04 1.05E-02 0.00E+00 0.00E+00

435 3.54E-04 1.10E-02 0.00E+00 0.00E+00

436 3.13E-04 1.15E-02 0.00E+00 0.00E+00

437 2.77E-04 1.19E-02 0.00E+00 0.00E+00

438 2.45E-04 1.23E-02 0.00E+00 0.00E+00

439 2.17E-04 1.26E-02 0.00E+00 0.00E+00

440 1.92E-04 1.29E-02 0.00E+00 0.00E+00

441 1.69E-04 1.32E-02 0.00E+00 0.00E+00

442 1.50E-04 1.34E-02 0.00E+00 0.00E+00

443 1.32E-04 1.37E-02 0.00E+00 0.00E+00

444 1.17E-04 1.38E-02 0.00E+00 0.00E+00

445 1.03E-04 1.40E-02 0.00E+00 0.00E+00

446 9.11E-05 1.41E-02 0.00E+00 0.00E+00

447 8.05E-05 1.43E-02 0.00E+00 0.00E+00

448 7.11E-05 1.44E-02 0.00E+00 0.00E+00

449 6.28E-05 1.44E-02 0.00E+00 0.00E+00

450 5.55E-05 1.45E-02 0.00E+00 0.00E+00

451 4.91E-05 1.45E-02 0.00E+00 0.00E+00

452 4.34E-05 1.46E-02 0.00E+00 0.00E+00

453 3.84E-05 1.46E-02 0.00E+00 0.00E+00

454 3.40E-05 1.47E-02 0.00E+00 0.00E+00

455 3.01E-05 1.47E-02 0.00E+00 0.00E+00

456 2.66E-05 1.47E-02 0.00E+00 0.00E+00

457 2.36E-05 1.46E-02 0.00E+00 0.00E+00

458 2.09E-05 1.46E-02 0.00E+00 0.00E+00

459 1.85E-05 1.45E-02 0.00E+00 0.00E+00

460 1.64E-05 1.45E-02 0.00E+00 0.00E+00

461 1.46E-05 1.44E-02 0.00E+00 0.00E+00

462 1.29E-05 1.44E-02 0.00E+00 0.00E+00

463 1.15E-05 1.43E-02 0.00E+00 0.00E+00

464 1.02E-05 1.42E-02 0.00E+00 0.00E+00

465 9.04E-06 1.41E-02 0.00E+00 0.00E+00

466 8.04E-06 1.40E-02 0.00E+00 0.00E+00

467 7.15E-06 1.38E-02 0.00E+00 0.00E+00

468 6.36E-06 1.37E-02 0.00E+00 0.00E+00

469 5.66E-06 1.35E-02 0.00E+00 0.00E+00

470 5.04E-06 1.34E-02 0.00E+00 0.00E+00

471 4.49E-06 1.32E-02 0.00E+00 0.00E+00

472 4.00E-06 1.31E-02 0.00E+00 0.00E+00

473 3.56E-06 1.29E-02 0.00E+00 0.00E+00

474 3.18E-06 1.27E-02 0.00E+00 0.00E+00

475 2.84E-06 1.25E-02 0.00E+00 0.00E+00

476 2.53E-06 1.23E-02 0.00E+00 0.00E+00

477 2.26E-06 1.21E-02 0.00E+00 0.00E+00

478 2.02E-06 1.18E-02 0.00E+00 0.00E+00

479 1.81E-06 1.16E-02 0.00E+00 0.00E+00

480 1.61E-06 1.14E-02 0.00E+00 0.00E+00

481 1.44E-06 1.11E-02 0.00E+00 0.00E+00

482 1.29E-06 1.09E-02 0.00E+00 0.00E+00

483 1.16E-06 1.06E-02 0.00E+00 0.00E+00

484 1.04E-06 1.03E-02 0.00E+00 0.00E+00

485 9.28E-07 1.01E-02 0.00E+00 0.00E+00

486 8.32E-07 9.79E-03 0.00E+00 0.00E+00

487 7.47E-07 9.51E-03 0.00E+00 0.00E+00

488 6.70E-07 9.23E-03 9.46E-06 0.00E+00

489 6.01E-07 8.95E-03 0.00E+00 0.00E+00

490 5.40E-07 8.68E-03 2.08E-07 0.00E+00

491 4.86E-07 8.41E-03 6.54E-06 0.00E+00

492 4.36E-07 8.14E-03 1.84E-05 0.00E+00

493 3.92E-07 7.86E-03 3.98E-05 0.00E+00

494 3.53E-07 7.59E-03 6.61E-05 0.00E+00

495 3.18E-07 7.31E-03 1.11E-04 0.00E+00

496 2.86E-07 7.03E-03 1.63E-04 0.00E+00

497 2.58E-07 6.76E-03 2.41E-04 0.00E+00

498 2.32E-07 6.50E-03 3.22E-04 0.00E+00

499 2.09E-07 6.23E-03 4.43E-04 0.00E+00

500 1.89E-07 5.97E-03 5.70E-04 0.00E+00

501 1.70E-07 5.71E-03 7.46E-04 0.00E+00

502 1.54E-07 5.45E-03 9.21E-04 0.00E+00

503 1.39E-07 5.20E-03 1.16E-03 0.00E+00

504 1.25E-07 4.94E-03 1.40E-03 0.00E+00

505 1.13E-07 4.70E-03 1.71E-03 0.00E+00

506 1.02E-07 4.46E-03 2.02E-03 0.00E+00

507 9.25E-08 4.24E-03 2.41E-03 0.00E+00

508 8.36E-08 4.01E-03 2.78E-03 0.00E+00

509 7.57E-08 3.79E-03 3.25E-03 0.00E+00

510 6.85E-08 3.58E-03 3.71E-03 0.00E+00

511 6.21E-08 3.37E-03 4.27E-03 0.00E+00

512 5.62E-08 3.17E-03 4.79E-03 0.00E+00

513 5.09E-08 2.97E-03 5.42E-03 0.00E+00

514 4.62E-08 2.79E-03 6.01E-03 0.00E+00

515 4.19E-08 2.61E-03 6.71E-03 0.00E+00

516 3.80E-08 2.44E-03 7.35E-03 0.00E+00

517 3.45E-08 2.28E-03 8.08E-03 0.00E+00

518 3.13E-08 2.12E-03 8.75E-03 0.00E+00

519 2.85E-08 1.98E-03 9.51E-03 0.00E+00

520 2.58E-08 1.84E-03 1.02E-02 0.00E+00

521 2.35E-08 1.71E-03 1.10E-02 0.00E+00

522 2.14E-08 1.58E-03 1.16E-02 0.00E+00

523 1.94E-08 1.46E-03 1.24E-02 0.00E+00

524 1.77E-08 1.35E-03 1.30E-02 0.00E+00

525 1.61E-08 1.25E-03 1.38E-02 0.00E+00

526 1.47E-08 1.15E-03 1.44E-02 0.00E+00

527 1.33E-08 1.06E-03 1.50E-02 0.00E+00

528 1.22E-08 9.81E-04 1.56E-02 0.00E+00

529 1.11E-08 9.03E-04 1.61E-02 0.00E+00

530 1.01E-08 8.30E-04 1.66E-02 0.00E+00

531 9.23E-09 7.62E-04 1.71E-02 0.00E+00

532 8.42E-09 6.99E-04 1.75E-02 0.00E+00

533 7.69E-09 6.42E-04 1.79E-02 0.00E+00

534 7.02E-09 5.88E-04 1.82E-02 0.00E+00

535 6.41E-09 5.38E-04 1.85E-02 0.00E+00

536 5.86E-09 4.92E-04 1.87E-02 0.00E+00

537 5.36E-09 4.50E-04 1.89E-02 0.00E+00

538 4.90E-09 4.11E-04 1.90E-02 0.00E+00

539 4.48E-09 3.75E-04 1.90E-02 0.00E+00

540 4.10E-09 3.42E-04 1.90E-02 0.00E+00

541 3.75E-09 3.12E-04 1.90E-02 0.00E+00

542 3.44E-09 2.84E-04 1.90E-02 0.00E+00

543 3.15E-09 2.59E-04 1.89E-02 0.00E+00

544 2.88E-09 2.36E-04 1.87E-02 0.00E+00

545 2.64E-09 2.15E-04 1.85E-02 7.26E-07

546 2.42E-09 1.96E-04 1.83E-02 9.59E-07

547 2.22E-09 1.78E-04 1.81E-02 0.00E+00

548 2.04E-09 1.62E-04 1.78E-02 1.72E-06

549 1.87E-09 1.48E-04 1.75E-02 9.55E-07

550 1.72E-09 1.34E-04 1.71E-02 4.21E-06

551 1.58E-09 1.22E-04 1.68E-02 4.02E-06

552 1.45E-09 1.11E-04 1.64E-02 8.04E-06

553 1.33E-09 1.01E-04 1.60E-02 8.45E-06

554 1.22E-09 9.18E-05 1.56E-02 1.42E-05

555 1.13E-09 8.36E-05 1.52E-02 1.97E-05

556 1.04E-09 7.60E-05 1.48E-02 3.02E-05

557 9.53E-10 6.91E-05 1.44E-02 4.16E-05

558 8.77E-10 6.29E-05 1.39E-02 5.60E-05

559 8.07E-10 5.72E-05 1.35E-02 7.66E-05

560 7.44E-10 5.20E-05 1.31E-02 1.03E-04

561 6.85E-10 4.73E-05 1.26E-02 1.38E-04

562 6.31E-10 4.31E-05 1.22E-02 1.79E-04

563 5.82E-10 3.92E-05 1.18E-02 2.35E-04

564 5.36E-10 3.56E-05 1.13E-02 3.01E-04

565 4.94E-10 3.24E-05 1.09E-02 3.88E-04

566 4.56E-10 2.95E-05 1.05E-02 4.85E-04

567 4.21E-10 2.68E-05 1.00E-02 6.15E-04

568 3.88E-10 2.44E-05 9.62E-03 7.54E-04

569 3.58E-10 2.22E-05 9.21E-03 9.38E-04

570 3.31E-10 2.02E-05 8.80E-03 1.13E-03

571 3.05E-10 1.84E-05 8.41E-03 1.38E-03

572 2.82E-10 1.68E-05 8.02E-03 1.63E-03

573 2.61E-10 1.53E-05 7.65E-03 1.96E-03

574 2.41E-10 1.39E-05 7.28E-03 2.28E-03

575 2.23E-10 1.27E-05 6.92E-03 2.68E-03

576 2.06E-10 1.16E-05 6.57E-03 3.08E-03

577 1.91E-10 1.05E-05 6.24E-03 3.56E-03

578 1.76E-10 9.62E-06 5.91E-03 4.03E-03

579 1.63E-10 8.78E-06 5.60E-03 4.59E-03

580 1.51E-10 8.01E-06 5.30E-03 5.13E-03

581 1.40E-10 7.32E-06 5.01E-03 5.76E-03

582 1.30E-10 6.69E-06 4.73E-03 6.34E-03

583 1.21E-10 6.11E-06 4.46E-03 7.03E-03

584 1.12E-10 5.59E-06 4.20E-03 7.65E-03

585 1.04E-10 5.11E-06 3.95E-03 8.36E-03

586 9.62E-11 4.68E-06 3.72E-03 9.00E-03

587 8.93E-11 4.28E-06 3.49E-03 9.73E-03

588 8.30E-11 3.92E-06 3.28E-03 1.04E-02

589 7.70E-11 3.58E-06 3.07E-03 1.11E-02

590 7.15E-11 3.28E-06 2.87E-03 1.17E-02

591 6.65E-11 3.00E-06 2.69E-03 1.23E-02

592 6.18E-11 2.75E-06 2.51E-03 1.29E-02

593 5.74E-11 2.51E-06 2.35E-03 1.35E-02

594 5.33E-11 2.30E-06 2.19E-03 1.40E-02

595 4.96E-11 2.11E-06 2.04E-03 1.46E-02

596 4.61E-11 1.93E-06 1.90E-03 1.50E-02

597 4.29E-11 1.77E-06 1.77E-03 1.55E-02

598 3.99E-11 1.62E-06 1.64E-03 1.58E-02

599 3.71E-11 1.49E-06 1.53E-03 1.62E-02

600 3.46E-11 1.36E-06 1.42E-03 1.64E-02

601 3.22E-11 1.25E-06 1.31E-03 1.67E-02

602 3.00E-11 1.15E-06 1.22E-03 1.69E-02

603 2.79E-11 1.06E-06 1.13E-03 1.71E-02

604 2.60E-11 9.69E-07 1.05E-03 1.72E-02

605 2.42E-11 8.90E-07 9.68E-04 1.74E-02

606 2.26E-11 8.18E-07 8.96E-04 1.74E-02

607 2.11E-11 7.51E-07 8.28E-04 1.75E-02

608 1.96E-11 6.91E-07 7.65E-04 1.74E-02

609 1.83E-11 6.35E-07 7.07E-04 1.74E-02

610 1.71E-11 5.84E-07 6.53E-04 1.73E-02

611 1.59E-11 5.37E-07 6.03E-04 1.72E-02

612 1.49E-11 4.94E-07 5.56E-04 1.71E-02

613 1.39E-11 4.55E-07 5.13E-04 1.69E-02

614 1.30E-11 4.19E-07 4.73E-04 1.68E-02

615 1.21E-11 3.86E-07 4.36E-04 1.66E-02

616 1.13E-11 3.55E-07 4.02E-04 1.63E-02

617 1.06E-11 3.28E-07 3.71E-04 1.61E-02

618 9.89E-12 3.02E-07 3.41E-04 1.59E-02

619 9.24E-12 2.79E-07 3.15E-04 1.56E-02

620 8.64E-12 2.57E-07 2.90E-04 1.53E-02

621 8.08E-12 2.37E-07 2.67E-04 1.50E-02

622 7.56E-12 2.19E-07 2.46E-04 1.47E-02

623 7.07E-12 2.02E-07 2.26E-04 1.44E-02

624 6.62E-12 1.87E-07 2.08E-04 1.41E-02

625 6.19E-12 1.73E-07 1.92E-04 1.37E-02

626 5.80E-12 1.59E-07 1.76E-04 1.34E-02

627 5.43E-12 1.47E-07 1.62E-04 1.31E-02

628 5.09E-12 1.36E-07 1.49E-04 1.27E-02

629 4.77E-12 1.26E-07 1.38E-04 1.24E-02

630 4.47E-12 1.16E-07 1.27E-04 1.20E-02

631 4.19E-12 1.07E-07 1.17E-04 1.17E-02

632 3.92E-12 9.94E-08 1.07E-04 1.13E-02

633 3.68E-12 9.18E-08 9.89E-05 1.10E-02

634 3.45E-12 8.50E-08 9.11E-05 1.06E-02

635 3.24E-12 7.86E-08 8.39E-05 1.03E-02

636 3.04E-12 7.28E-08 7.72E-05 9.92E-03

637 2.85E-12 6.74E-08 7.11E-05 9.58E-03

638 2.67E-12 6.24E-08 6.55E-05 9.24E-03

639 2.51E-12 5.79E-08 6.03E-05 8.90E-03

640 2.36E-12 5.37E-08 5.56E-05 8.57E-03

641 2.21E-12 4.98E-08 5.12E-05 8.24E-03

642 2.08E-12 4.61E-08 4.72E-05 7.92E-03

643 1.95E-12 4.28E-08 4.35E-05 7.60E-03

644 1.83E-12 3.98E-08 4.00E-05 7.29E-03

645 1.72E-12 3.69E-08 3.69E-05 6.99E-03

646 1.62E-12 3.43E-08 3.40E-05 6.69E-03

647 1.52E-12 3.18E-08 3.14E-05 6.40E-03

648 1.43E-12 2.96E-08 2.89E-05 6.11E-03

649 1.35E-12 2.75E-08 2.67E-05 5.83E-03

650 1.27E-12 2.55E-08 2.46E-05 5.56E-03

651 1.19E-12 2.37E-08 2.27E-05 5.31E-03

652 1.12E-12 2.20E-08 2.10E-05 5.05E-03

653 1.06E-12 2.04E-08 1.94E-05 4.81E-03

654 9.96E-13 1.90E-08 1.79E-05 4.57E-03

655 9.38E-13 1.76E-08 1.65E-05 4.34E-03

656 8.83E-13 1.64E-08 1.52E-05 4.12E-03

657 8.32E-13 1.53E-08 1.41E-05 3.91E-03

658 7.84E-13 1.42E-08 1.30E-05 3.70E-03

659 7.39E-13 1.32E-08 1.20E-05 3.50E-03

660 6.96E-13 1.23E-08 1.11E-05 3.31E-03

661 6.56E-13 1.14E-08 1.03E-05 3.13E-03

662 6.19E-13 1.07E-08 9.48E-06 2.96E-03

663 5.83E-13 9.94E-09 8.77E-06 2.79E-03

664 5.50E-13 9.27E-09 8.11E-06 2.63E-03

665 5.19E-13 8.63E-09 7.50E-06 2.48E-03

666 4.90E-13 8.05E-09 6.94E-06 2.33E-03

667 4.62E-13 7.50E-09 6.42E-06 2.20E-03

668 4.36E-13 6.99E-09 5.95E-06 2.07E-03

669 4.12E-13 6.52E-09 5.50E-06 1.94E-03

670 3.89E-13 6.09E-09 5.10E-06 1.82E-03

671 3.67E-13 5.67E-09 4.72E-06 1.71E-03

672 3.47E-13 5.30E-09 4.38E-06 1.61E-03

673 3.28E-13 4.95E-09 4.05E-06 1.51E-03

674 3.10E-13 4.62E-09 3.76E-06 1.41E-03

675 2.93E-13 4.32E-09 3.48E-06 1.32E-03

676 2.76E-13 4.03E-09 3.23E-06 1.24E-03

677 2.61E-13 3.77E-09 3.00E-06 1.16E-03

678 2.47E-13 3.52E-09 2.78E-06 1.08E-03

679 2.34E-13 3.29E-09 2.58E-06 1.01E-03

680 2.21E-13 3.08E-09 2.39E-06 9.43E-04

681 2.09E-13 2.88E-09 2.22E-06 8.80E-04

682 1.98E-13 2.69E-09 2.06E-06 8.22E-04

683 1.87E-13 2.52E-09 1.91E-06 7.66E-04

684 1.77E-13 2.35E-09 1.78E-06 7.15E-04

685 1.68E-13 2.20E-09 1.65E-06 6.66E-04

686 1.59E-13 2.06E-09 1.53E-06 6.21E-04

687 1.50E-13 1.93E-09 1.42E-06 5.79E-04

688 1.42E-13 1.81E-09 1.32E-06 5.39E-04

689 1.35E-13 1.69E-09 1.23E-06 5.02E-04

690 1.28E-13 1.58E-09 1.14E-06 4.67E-04

691 1.21E-13 1.48E-09 1.06E-06 4.35E-04

692 1.14E-13 1.39E-09 9.90E-07 4.05E-04

693 1.08E-13 1.30E-09 9.21E-07 3.77E-04

694 1.03E-13 1.22E-09 8.57E-07 3.50E-04

695 9.74E-14 1.15E-09 7.97E-07 3.26E-04

696 9.23E-14 1.07E-09 7.42E-07 3.03E-04

697 8.75E-14 1.01E-09 6.91E-07 2.82E-04

698 8.30E-14 9.45E-10 6.43E-07 2.62E-04

699 7.87E-14 8.87E-10 5.99E-07 2.44E-04

700 7.46E-14 8.31E-10 5.58E-07 2.27E-04]; 


doublecones = [0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

2.51E-05

5.43E-05

8.26E-05

1.10E-04

1.37E-04

1.63E-04

1.89E-04

2.14E-04

2.38E-04

2.63E-04

2.87E-04

3.11E-04

3.36E-04

3.60E-04

3.84E-04

4.09E-04

4.34E-04

4.60E-04

4.86E-04

5.12E-04

5.39E-04

5.67E-04

5.95E-04

6.25E-04

6.54E-04

6.86E-04

7.15E-04

7.47E-04

7.76E-04

8.07E-04

8.35E-04

8.65E-04

8.93E-04

9.22E-04

9.49E-04

9.78E-04

1.01E-03

1.03E-03

1.06E-03

1.09E-03

1.12E-03

1.15E-03

1.18E-03

1.21E-03

1.24E-03

1.27E-03

1.31E-03

1.34E-03

1.38E-03

1.41E-03

1.45E-03

1.49E-03

1.53E-03

1.57E-03

1.61E-03

1.65E-03

1.70E-03

1.74E-03

1.78E-03

1.83E-03

1.88E-03

1.92E-03

1.97E-03

2.02E-03

2.07E-03

2.12E-03

2.17E-03

2.23E-03

2.28E-03

2.34E-03

2.39E-03

2.45E-03

2.51E-03

2.57E-03

2.63E-03

2.69E-03

2.75E-03

2.82E-03

2.88E-03

2.95E-03

3.01E-03

3.08E-03

3.15E-03

3.22E-03

3.29E-03

3.36E-03

3.43E-03

3.51E-03

3.58E-03

3.66E-03

3.73E-03

3.81E-03

3.88E-03

3.96E-03

4.04E-03

4.12E-03

4.20E-03

4.28E-03

4.36E-03

4.44E-03

4.52E-03

4.60E-03

4.68E-03

4.76E-03

4.84E-03

4.92E-03

5.00E-03

5.08E-03

5.16E-03

5.24E-03

5.32E-03

5.41E-03

5.49E-03

5.56E-03

5.65E-03

5.73E-03

5.81E-03

5.88E-03

5.96E-03

6.04E-03

6.11E-03

6.19E-03

6.27E-03

6.34E-03

6.42E-03

6.49E-03

6.56E-03

6.63E-03

6.70E-03

6.76E-03

6.83E-03

6.89E-03

6.95E-03

7.01E-03

7.07E-03

7.13E-03

7.19E-03

7.24E-03

7.29E-03

7.34E-03

7.39E-03

7.44E-03

7.48E-03

7.52E-03

7.56E-03

7.60E-03

7.63E-03

7.66E-03

7.69E-03

7.72E-03

7.74E-03

7.77E-03

7.79E-03

7.80E-03

7.81E-03

7.82E-03

7.83E-03

7.83E-03

7.84E-03

7.83E-03

7.83E-03

7.82E-03

7.80E-03

7.79E-03

7.77E-03

7.74E-03

7.72E-03

7.69E-03

7.66E-03

7.63E-03

7.59E-03

7.56E-03

7.52E-03

7.47E-03

7.43E-03

7.38E-03

7.33E-03

7.28E-03

7.23E-03

7.17E-03

7.11E-03

7.04E-03

6.98E-03

6.90E-03

6.83E-03

6.75E-03

6.67E-03

6.59E-03

6.51E-03

6.42E-03

6.33E-03

6.24E-03

6.14E-03

6.05E-03

5.95E-03

5.85E-03

5.75E-03

5.65E-03

5.54E-03

5.44E-03

5.33E-03

5.22E-03

5.12E-03

5.01E-03

4.90E-03

4.79E-03

4.68E-03

4.57E-03

4.46E-03

4.34E-03

4.23E-03

4.12E-03

4.01E-03

3.90E-03

3.79E-03

3.68E-03

3.57E-03

3.46E-03

3.35E-03

3.25E-03

3.14E-03

3.04E-03

2.94E-03

2.84E-03

2.74E-03

2.64E-03

2.54E-03

2.45E-03

2.36E-03

2.27E-03

2.18E-03

2.09E-03

2.00E-03

1.92E-03

1.84E-03

1.76E-03

1.68E-03

1.61E-03

1.54E-03

1.47E-03

1.40E-03

1.33E-03

1.27E-03

1.21E-03

1.15E-03

1.09E-03

1.03E-03

9.79E-04

9.28E-04

8.79E-04

8.31E-04

7.86E-04

7.42E-04

7.00E-04

6.60E-04

6.22E-04

5.85E-04

5.50E-04

5.17E-04

4.86E-04

4.56E-04

4.27E-04

4.00E-04

3.75E-04

3.51E-04

3.28E-04

3.06E-04

2.85E-04

2.66E-04

2.48E-04

2.31E-04

2.14E-04

1.92E-04

1.79E-04

1.66E-04

1.54E-04

1.43E-04

1.33E-04

1.24E-04

1.15E-04

1.07E-04

9.92E-05

9.22E-05

8.57E-05

7.97E-05

7.41E-05

6.89E-05

6.41E-05

5.96E-05

5.54E-05

5.15E-05

4.79E-05

4.46E-05];


sensitivityCurves = cat(2, sensitivityCurves, doublecones); 


case('UVS Starling')

%The color cone sensitivity curves are derived from data provided by Nathan Hart. 

%The double cone sensitivities are derived from data provided by Martin Stevens.

sensitivityCurves =[

300 6.38E-06 0.00E+00 0.00E+00 0.00E+00

301 8.41E-06 0.00E+00 0.00E+00 0.00E+00

302 1.16E-05 0.00E+00 0.00E+00 0.00E+00

303 1.66E-05 0.00E+00 0.00E+00 0.00E+00

304 2.48E-05 0.00E+00 0.00E+00 0.00E+00

305 3.84E-05 0.00E+00 0.00E+00 0.00E+00

306 6.09E-05 0.00E+00 0.00E+00 0.00E+00

307 9.85E-05 0.00E+00 0.00E+00 0.00E+00

308 1.59E-04 0.00E+00 0.00E+00 0.00E+00

309 2.59E-04 0.00E+00 0.00E+00 0.00E+00

310 4.19E-04 0.00E+00 0.00E+00 0.00E+00

311 6.62E-04 0.00E+00 0.00E+00 0.00E+00

312 1.00E-03 0.00E+00 0.00E+00 0.00E+00

313 1.44E-03 0.00E+00 0.00E+00 0.00E+00

314 1.97E-03 0.00E+00 0.00E+00 0.00E+00

315 2.56E-03 0.00E+00 0.00E+00 0.00E+00

316 3.17E-03 0.00E+00 0.00E+00 0.00E+00

317 3.75E-03 0.00E+00 0.00E+00 0.00E+00

318 4.29E-03 0.00E+00 0.00E+00 0.00E+00

319 4.77E-03 0.00E+00 0.00E+00 0.00E+00

320 5.19E-03 0.00E+00 0.00E+00 0.00E+00

321 5.56E-03 0.00E+00 0.00E+00 0.00E+00

322 5.89E-03 0.00E+00 0.00E+00 0.00E+00

323 6.18E-03 0.00E+00 0.00E+00 0.00E+00

324 6.45E-03 0.00E+00 0.00E+00 0.00E+00

325 6.69E-03 0.00E+00 0.00E+00 0.00E+00

326 6.93E-03 0.00E+00 0.00E+00 0.00E+00

327 7.15E-03 0.00E+00 0.00E+00 0.00E+00

328 7.37E-03 0.00E+00 0.00E+00 0.00E+00

329 7.58E-03 0.00E+00 0.00E+00 0.00E+00

330 7.77E-03 0.00E+00 0.00E+00 0.00E+00

331 8.00E-03 0.00E+00 0.00E+00 0.00E+00

332 8.21E-03 0.00E+00 0.00E+00 0.00E+00

333 8.43E-03 0.00E+00 0.00E+00 0.00E+00

334 8.66E-03 0.00E+00 0.00E+00 0.00E+00

335 8.90E-03 0.00E+00 0.00E+00 0.00E+00

336 9.16E-03 0.00E+00 0.00E+00 0.00E+00

337 9.41E-03 0.00E+00 0.00E+00 0.00E+00

338 9.66E-03 0.00E+00 0.00E+00 0.00E+00

339 9.92E-03 0.00E+00 0.00E+00 0.00E+00

340 1.02E-02 0.00E+00 0.00E+00 0.00E+00

341 1.05E-02 0.00E+00 0.00E+00 0.00E+00

342 1.08E-02 0.00E+00 0.00E+00 0.00E+00

343 1.11E-02 0.00E+00 0.00E+00 0.00E+00

344 1.14E-02 0.00E+00 0.00E+00 0.00E+00

345 1.16E-02 0.00E+00 0.00E+00 0.00E+00

346 1.19E-02 0.00E+00 0.00E+00 0.00E+00

347 1.21E-02 0.00E+00 0.00E+00 0.00E+00

348 1.24E-02 0.00E+00 0.00E+00 0.00E+00

349 1.26E-02 0.00E+00 0.00E+00 0.00E+00

350 1.29E-02 0.00E+00 0.00E+00 0.00E+00

351 1.31E-02 0.00E+00 0.00E+00 0.00E+00

352 1.33E-02 0.00E+00 0.00E+00 0.00E+00

353 1.36E-02 0.00E+00 0.00E+00 0.00E+00

354 1.39E-02 0.00E+00 0.00E+00 0.00E+00

355 1.41E-02 0.00E+00 0.00E+00 0.00E+00

356 1.43E-02 0.00E+00 1.32E-03 4.27E-04

357 1.45E-02 1.19E-06 1.32E-03 4.31E-04

358 1.47E-02 4.46E-06 1.33E-03 4.26E-04

359 1.49E-02 1.36E-05 1.33E-03 4.31E-04

360 1.51E-02 1.65E-05 1.35E-03 4.63E-04

361 1.52E-02 2.75E-05 1.37E-03 4.74E-04

362 1.54E-02 3.29E-05 1.39E-03 5.00E-04

363 1.55E-02 4.41E-05 1.39E-03 5.06E-04

364 1.55E-02 6.46E-05 1.41E-03 5.31E-04

365 1.55E-02 7.56E-05 1.39E-03 5.50E-04

366 1.56E-02 9.05E-05 1.40E-03 5.67E-04

367 1.56E-02 9.96E-05 1.38E-03 5.82E-04

368 1.57E-02 1.09E-04 1.37E-03 5.88E-04

369 1.57E-02 1.17E-04 1.34E-03 5.94E-04

370 1.57E-02 1.16E-04 1.32E-03 5.89E-04

371 1.56E-02 1.22E-04 1.27E-03 5.75E-04

372 1.55E-02 1.18E-04 1.23E-03 5.60E-04

373 1.54E-02 1.17E-04 1.17E-03 5.38E-04

374 1.53E-02 1.14E-04 1.12E-03 5.17E-04

375 1.52E-02 1.06E-04 1.05E-03 4.91E-04

376 1.50E-02 1.07E-04 1.02E-03 4.77E-04

377 1.48E-02 1.08E-04 9.48E-04 4.48E-04

378 1.46E-02 1.22E-04 9.17E-04 4.33E-04

379 1.44E-02 1.32E-04 8.49E-04 4.03E-04

380 1.41E-02 1.52E-04 8.18E-04 3.85E-04

381 1.39E-02 1.69E-04 7.52E-04 3.55E-04

382 1.36E-02 1.92E-04 7.23E-04 3.39E-04

383 1.33E-02 2.29E-04 6.61E-04 3.10E-04

384 1.29E-02 2.73E-04 6.35E-04 2.92E-04

385 1.26E-02 3.16E-04 5.83E-04 2.69E-04

386 1.22E-02 3.60E-04 5.55E-04 2.51E-04

387 1.17E-02 4.10E-04 5.02E-04 2.25E-04

388 1.13E-02 4.65E-04 4.82E-04 2.12E-04

389 1.08E-02 5.18E-04 4.39E-04 1.91E-04

390 1.04E-02 5.84E-04 4.25E-04 1.84E-04

391 9.89E-03 6.44E-04 3.88E-04 1.69E-04

392 9.39E-03 7.01E-04 3.79E-04 1.65E-04

393 8.88E-03 7.67E-04 3.52E-04 1.56E-04

394 8.38E-03 8.15E-04 3.45E-04 1.53E-04

395 7.87E-03 8.70E-04 3.20E-04 1.48E-04

396 7.37E-03 9.25E-04 3.13E-04 1.45E-04

397 6.87E-03 1.00E-03 2.92E-04 1.40E-04

398 6.38E-03 1.07E-03 2.86E-04 1.37E-04

399 5.90E-03 1.14E-03 2.65E-04 1.32E-04

400 5.44E-03 1.20E-03 2.58E-04 1.30E-04

401 5.00E-03 1.30E-03 2.40E-04 1.25E-04

402 4.57E-03 1.39E-03 2.34E-04 1.21E-04

403 4.17E-03 1.51E-03 2.19E-04 1.15E-04

404 3.79E-03 1.62E-03 2.13E-04 1.12E-04

405 3.43E-03 1.78E-03 2.01E-04 1.07E-04

406 3.09E-03 1.92E-03 1.98E-04 1.05E-04

407 2.79E-03 2.12E-03 1.86E-04 1.01E-04

408 2.50E-03 2.27E-03 1.86E-04 9.96E-05

409 2.24E-03 2.50E-03 1.76E-04 9.70E-05

410 2.00E-03 2.70E-03 1.77E-04 9.59E-05

411 1.78E-03 2.98E-03 1.68E-04 9.42E-05

412 1.58E-03 3.18E-03 1.69E-04 9.38E-05

413 1.41E-03 3.50E-03 1.62E-04 9.28E-05

414 1.25E-03 3.73E-03 1.65E-04 9.31E-05

415 1.10E-03 4.08E-03 1.58E-04 9.24E-05

416 9.75E-04 4.35E-03 1.63E-04 9.29E-05

417 8.61E-04 4.74E-03 1.56E-04 9.16E-05

418 7.60E-04 5.02E-03 1.66E-04 9.20E-05

419 6.70E-04 5.43E-03 1.58E-04 9.05E-05

420 5.91E-04 5.74E-03 1.70E-04 9.18E-05

421 5.20E-04 6.17E-03 1.64E-04 9.03E-05

422 4.58E-04 6.48E-03 1.77E-04 9.04E-05

423 4.03E-04 6.94E-03 1.73E-04 8.95E-05

424 3.55E-04 7.26E-03 1.93E-04 9.06E-05

425 3.13E-04 7.71E-03 1.87E-04 8.94E-05

426 2.75E-04 8.05E-03 2.06E-04 9.05E-05

427 2.42E-04 8.49E-03 1.98E-04 8.86E-05

428 2.13E-04 8.80E-03 2.18E-04 9.03E-05

429 1.87E-04 9.23E-03 2.08E-04 8.84E-05

430 1.65E-04 9.54E-03 2.34E-04 9.04E-05

431 1.45E-04 9.93E-03 2.23E-04 8.76E-05

432 1.27E-04 1.02E-02 2.54E-04 8.99E-05

433 1.12E-04 1.06E-02 2.40E-04 8.69E-05

434 9.86E-05 1.08E-02 2.73E-04 8.85E-05

435 8.68E-05 1.11E-02 2.51E-04 8.45E-05

436 7.65E-05 1.14E-02 2.85E-04 8.59E-05

437 6.73E-05 1.16E-02 2.67E-04 8.19E-05

438 5.93E-05 1.18E-02 2.95E-04 8.32E-05

439 5.23E-05 1.20E-02 2.75E-04 7.93E-05

440 4.61E-05 1.22E-02 3.05E-04 8.02E-05

441 4.06E-05 1.23E-02 2.78E-04 7.52E-05

442 3.58E-05 1.24E-02 3.09E-04 7.71E-05

443 3.16E-05 1.26E-02 2.75E-04 7.19E-05

444 2.78E-05 1.27E-02 3.14E-04 7.46E-05

445 2.46E-05 1.28E-02 2.77E-04 7.05E-05

446 2.17E-05 1.29E-02 3.19E-04 7.33E-05

447 1.92E-05 1.29E-02 2.74E-04 6.86E-05

448 1.69E-05 1.30E-02 3.09E-04 7.14E-05

449 1.50E-05 1.30E-02 2.68E-04 6.70E-05

450 1.33E-05 1.31E-02 3.09E-04 7.03E-05

451 1.17E-05 1.31E-02 2.67E-04 6.65E-05

452 1.04E-05 1.31E-02 3.03E-04 6.96E-05

453 9.21E-06 1.32E-02 2.59E-04 6.49E-05

454 8.16E-06 1.32E-02 2.95E-04 6.81E-05

455 7.24E-06 1.32E-02 2.41E-04 6.34E-05

456 6.42E-06 1.31E-02 2.70E-04 6.52E-05

457 5.69E-06 1.31E-02 2.10E-04 6.05E-05

458 5.05E-06 1.31E-02 2.53E-04 6.35E-05

459 4.49E-06 1.30E-02 2.00E-04 5.86E-05

460 3.98E-06 1.30E-02 2.49E-04 6.16E-05

461 3.54E-06 1.29E-02 1.93E-04 5.66E-05

462 3.15E-06 1.28E-02 2.22E-04 5.89E-05

463 2.80E-06 1.28E-02 1.74E-04 5.54E-05

464 2.50E-06 1.27E-02 2.00E-04 5.85E-05

465 2.22E-06 1.26E-02 1.52E-04 5.46E-05

466 1.98E-06 1.25E-02 1.78E-04 5.72E-05

467 1.77E-06 1.24E-02 1.38E-04 5.37E-05

468 1.58E-06 1.22E-02 1.67E-04 5.57E-05

469 1.41E-06 1.21E-02 1.13E-04 5.13E-05

470 1.26E-06 1.20E-02 1.44E-04 5.50E-05

471 1.12E-06 1.18E-02 8.40E-05 5.06E-05

472 1.00E-06 1.17E-02 1.08E-04 5.24E-05

473 8.95E-07 1.15E-02 7.07E-05 4.90E-05

474 8.00E-07 1.13E-02 9.31E-05 5.12E-05

475 7.16E-07 1.12E-02 5.93E-05 4.66E-05

476 6.41E-07 1.10E-02 8.53E-05 4.90E-05

477 5.74E-07 1.08E-02 5.37E-05 4.50E-05

478 5.15E-07 1.06E-02 8.76E-05 4.78E-05

479 4.61E-07 1.04E-02 5.53E-05 4.48E-05

480 4.14E-07 1.02E-02 9.35E-05 4.84E-05

481 3.71E-07 9.94E-03 5.04E-05 4.36E-05

482 3.33E-07 9.73E-03 8.60E-05 4.71E-05

483 2.99E-07 9.52E-03 5.30E-05 4.40E-05

484 2.69E-07 9.29E-03 8.19E-05 4.69E-05

485 2.42E-07 9.06E-03 4.69E-05 4.23E-05

486 2.17E-07 8.83E-03 6.79E-05 4.46E-05

487 1.96E-07 8.59E-03 3.56E-05 3.98E-05

488 1.76E-07 8.36E-03 5.63E-05 4.18E-05

489 1.59E-07 8.12E-03 2.20E-05 3.74E-05

490 1.43E-07 7.88E-03 4.08E-05 3.87E-05

491 1.29E-07 7.64E-03 6.60E-06 3.30E-05

492 1.16E-07 7.39E-03 2.48E-05 3.44E-05

493 1.05E-07 7.15E-03 0.00E+00 2.91E-05

494 9.44E-08 6.90E-03 2.19E-05 2.98E-05

495 8.51E-08 6.65E-03 6.69E-06 2.49E-05

496 7.68E-08 6.40E-03 3.24E-05 2.59E-05

497 6.94E-08 6.15E-03 3.53E-05 2.21E-05

498 6.27E-08 5.90E-03 6.52E-05 2.30E-05

499 5.66E-08 5.65E-03 7.93E-05 1.93E-05

500 5.12E-08 5.42E-03 1.14E-04 1.98E-05

501 4.63E-08 5.17E-03 1.57E-04 1.70E-05

502 4.19E-08 4.94E-03 2.09E-04 1.75E-05

503 3.79E-08 4.71E-03 2.88E-04 1.41E-05

504 3.43E-08 4.48E-03 3.69E-04 1.42E-05

505 3.11E-08 4.26E-03 4.86E-04 1.18E-05

506 2.82E-08 4.05E-03 5.98E-04 1.14E-05

507 2.56E-08 3.84E-03 7.68E-04 8.76E-06

508 2.32E-08 3.63E-03 9.18E-04 8.27E-06

509 2.10E-08 3.44E-03 1.15E-03 5.72E-06

510 1.91E-08 3.24E-03 1.36E-03 6.98E-06

511 1.73E-08 3.06E-03 1.66E-03 4.09E-06

512 1.57E-08 2.88E-03 1.91E-03 3.70E-06

513 1.43E-08 2.71E-03 2.30E-03 1.86E-06

514 1.30E-08 2.54E-03 2.61E-03 2.12E-06

515 1.18E-08 2.38E-03 3.08E-03 4.11E-07

516 1.08E-08 2.23E-03 3.44E-03 1.36E-06

517 9.80E-09 2.08E-03 3.99E-03 0.00E+00

518 8.91E-09 1.94E-03 4.41E-03 1.87E-06

519 8.11E-09 1.81E-03 5.04E-03 1.21E-06

520 7.39E-09 1.68E-03 5.51E-03 3.71E-06

521 6.73E-09 1.56E-03 6.21E-03 9.71E-07

522 6.14E-09 1.45E-03 6.72E-03 3.45E-06

523 5.60E-09 1.34E-03 7.49E-03 2.58E-06

524 5.10E-09 1.24E-03 8.04E-03 5.70E-06

525 4.66E-09 1.15E-03 8.86E-03 5.38E-06

526 4.25E-09 1.06E-03 9.43E-03 8.97E-06

527 3.88E-09 9.78E-04 1.03E-02 7.71E-06

528 3.55E-09 9.01E-04 1.09E-02 1.04E-05

529 3.25E-09 8.30E-04 1.17E-02 1.02E-05

530 2.97E-09 7.65E-04 1.23E-02 1.38E-05

531 2.72E-09 7.03E-04 1.31E-02 1.33E-05

532 2.49E-09 6.45E-04 1.37E-02 2.03E-05

533 2.28E-09 5.92E-04 1.44E-02 1.97E-05

534 2.09E-09 5.42E-04 1.49E-02 2.70E-05

535 1.91E-09 4.96E-04 1.56E-02 2.62E-05

536 1.75E-09 4.54E-04 1.60E-02 3.32E-05

537 1.61E-09 4.16E-04 1.66E-02 3.36E-05

538 1.47E-09 3.80E-04 1.70E-02 4.09E-05

539 1.35E-09 3.48E-04 1.74E-02 4.40E-05

540 1.24E-09 3.17E-04 1.77E-02 5.00E-05

541 1.14E-09 2.89E-04 1.80E-02 4.97E-05

542 1.04E-09 2.64E-04 1.82E-02 5.65E-05

543 9.57E-10 2.41E-04 1.84E-02 5.33E-05

544 8.79E-10 2.19E-04 1.84E-02 5.97E-05

545 8.08E-10 2.00E-04 1.86E-02 5.70E-05

546 7.43E-10 1.82E-04 1.85E-02 6.59E-05

547 6.82E-10 1.65E-04 1.85E-02 6.42E-05

548 6.27E-10 1.51E-04 1.84E-02 6.95E-05

549 5.77E-10 1.37E-04 1.83E-02 7.04E-05

550 5.31E-10 1.25E-04 1.81E-02 7.57E-05

551 4.89E-10 1.13E-04 1.79E-02 7.73E-05

552 4.50E-10 1.03E-04 1.76E-02 8.66E-05

553 4.14E-10 9.38E-05 1.74E-02 9.30E-05

554 3.81E-10 8.53E-05 1.70E-02 1.04E-04

555 3.51E-10 7.76E-05 1.67E-02 1.17E-04

556 3.24E-10 7.06E-05 1.64E-02 1.32E-04

557 2.99E-10 6.42E-05 1.60E-02 1.52E-04

558 2.76E-10 5.85E-05 1.56E-02 1.75E-04

559 2.55E-10 5.32E-05 1.53E-02 2.11E-04

560 2.35E-10 4.84E-05 1.48E-02 2.42E-04

561 2.17E-10 4.40E-05 1.44E-02 3.02E-04

562 2.00E-10 4.01E-05 1.40E-02 3.48E-04

563 1.85E-10 3.65E-05 1.36E-02 4.32E-04

564 1.71E-10 3.32E-05 1.31E-02 4.98E-04

565 1.58E-10 3.02E-05 1.27E-02 6.20E-04

566 1.46E-10 2.75E-05 1.22E-02 7.13E-04

567 1.35E-10 2.50E-05 1.18E-02 8.83E-04

568 1.25E-10 2.28E-05 1.14E-02 1.01E-03

569 1.16E-10 2.07E-05 1.09E-02 1.24E-03

570 1.07E-10 1.89E-05 1.05E-02 1.42E-03

571 9.90E-11 1.72E-05 1.01E-02 1.71E-03

572 9.16E-11 1.56E-05 9.66E-03 1.93E-03

573 8.48E-11 1.42E-05 9.24E-03 2.30E-03

574 7.85E-11 1.30E-05 8.83E-03 2.58E-03

575 7.27E-11 1.18E-05 8.43E-03 3.03E-03

576 6.74E-11 1.08E-05 8.04E-03 3.38E-03

577 6.25E-11 9.82E-06 7.67E-03 3.91E-03

578 5.80E-11 8.96E-06 7.30E-03 4.31E-03

579 5.38E-11 8.17E-06 6.94E-03 4.92E-03

580 4.99E-11 7.47E-06 6.59E-03 5.37E-03

581 4.64E-11 6.82E-06 6.26E-03 6.04E-03

582 4.31E-11 6.24E-06 5.93E-03 6.53E-03

583 4.00E-11 5.70E-06 5.61E-03 7.25E-03

584 3.72E-11 5.21E-06 5.31E-03 7.77E-03

585 3.45E-11 4.76E-06 5.01E-03 8.51E-03

586 3.21E-11 4.35E-06 4.73E-03 9.03E-03

587 2.98E-11 3.98E-06 4.45E-03 9.78E-03

588 2.77E-11 3.64E-06 4.19E-03 1.03E-02

589 2.58E-11 3.33E-06 3.94E-03 1.10E-02

590 2.40E-11 3.05E-06 3.70E-03 1.15E-02

591 2.23E-11 2.79E-06 3.47E-03 1.22E-02

592 2.08E-11 2.55E-06 3.26E-03 1.26E-02

593 1.93E-11 2.34E-06 3.05E-03 1.33E-02

594 1.80E-11 2.14E-06 2.85E-03 1.37E-02

595 1.68E-11 1.96E-06 2.67E-03 1.43E-02

596 1.56E-11 1.80E-06 2.49E-03 1.46E-02

597 1.46E-11 1.65E-06 2.33E-03 1.51E-02

598 1.36E-11 1.51E-06 2.17E-03 1.53E-02

599 1.27E-11 1.39E-06 2.02E-03 1.58E-02

600 1.18E-11 1.27E-06 1.88E-03 1.59E-02

601 1.10E-11 1.17E-06 1.75E-03 1.63E-02

602 1.03E-11 1.07E-06 1.63E-03 1.64E-02

603 9.60E-12 9.86E-07 1.51E-03 1.66E-02

604 8.96E-12 9.06E-07 1.40E-03 1.67E-02

605 8.36E-12 8.32E-07 1.30E-03 1.68E-02

606 7.81E-12 7.64E-07 1.21E-03 1.68E-02

607 7.29E-12 7.02E-07 1.12E-03 1.69E-02

608 6.81E-12 6.45E-07 1.04E-03 1.68E-02

609 6.36E-12 5.93E-07 9.59E-04 1.68E-02

610 5.94E-12 5.45E-07 8.87E-04 1.67E-02

611 5.55E-12 5.01E-07 8.20E-04 1.66E-02

612 5.19E-12 4.61E-07 7.58E-04 1.64E-02

613 4.85E-12 4.24E-07 7.00E-04 1.63E-02

614 4.54E-12 3.90E-07 6.46E-04 1.61E-02

615 4.24E-12 3.59E-07 5.96E-04 1.59E-02

616 3.97E-12 3.31E-07 5.50E-04 1.57E-02

617 3.72E-12 3.05E-07 5.08E-04 1.55E-02

618 3.48E-12 2.81E-07 4.69E-04 1.52E-02

619 3.26E-12 2.59E-07 4.32E-04 1.50E-02

620 3.06E-12 2.39E-07 3.99E-04 1.47E-02

621 2.87E-12 2.21E-07 3.68E-04 1.45E-02

622 2.69E-12 2.04E-07 3.40E-04 1.41E-02

623 2.52E-12 1.88E-07 3.13E-04 1.39E-02

624 2.36E-12 1.74E-07 2.89E-04 1.35E-02

625 2.22E-12 1.61E-07 2.66E-04 1.33E-02

626 2.08E-12 1.48E-07 2.45E-04 1.29E-02

627 1.95E-12 1.37E-07 2.26E-04 1.26E-02

628 1.83E-12 1.27E-07 2.08E-04 1.22E-02

629 1.72E-12 1.17E-07 1.92E-04 1.19E-02

630 1.61E-12 1.08E-07 1.77E-04 1.16E-02

631 1.51E-12 9.98E-08 1.63E-04 1.12E-02

632 1.42E-12 9.22E-08 1.50E-04 1.09E-02

633 1.33E-12 8.53E-08 1.38E-04 1.05E-02

634 1.25E-12 7.89E-08 1.27E-04 1.02E-02

635 1.17E-12 7.29E-08 1.17E-04 9.84E-03

636 1.10E-12 6.75E-08 1.07E-04 9.49E-03

637 1.04E-12 6.25E-08 9.90E-05 9.16E-03

638 9.75E-13 5.79E-08 9.13E-05 8.83E-03

639 9.16E-13 5.36E-08 8.41E-05 8.51E-03

640 8.62E-13 4.98E-08 7.76E-05 8.19E-03

641 8.11E-13 4.61E-08 7.15E-05 7.88E-03

642 7.64E-13 4.28E-08 6.59E-05 7.57E-03

643 7.19E-13 3.97E-08 6.08E-05 7.28E-03

644 6.77E-13 3.69E-08 5.61E-05 6.98E-03

645 6.37E-13 3.42E-08 5.17E-05 6.69E-03

646 6.00E-13 3.18E-08 4.77E-05 6.40E-03

647 5.65E-13 2.95E-08 4.40E-05 6.13E-03

648 5.32E-13 2.74E-08 4.05E-05 5.85E-03

649 5.01E-13 2.54E-08 3.74E-05 5.59E-03

650 4.72E-13 2.36E-08 3.45E-05 5.33E-03

651 4.44E-13 2.19E-08 3.18E-05 5.08E-03

652 4.19E-13 2.03E-08 2.93E-05 4.83E-03

653 3.94E-13 1.89E-08 2.71E-05 4.59E-03

654 3.72E-13 1.75E-08 2.50E-05 4.36E-03

655 3.51E-13 1.63E-08 2.31E-05 4.14E-03

656 3.31E-13 1.52E-08 2.13E-05 3.93E-03

657 3.12E-13 1.41E-08 1.97E-05 3.73E-03

658 2.95E-13 1.31E-08 1.82E-05 3.53E-03

659 2.78E-13 1.22E-08 1.68E-05 3.35E-03

660 2.63E-13 1.14E-08 1.55E-05 3.16E-03

661 2.48E-13 1.06E-08 1.44E-05 2.99E-03

662 2.34E-13 9.87E-09 1.33E-05 2.82E-03

663 2.21E-13 9.19E-09 1.23E-05 2.66E-03

664 2.09E-13 8.57E-09 1.14E-05 2.51E-03

665 1.97E-13 7.97E-09 1.05E-05 2.37E-03

666 1.86E-13 7.44E-09 9.72E-06 2.23E-03

667 1.76E-13 6.93E-09 8.99E-06 2.10E-03

668 1.67E-13 6.46E-09 8.33E-06 1.97E-03

669 1.57E-13 6.02E-09 7.70E-06 1.85E-03

670 1.49E-13 5.62E-09 7.13E-06 1.74E-03

671 1.41E-13 5.24E-09 6.60E-06 1.63E-03

672 1.33E-13 4.89E-09 6.11E-06 1.52E-03

673 1.26E-13 4.56E-09 5.65E-06 1.43E-03

674 1.19E-13 4.26E-09 5.24E-06 1.34E-03

675 1.12E-13 3.97E-09 4.85E-06 1.25E-03

676 1.06E-13 3.71E-09 4.49E-06 1.17E-03

677 1.01E-13 3.46E-09 4.16E-06 1.09E-03

678 9.51E-14 3.23E-09 3.86E-06 1.02E-03

679 9.00E-14 3.02E-09 3.58E-06 9.54E-04

680 8.52E-14 2.81E-09 3.32E-06 8.90E-04

681 8.07E-14 2.63E-09 3.08E-06 8.31E-04

682 7.65E-14 2.46E-09 2.86E-06 7.76E-04

683 7.25E-14 2.30E-09 2.65E-06 7.24E-04

684 6.87E-14 2.15E-09 2.46E-06 6.75E-04

685 6.51E-14 2.01E-09 2.29E-06 6.29E-04

686 6.17E-14 1.88E-09 2.12E-06 5.86E-04

687 5.85E-14 1.76E-09 1.97E-06 5.46E-04

688 5.55E-14 1.65E-09 1.83E-06 5.09E-04

689 5.26E-14 1.55E-09 1.70E-06 4.74E-04

690 4.99E-14 1.45E-09 1.58E-06 4.41E-04

691 4.73E-14 1.36E-09 1.47E-06 4.10E-04

692 4.49E-14 1.27E-09 1.37E-06 3.82E-04

693 4.25E-14 1.19E-09 1.27E-06 3.55E-04

694 4.03E-14 1.11E-09 1.18E-06 3.30E-04

695 3.83E-14 1.04E-09 1.10E-06 3.07E-04

696 3.63E-14 9.79E-10 1.02E-06 2.85E-04

697 3.45E-14 9.17E-10 9.52E-07 2.65E-04

698 3.27E-14 8.59E-10 8.86E-07 2.46E-04

699 3.10E-14 8.04E-10 8.24E-07 2.29E-04

700 2.95E-14 7.54E-10 7.67E-07 2.12E-04]; 


doublecones = [0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

2.58E-06

2.35E-05

4.47E-05

6.60E-05

8.74E-05

1.09E-04

1.30E-04

1.51E-04

1.73E-04

1.94E-04

2.14E-04

2.35E-04

2.55E-04

2.75E-04

2.95E-04

3.15E-04

3.34E-04

3.53E-04

3.71E-04

3.89E-04

4.05E-04

4.22E-04

4.38E-04

4.54E-04

4.69E-04

4.82E-04

4.96E-04

5.09E-04

5.22E-04

5.34E-04

5.45E-04

5.56E-04

5.66E-04

5.76E-04

5.86E-04

5.95E-04

6.04E-04

6.12E-04

6.19E-04

6.27E-04

6.34E-04

6.41E-04

6.48E-04

6.55E-04

6.61E-04

6.67E-04

6.74E-04

6.80E-04

6.87E-04

6.94E-04

7.02E-04

7.10E-04

7.18E-04

7.27E-04

7.37E-04

7.46E-04

7.58E-04

7.69E-04

7.84E-04

7.95E-04

8.12E-04

8.22E-04

8.40E-04

8.52E-04

8.69E-04

8.83E-04

9.02E-04

9.16E-04

9.35E-04

9.51E-04

9.70E-04

9.87E-04

1.01E-03

1.02E-03

1.04E-03

1.06E-03

1.08E-03

1.10E-03

1.13E-03

1.15E-03

1.17E-03

1.20E-03

1.22E-03

1.25E-03

1.28E-03

1.31E-03

1.34E-03

1.37E-03

1.40E-03

1.43E-03

1.47E-03

1.50E-03

1.54E-03

1.58E-03

1.61E-03

1.65E-03

1.69E-03

1.73E-03

1.78E-03

1.82E-03

1.87E-03

1.91E-03

1.96E-03

2.01E-03

2.06E-03

2.11E-03

2.16E-03

2.21E-03

2.26E-03

2.32E-03

2.37E-03

2.43E-03

2.49E-03

2.54E-03

2.60E-03

2.67E-03

2.73E-03

2.79E-03

2.86E-03

2.92E-03

2.99E-03

3.06E-03

3.12E-03

3.19E-03

3.26E-03

3.34E-03

3.41E-03

3.48E-03

3.55E-03

3.62E-03

3.69E-03

3.77E-03

3.84E-03

3.92E-03

3.99E-03

4.07E-03

4.14E-03

4.22E-03

4.30E-03

4.38E-03

4.46E-03

4.54E-03

4.62E-03

4.70E-03

4.78E-03

4.86E-03

4.94E-03

5.02E-03

5.10E-03

5.18E-03

5.26E-03

5.33E-03

5.41E-03

5.49E-03

5.57E-03

5.64E-03

5.72E-03

5.80E-03

5.87E-03

5.95E-03

6.02E-03

6.10E-03

6.18E-03

6.26E-03

6.33E-03

6.41E-03

6.48E-03

6.54E-03

6.61E-03

6.68E-03

6.74E-03

6.81E-03

6.87E-03

6.92E-03

6.98E-03

7.03E-03

7.09E-03

7.14E-03

7.19E-03

7.24E-03

7.28E-03

7.32E-03

7.36E-03

7.40E-03

7.44E-03

7.47E-03

7.50E-03

7.52E-03

7.55E-03

7.58E-03

7.60E-03

7.62E-03

7.64E-03

7.65E-03

7.67E-03

7.67E-03

7.68E-03

7.68E-03

7.68E-03

7.68E-03

7.67E-03

7.65E-03

7.64E-03

7.62E-03

7.60E-03

7.57E-03

7.54E-03

7.51E-03

7.47E-03

7.44E-03

7.40E-03

7.36E-03

7.32E-03

7.27E-03

7.23E-03

7.18E-03

7.12E-03

7.07E-03

7.01E-03

6.94E-03

6.88E-03

6.80E-03

6.73E-03

6.66E-03

6.58E-03

6.50E-03

6.41E-03

6.33E-03

6.24E-03

6.16E-03

6.07E-03

5.98E-03

5.89E-03

5.79E-03

5.69E-03

5.60E-03

5.49E-03

5.39E-03

5.29E-03

5.18E-03

5.08E-03

4.97E-03

4.86E-03

4.75E-03

4.64E-03

4.53E-03

4.42E-03

4.31E-03

4.20E-03

4.09E-03

3.98E-03

3.88E-03

3.77E-03

3.66E-03

3.56E-03

3.46E-03

3.35E-03

3.25E-03

3.15E-03

3.04E-03

2.94E-03

2.84E-03

2.74E-03

2.65E-03

2.55E-03

2.45E-03

2.36E-03

2.27E-03

2.18E-03

2.09E-03

2.01E-03

1.92E-03

1.84E-03

1.77E-03

1.69E-03

1.62E-03

1.54E-03

1.47E-03

1.41E-03

1.34E-03

1.28E-03

1.21E-03

1.15E-03

1.10E-03

1.04E-03

9.86E-04

9.34E-04

8.84E-04

8.36E-04

7.90E-04

7.47E-04

7.05E-04

6.66E-04

6.27E-04

5.91E-04

5.56E-04

5.22E-04

4.91E-04

4.60E-04

4.32E-04

4.05E-04

3.79E-04

3.54E-04

3.31E-04

3.09E-04

2.88E-04

2.68E-04

2.50E-04

2.32E-04

2.16E-04

1.94E-04

1.80E-04

1.67E-04

1.55E-04

1.44E-04

1.33E-04

1.24E-04

1.15E-04

1.07E-04

9.95E-05

9.24E-05

8.59E-05

7.98E-05

7.42E-05

6.89E-05

6.40E-05

5.94E-05

5.52E-05

5.13E-05

4.77E-05

4.44E-05

4.13E-05

3.83E-05

3.57E-05]; 


sensitivityCurves = cat(2, sensitivityCurves, doublecones); 


case('VS Average bird')

%The color sone sensitivity curves are from Endler and Mielke 2005.

%The double cone sensitivities are not provided, blank matrix shown here.

%VSML sensitivity curves [401 x 5]

sensitivityCurves =[300 0 0 0 0

301 0 0 0 0

302 0 0 0 0

303 0 0 0 0

304 0 0 0 0

305 0 0 0 0

306 0 0 0 0

307 0 0 0 0

308 0 0 0 0

309 0 0 0 0

310 0 0 0 0

311 0 0 0 0

312 0 0 0 0

313 0 0 0 0

314 0 0 0 0

315 0 0 0 0

316 0.00002333 0 0 0

317 0.00014856 0 0 0

318 0.0002716 0 0 0

319 0.00039242 0 0 0

320 0.00051098 0 0 0

321 0.00062724 0 0 0

322 0.00074121 0 0 0

323 0.00085288 0 0 0

324 0.00096228 0 0 0

325 0.00106943 0 0 0

326 0.00117438 0 0 0

327 0.0012772 0 0 0

328 0.00137797 0 0 0

329 0.00147678 0 0 0

330 0.00157373 0 0 0

331 0.00166897 0 0 0

332 0.00176263 0 0 0

333 0.00185487 0 0 0

334 0.00194585 0 0 0

335 0.00203576 0 0 0

336 0.00212478 0 0 0

337 0.00221312 0 0 0

338 0.00230099 0 0 0

339 0.0023886 0 0 0

340 0.00247618 0 0 0

341 0.00256396 0 0 0

342 0.00265215 0 0 0

343 0.00274099 0 0 0

344 0.0028307 0 0 0

345 0.00292151 0 0 0

346 0.00301363 0 0 0

347 0.00310728 0 0 0

348 0.00320265 0 0 0

349 0.00329994 0 0 0

350 0.00339933 0 0 0

351 0.00350098 0 0 0

352 0.00360505 0 0 0

353 0.00371168 0 0 0

354 0.00382098 0 0 0

355 0.00393306 0 0 0

356 0.004048 0 0 0

357 0.00416586 0 0 0

358 0.00428668 0 0 0

359 0.0044105 0 0 0

360 0.00453732 0 0 0

361 0.00466712 0 0 0

362 0.00479986 0 0 0

363 0.00493549 0 0 0

364 0.00507393 0 0 0

365 0.0052151 0 0 0

366 0.00535888 0 0 0

367 0.00550514 0 0 0

368 0.00565375 0 0 0

369 0.00580454 0 0 0

370 0.00595735 0 0 0

371 0.00611198 0 0 0

372 0.00626826 0 0 0

373 0.00642596 0 0 0

374 0.00658488 0 0 0

375 0.0067448 0 0 0

376 0.00690548 0 0 0

377 0.0070667 0 0 0

378 0.00722822 0 0 0

379 0.0073898 0 0 0

380 0.00755118 0 0 0

381 0.00771214 0 0 0

382 0.00787242 0 0 0

383 0.00803177 0 0 0

384 0.00818996 0 0 0

385 0.00834673 0 0 0

386 0.00850185 0 0 0

387 0.00865507 0 0 0

388 0.00880616 0 0 0

389 0.00895487 0 0 0

390 0.00910099 0 0 0

391 0.00924426 0 0 0

392 0.00938447 0 0 0

393 0.00952139 0 0 0

394 0.00965479 0 0 0

395 0.00978445 0 0 0

396 0.00991016 0 0 0

397 0.01003168 0 0 0

398 0.01014881 0 0 0

399 0.01026133 0 0 0

400 0.01036903 0 0 0

401 0.01047168 0 0 0

402 0.01056909 0 0 0

403 0.01066103 0 0 0

404 0.0107473 0 0 0

405 0.01082768 0 0 0

406 0.01090196 0 0 0

407 0.01096993 0 0 0

408 0.0110314 0 0 0

409 0.01108614 0 0 0

410 0.01113395 0 0 0

411 0.01117462 0 0 0

412 0.01120797 0 0 0

413 0.01123378 0 0 0

414 0.01125187 0 0 0

415 0.01126205 0 0 0

416 0.01126413 0 0 0

417 0.01125794 0 0 0

418 0.01124331 0 0 0

419 0.01122009 0 0 0

420 0.01118812 0 0 0

421 0.01114728 0 0 0

422 0.01109745 0 0 0

423 0.01103851 0 0 0

424 0.01097038 0 0 0

425 0.010893 0 0 0

426 0.01080632 0 0 0

427 0.01071031 0 0 0

428 0.01060497 0.00000001 0 0

429 0.01049031 0.00000002 0 0

430 0.0103664 0.00000007 0 0

431 0.01023331 0.0000002 0 0

432 0.01009114 0.00000055 0 0

433 0.00994003 0.00000137 0 0

434 0.00978015 0.00000317 0 0

435 0.0096117 0.00000684 0 0

436 0.00943489 0.00001386 0 0

437 0.00925001 0.00002644 0 0

438 0.00905735 0.0000478 0 0

439 0.00885722 0.00008223 0 0

440 0.00865001 0.00013515 0 0

441 0.0084361 0.00021307 0 0

442 0.00821592 0.0003233 0 0

443 0.00798993 0.00047366 0 0

444 0.00775863 0.00067199 0 0

445 0.00752252 0.00092566 0 0

446 0.00728217 0.00124107 0 0

447 0.00703815 0.00162315 0 0

448 0.00679107 0.00207507 0 0

449 0.00654154 0.00259793 0 0

450 0.00629023 0.00319072 0 0

451 0.00603779 0.00385031 0 0

452 0.00578491 0.00457163 0 0

453 0.00553228 0.00534791 0 0

454 0.00528061 0.006171 0 0

455 0.0050306 0.00703175 0 0

456 0.00478294 0.00792031 0 0

457 0.00453834 0.00882655 0 0

458 0.00429747 0.00974034 0 0

459 0.00406099 0.01065185 0 0

460 0.00382953 0.01155176 0 0

461 0.00360369 0.01243144 0 0

462 0.00338402 0.0132831 0 0

463 0.00317104 0.01409984 0 0

464 0.00296519 0.0148757 0 0

465 0.0027669 0.0156057 0 0

466 0.00257648 0.01628575 0 0

467 0.00239423 0.01691267 0 0

468 0.00222035 0.01748412 0 0

469 0.002055 0.01799849 0 0

470 0.00189825 0.0184549 0 0

471 0.00175011 0.01885304 0 0

472 0.00161055 0.01919317 0 0

473 0.00147946 0.01947601 0 0

474 0.0013567 0.01970266 0 0

475 0.00124205 0.01987457 0 0

476 0.00113528 0.01999345 0 0

477 0.00103612 0.02006126 0 0

478 0.00094426 0.02008009 0 0

479 0.00085936 0.02005222 0 0

480 0.0007811 0.01997997 0 0

481 0.0007091 0.01986578 0 0

482 0.00064301 0.0197121 0 0

483 0.00058246 0.01952141 0 0

484 0.0005271 0.01929619 0 0

485 0.00047658 0.01903889 0 0

486 0.00043053 0.01875195 0 0

487 0.00038864 0.01843775 0 0

488 0.00035059 0.01809865 0 0

489 0.00031606 0.01773691 0.00000001 0

490 0.00028477 0.01735478 0.00000003 0

491 0.00025645 0.01695439 0.00000009 0

492 0.00023084 0.01653784 0.00000023 0

493 0.00020771 0.01610716 0.00000056 0

494 0.00018684 0.01566426 0.00000124 0

495 0.00016801 0.01521104 0.0000026 0

496 0.00015104 0.01474928 0.00000519 0

497 0.00013576 0.01428071 0.00000984 0

498 0.00012201 0.01380697 0.00001781 0

499 0.00010963 0.01332964 0.00003088 0

500 0.00009851 0.01285022 0.00005146 0

501 0.00008851 0.01237016 0.00008263 0

502 0.00007952 0.0118908 0.00012818 0

503 0.00007144 0.01141345 0.00019259 0

504 0.00006419 0.01093934 0.00028089 0

505 0.00005768 0.01046963 0.00039852 0

506 0.00005183 0.0100054 0.00055111 0

507 0.00004658 0.0095477 0.00074418 0

508 0.00004187 0.00909747 0.00098289 0

509 0.00003764 0.00865563 0.00127175 0

510 0.00003384 0.00822298 0.00161431 0

511 0.00003043 0.0078003 0.00201305 0

512 0.00002737 0.00738827 0.00246909 0

513 0.00002463 0.00698753 0.00298223 0

514 0.00002216 0.00659863 0.00355081 0

515 0.00001994 0.00622205 0.00417186 0

516 0.00001796 0.00585821 0.00484112 0

517 0.00001617 0.00550745 0.00555323 0

518 0.00001456 0.00517005 0.00630192 0

519 0.00001312 0.00484622 0.00708018 0

520 0.00001183 0.00453608 0.00788054 0

521 0.00001066 0.00423971 0.0086952 0

522 0.00000961 0.00395711 0.00951631 0

523 0.00000867 0.00368822 0.01033611 0

524 0.00000782 0.00343292 0.01114711 0

525 0.00000706 0.00319103 0.01194222 0

526 0.00000637 0.00296232 0.01271488 0

527 0.00000576 0.00274652 0.01345911 0

528 0.0000052 0.00254331 0.01416957 0

529 0.0000047 0.00235233 0.01484163 0

530 0.00000425 0.00217318 0.01547136 0

531 0.00000384 0.00200545 0.0160555 0

532 0.00000348 0.00184869 0.01659151 0

533 0.00000314 0.00170245 0.01707745 0

534 0.00000285 0.00156625 0.01751203 0

535 0.00000258 0.0014396 0.01789449 0

536 0.00000233 0.00132203 0.01822462 0

537 0.00000211 0.00121305 0.01850263 0

538 0.00000192 0.00111217 0.01872918 0

539 0.00000174 0.00101893 0.01890526 0

540 0.00000158 0.00093286 0.0190322 0

541 0.00000143 0.0008535 0.01911157 0.00000001

542 0.0000013 0.00078043 0.01914515 0.00000002

543 0.00000118 0.0007132 0.01913493 0.00000004

544 0.00000107 0.00065144 0.01908302 0.00000008

545 0.00000097 0.00059473 0.01899162 0.00000017

546 0.00000088 0.00054273 0.01886303 0.00000033

547 0.0000008 0.00049508 0.01869958 0.00000063

548 0.00000073 0.00045145 0.01850362 0.00000117

549 0.00000066 0.00041153 0.01827753 0.00000209

550 0.0000006 0.00037504 0.01802363 0.0000036

551 0.00000055 0.00034169 0.01774424 0.00000603

552 0.0000005 0.00031124 0.01744162 0.00000981

553 0.00000046 0.00028345 0.01711798 0.00001552

554 0.00000042 0.0002581 0.01677546 0.00002394

555 0.00000038 0.00023498 0.01641613 0.00003601

556 0.00000035 0.00021392 0.016042 0.00005295

557 0.00000032 0.00019472 0.01565496 0.00007617

558 0.00000029 0.00017724 0.01525686 0.00010734

559 0.00000026 0.00016132 0.01484944 0.00014834

560 0.00000024 0.00014682 0.01443436 0.00020127

561 0.00000022 0.00013363 0.0140132 0.00026838

562 0.0000002 0.00012163 0.01358743 0.00035204

563 0.00000018 0.00011071 0.01315848 0.00045467

564 0.00000017 0.00010078 0.01272765 0.00057866

565 0.00000015 0.00009174 0.01229621 0.00072633

566 0.00000014 0.00008352 0.01186531 0.00089982

567 0.00000013 0.00007605 0.01143605 0.00110103

568 0.00000012 0.00006925 0.01100944 0.00133154

569 0.00000011 0.00006307 0.01058644 0.00159258

570 0.0000001 0.00005745 0.01016792 0.00188493

571 0.00000009 0.00005233 0.0097547 0.00220896

572 0.00000008 0.00004768 0.00934753 0.00256453

573 0.00000008 0.00004345 0.0089471 0.00295103

574 0.00000007 0.0000396 0.00855405 0.00336737

575 0.00000006 0.0000361 0.00816894 0.00381201

576 0.00000006 0.00003292 0.0077923 0.00428298

577 0.00000005 0.00003002 0.0074246 0.00477792

578 0.00000005 0.00002738 0.00706625 0.00529413

579 0.00000004 0.00002498 0.0067176 0.00582864

580 0.00000004 0.00002279 0.00637898 0.00637823

581 0.00000004 0.0000208 0.00605065 0.00693953

582 0.00000003 0.00001899 0.00573283 0.00750905

583 0.00000003 0.00001734 0.00542569 0.00808324

584 0.00000003 0.00001584 0.00512937 0.00865856

585 0.00000003 0.00001447 0.00484394 0.00923149

586 0.00000002 0.00001322 0.00456947 0.00979864

587 0.00000002 0.00001209 0.00430594 0.01035673

588 0.00000002 0.00001105 0.00405333 0.01090263

589 0.00000002 0.0000101 0.00381158 0.01143344

590 0.00000002 0.00000924 0.00358057 0.01194645

591 0.00000002 0.00000845 0.00336019 0.01243919

592 0.00000002 0.00000774 0.00315025 0.01290943

593 0.00000001 0.00000708 0.00295058 0.0133552

594 0.00000001 0.00000648 0.00276095 0.01377477

595 0.00000001 0.00000594 0.00258112 0.0141667

596 0.00000001 0.00000544 0.00241085 0.01452977

597 0.00000001 0.00000498 0.00224984 0.014863

598 0.00000001 0.00000457 0.0020978 0.01516568

599 0.00000001 0.00000419 0.00195444 0.01543729

600 0.00000001 0.00000384 0.00181943 0.01567754

601 0.00000001 0.00000352 0.00169246 0.01588634

602 0.00000001 0.00000323 0.00157319 0.01606378

603 0.00000001 0.00000297 0.0014613 0.01621011

604 0.00000001 0.00000272 0.00135645 0.01632576

605 0.00000001 0.0000025 0.00125831 0.01641128

606 0 0.0000023 0.00116656 0.01646734

607 0 0.00000211 0.00108086 0.01649475

608 0 0.00000194 0.00100091 0.01649438

609 0 0.00000178 0.00092638 0.0164672

610 0 0.00000164 0.00085698 0.01641426

611 0 0.00000151 0.00079241 0.01633666

612 0 0.00000138 0.00073239 0.01623553

613 0 0.00000127 0.00067663 0.01611206

614 0 0.00000117 0.00062488 0.01596746

615 0 0.00000108 0.00057689 0.01580295

616 0 0.00000099 0.0005324 0.01561977

617 0 0.00000092 0.0004912 0.01541915

618 0 0.00000084 0.00045307 0.01520232

619 0 0.00000078 0.00041778 0.0149705

620 0 0.00000072 0.00038516 0.01472491

621 0 0.00000066 0.00035501 0.01446671

622 0 0.00000061 0.00032716 0.01419707

623 0 0.00000056 0.00030145 0.01391713

624 0 0.00000052 0.00027771 0.01362797

625 0 0.00000048 0.00025581 0.01333068

626 0 0.00000044 0.00023562 0.01302628

627 0 0.00000041 0.000217 0.01271576

628 0 0.00000038 0.00019983 0.01240009

629 0 0.00000035 0.00018402 0.01208019

630 0 0.00000032 0.00016945 0.01175694

631 0 0.0000003 0.00015603 0.01143117

632 0 0.00000027 0.00014367 0.0111037

633 0 0.00000025 0.00013229 0.01077529

634 0 0.00000023 0.00012181 0.01044666

635 0 0.00000022 0.00011216 0.0101185

636 0 0.0000002 0.00010329 0.00979146

637 0 0.00000019 0.00009512 0.00946617

638 0 0.00000017 0.0000876 0.00914318

639 0 0.00000016 0.00008068 0.00882305

640 0 0.00000015 0.00007431 0.0085063

641 0 0.00000014 0.00006845 0.00819338

642 0 0.00000013 0.00006306 0.00788475

643 0 0.00000012 0.0000581 0.00758081

644 0 0.00000011 0.00005354 0.00728194

645 0 0.0000001 0.00004934 0.0069885

646 0 0.00000009 0.00004547 0.0067008

647 0 0.00000009 0.00004192 0.00641913

648 0 0.00000008 0.00003864 0.00614375

649 0 0.00000007 0.00003563 0.00587489

650 0 0.00000007 0.00003286 0.00561276

651 0 0.00000006 0.00003031 0.00535754

652 0 0.00000006 0.00002796 0.00510938

653 0 0.00000006 0.00002579 0.00486841

654 0 0.00000005 0.0000238 0.00463472

655 0 0.00000005 0.00002196 0.00440841

656 0 0.00000004 0.00002027 0.00418951

657 0 0.00000004 0.00001872 0.00397807

658 0 0.00000004 0.00001728 0.0037741

659 0 0.00000004 0.00001596 0.00357757

660 0 0.00000003 0.00001474 0.00338847

661 0 0.00000003 0.00001362 0.00320673

662 0 0.00000003 0.00001259 0.0030323

663 0 0.00000003 0.00001163 0.00286508

664 0 0.00000003 0.00001075 0.00270498

665 0 0.00000002 0.00000994 0.00255186

666 0 0.00000002 0.00000919 0.00240562

667 0 0.00000002 0.0000085 0.00226609

668 0 0.00000002 0.00000787 0.00213312

669 0 0.00000002 0.00000728 0.00200656

670 0 0.00000002 0.00000674 0.00188623

671 0 0.00000002 0.00000623 0.00177193

672 0 0.00000001 0.00000577 0.0016635

673 0 0.00000001 0.00000534 0.00156073

674 0 0.00000001 0.00000495 0.00146343

675 0 0.00000001 0.00000459 0.00137141

676 0 0.00000001 0.00000425 0.00128444

677 0 0.00000001 0.00000394 0.00120235

678 0 0.00000001 0.00000365 0.00112492

679 0 0.00000001 0.00000338 0.00105196

680 0 0.00000001 0.00000314 0.00098326

681 0 0.00000001 0.00000291 0.00091863

682 0 0.00000001 0.0000027 0.00085788

683 0 0.00000001 0.00000251 0.00080082

684 0 0.00000001 0.00000232 0.00074726

685 0 0.00000001 0.00000216 0.00069703

686 0 0.00000001 0.000002 0.00064994

687 0 0.00000001 0.00000186 0.00060584

688 0 0 0.00000173 0.00056456

689 0 0 0.00000161 0.00052594

690 0 0 0.00000149 0.00048982

691 0 0 0.00000139 0.00045608

692 0 0 0.00000129 0.00042455

693 0 0 0.0000012 0.00039513

694 0 0 0.00000111 0.00036766

695 0 0 0.00000104 0.00034205

696 0 0 0.00000096 0.00031817

697 0 0 0.0000009 0.0002959

698 0 0 0.00000084 0.00027516

699 0 0 0.00000078 0.00025585

700 0 0 0.00000072 0.00023786];


sensitivityCurves = cat(2, sensitivityCurves, BlankDoubleCones); 


case ('VS Peafowl')

%The color cone sensitivity curves are derived from data provided by Nathan Hart. 

%The double cone sensitivities are derived from data provided by Martin Stevens.

sensitivityCurves =[

300 1.98E-08 0.00E+00 1.38E-11 6.63E-13

301 2.64E-08 0.00E+00 1.84E-11 8.83E-13

302 3.34E-08 0.00E+00 2.33E-11 1.12E-12

303 4.42E-08 0.00E+00 3.10E-11 1.49E-12

304 6.17E-08 0.00E+00 4.33E-11 2.08E-12

305 8.43E-08 0.00E+00 5.94E-11 2.85E-12

306 1.13E-07 0.00E+00 7.98E-11 3.83E-12

307 1.56E-07 0.00E+00 1.11E-10 5.31E-12

308 2.28E-07 0.00E+00 1.63E-10 7.82E-12

309 3.30E-07 0.00E+00 2.36E-10 1.13E-11

310 4.73E-07 0.00E+00 3.40E-10 1.63E-11

311 6.68E-07 0.00E+00 4.84E-10 2.33E-11

312 9.41E-07 0.00E+00 6.85E-10 3.30E-11

313 1.33E-06 0.00E+00 9.75E-10 4.70E-11

314 1.80E-06 0.00E+00 1.32E-09 6.39E-11

315 2.46E-06 0.00E+00 1.82E-09 8.81E-11

316 3.34E-06 0.00E+00 2.49E-09 1.21E-10

317 4.20E-06 0.00E+00 3.15E-09 1.53E-10

318 4.85E-06 0.00E+00 3.66E-09 1.78E-10

319 5.36E-06 0.00E+00 4.07E-09 1.99E-10

320 5.95E-06 0.00E+00 4.55E-09 2.23E-10

321 6.89E-06 0.00E+00 5.31E-09 2.60E-10

322 8.39E-06 0.00E+00 6.51E-09 3.20E-10

323 1.03E-05 0.00E+00 8.02E-09 3.95E-10

324 1.22E-05 0.00E+00 9.58E-09 4.74E-10

325 1.37E-05 0.00E+00 1.09E-08 5.40E-10

326 1.53E-05 0.00E+00 1.22E-08 6.08E-10

327 1.71E-05 0.00E+00 1.38E-08 6.87E-10

328 2.04E-05 0.00E+00 1.65E-08 8.28E-10

329 2.62E-05 0.00E+00 2.13E-08 1.07E-09

330 3.43E-05 0.00E+00 2.81E-08 1.42E-09

331 4.48E-05 0.00E+00 3.69E-08 1.87E-09

332 5.71E-05 0.00E+00 4.74E-08 2.41E-09

333 7.20E-05 0.00E+00 6.00E-08 3.07E-09

334 9.08E-05 0.00E+00 7.60E-08 3.91E-09

335 1.17E-04 0.00E+00 9.82E-08 5.07E-09

336 1.56E-04 0.00E+00 1.32E-07 6.85E-09

337 2.05E-04 0.00E+00 1.74E-07 9.09E-09

338 2.61E-04 0.00E+00 2.22E-07 1.17E-08

339 3.31E-04 0.00E+00 2.82E-07 1.49E-08

340 4.12E-04 0.00E+00 3.52E-07 1.87E-08

341 5.05E-04 0.00E+00 4.33E-07 2.31E-08

342 6.10E-04 0.00E+00 5.23E-07 2.80E-08

343 7.24E-04 0.00E+00 6.21E-07 3.35E-08

344 8.49E-04 0.00E+00 7.27E-07 3.94E-08

345 9.84E-04 0.00E+00 8.41E-07 4.59E-08

346 1.13E-03 0.00E+00 9.60E-07 5.27E-08

347 1.27E-03 0.00E+00 1.08E-06 5.97E-08

348 1.42E-03 0.00E+00 1.20E-06 6.68E-08

349 1.57E-03 0.00E+00 1.32E-06 7.38E-08

350 1.71E-03 0.00E+00 1.43E-06 8.06E-08

351 1.85E-03 0.00E+00 1.54E-06 8.71E-08

352 1.99E-03 0.00E+00 1.64E-06 9.33E-08

353 2.12E-03 0.00E+00 1.73E-06 9.91E-08

354 2.25E-03 0.00E+00 1.81E-06 1.05E-07

355 2.37E-03 0.00E+00 1.89E-06 1.10E-07

356 2.50E-03 0.00E+00 1.96E-06 1.15E-07

357 2.61E-03 0.00E+00 2.03E-06 1.19E-07

358 2.72E-03 0.00E+00 2.08E-06 1.24E-07

359 2.84E-03 0.00E+00 2.13E-06 1.28E-07

360 2.95E-03 0.00E+00 2.18E-06 1.31E-07

361 3.07E-03 0.00E+00 2.23E-06 1.35E-07

362 3.18E-03 0.00E+00 2.27E-06 1.38E-07

363 3.29E-03 0.00E+00 2.30E-06 1.42E-07

364 3.42E-03 0.00E+00 2.34E-06 1.45E-07

365 3.55E-03 0.00E+00 2.38E-06 1.48E-07

366 3.67E-03 0.00E+00 2.41E-06 1.51E-07

367 3.79E-03 0.00E+00 2.43E-06 1.54E-07

368 3.92E-03 0.00E+00 2.46E-06 1.56E-07

369 4.05E-03 0.00E+00 2.48E-06 1.59E-07

370 4.19E-03 0.00E+00 2.50E-06 1.61E-07

371 4.33E-03 0.00E+00 2.52E-06 1.64E-07

372 4.48E-03 0.00E+00 2.54E-06 1.66E-07

373 4.63E-03 0.00E+00 2.56E-06 1.69E-07

374 4.79E-03 0.00E+00 2.58E-06 1.71E-07

375 4.95E-03 0.00E+00 2.60E-06 1.73E-07

376 5.10E-03 0.00E+00 2.61E-06 1.75E-07

377 5.26E-03 0.00E+00 2.62E-06 1.76E-07

378 5.43E-03 0.00E+00 2.64E-06 1.78E-07

379 5.60E-03 0.00E+00 2.65E-06 1.80E-07

380 5.77E-03 0.00E+00 2.66E-06 1.81E-07

381 5.94E-03 0.00E+00 2.67E-06 1.82E-07

382 6.11E-03 0.00E+00 2.67E-06 1.83E-07

383 6.27E-03 0.00E+00 2.68E-06 1.84E-07

384 6.44E-03 0.00E+00 2.68E-06 1.85E-07

385 6.61E-03 0.00E+00 2.69E-06 1.86E-07

386 6.78E-03 0.00E+00 2.69E-06 1.86E-07

387 6.94E-03 0.00E+00 2.69E-06 1.86E-07

388 7.11E-03 0.00E+00 2.70E-06 1.86E-07

389 7.27E-03 0.00E+00 2.70E-06 1.86E-07

390 7.43E-03 0.00E+00 2.70E-06 1.86E-07

391 7.58E-03 0.00E+00 2.70E-06 1.86E-07

392 7.73E-03 0.00E+00 2.70E-06 1.85E-07

393 7.87E-03 0.00E+00 2.70E-06 1.85E-07

394 8.02E-03 0.00E+00 2.70E-06 1.84E-07

395 8.16E-03 0.00E+00 2.71E-06 1.83E-07

396 8.30E-03 0.00E+00 2.71E-06 1.82E-07

397 8.43E-03 0.00E+00 2.71E-06 1.81E-07

398 8.56E-03 0.00E+00 2.72E-06 1.80E-07

399 8.68E-03 0.00E+00 2.72E-06 1.78E-07

400 8.80E-03 0.00E+00 2.73E-06 1.77E-07

401 8.91E-03 0.00E+00 2.74E-06 1.76E-07

402 9.02E-03 0.00E+00 2.75E-06 1.74E-07

403 9.12E-03 0.00E+00 2.76E-06 1.72E-07

404 9.21E-03 0.00E+00 2.78E-06 1.71E-07

405 9.30E-03 0.00E+00 2.79E-06 1.69E-07

406 9.39E-03 0.00E+00 2.81E-06 1.67E-07

407 9.47E-03 0.00E+00 2.83E-06 1.65E-07

408 9.55E-03 0.00E+00 2.86E-06 1.63E-07

409 9.63E-03 0.00E+00 2.89E-06 1.62E-07

410 9.70E-03 0.00E+00 2.92E-06 1.60E-07

411 9.78E-03 0.00E+00 2.95E-06 1.58E-07

412 9.85E-03 0.00E+00 2.99E-06 1.57E-07

413 9.92E-03 0.00E+00 3.03E-06 1.55E-07

414 1.00E-02 0.00E+00 3.08E-06 1.54E-07

415 1.01E-02 0.00E+00 3.13E-06 1.52E-07

416 1.01E-02 0.00E+00 3.19E-06 1.51E-07

417 1.02E-02 0.00E+00 3.25E-06 1.50E-07

418 1.03E-02 0.00E+00 3.32E-06 1.49E-07

419 1.04E-02 0.00E+00 3.39E-06 1.48E-07

420 1.04E-02 0.00E+00 3.47E-06 1.47E-07

421 1.05E-02 0.00E+00 3.55E-06 1.46E-07

422 1.06E-02 0.00E+00 3.64E-06 1.45E-07

423 1.07E-02 0.00E+00 3.74E-06 1.45E-07

424 1.07E-02 0.00E+00 3.83E-06 1.44E-07

425 1.08E-02 0.00E+00 3.94E-06 1.44E-07

426 1.08E-02 0.00E+00 4.05E-06 1.43E-07

427 1.09E-02 0.00E+00 4.16E-06 1.43E-07

428 1.10E-02 2.76E-06 4.28E-06 1.43E-07

429 1.10E-02 5.59E-06 4.40E-06 1.42E-07

430 1.10E-02 1.04E-05 4.52E-06 1.42E-07

431 1.10E-02 1.76E-05 4.65E-06 1.42E-07

432 1.11E-02 3.05E-05 4.78E-06 1.42E-07

433 1.11E-02 4.68E-05 4.92E-06 1.42E-07

434 1.10E-02 6.63E-05 5.05E-06 1.42E-07

435 1.10E-02 9.33E-05 5.19E-06 1.42E-07

436 1.10E-02 1.25E-04 5.33E-06 1.42E-07

437 1.09E-02 1.70E-04 5.48E-06 1.42E-07

438 1.09E-02 2.16E-04 5.62E-06 1.42E-07

439 1.08E-02 2.84E-04 5.76E-06 1.42E-07

440 1.07E-02 3.56E-04 5.91E-06 1.43E-07

441 1.07E-02 4.57E-04 6.06E-06 1.43E-07

442 1.06E-02 5.60E-04 6.22E-06 1.44E-07

443 1.04E-02 7.04E-04 6.37E-06 1.45E-07

444 1.03E-02 8.52E-04 6.52E-06 1.45E-07

445 1.02E-02 1.06E-03 6.68E-06 1.46E-07

446 1.01E-02 1.27E-03 6.84E-06 1.47E-07

447 9.92E-03 1.55E-03 6.99E-06 1.48E-07

448 9.76E-03 1.84E-03 7.15E-06 1.50E-07

449 9.60E-03 2.22E-03 7.32E-06 1.51E-07

450 9.43E-03 2.60E-03 7.48E-06 1.53E-07

451 9.26E-03 3.09E-03 7.64E-06 1.55E-07

452 9.07E-03 3.57E-03 7.80E-06 1.56E-07

453 8.88E-03 4.19E-03 7.97E-06 1.59E-07

454 8.67E-03 4.77E-03 8.13E-06 1.61E-07

455 8.46E-03 5.50E-03 8.29E-06 1.63E-07

456 8.25E-03 6.18E-03 8.45E-06 1.65E-07

457 8.04E-03 7.02E-03 8.61E-06 1.68E-07

458 7.81E-03 7.78E-03 8.77E-06 1.71E-07

459 7.59E-03 8.69E-03 8.94E-06 1.74E-07

460 7.36E-03 9.49E-03 9.10E-06 1.77E-07

461 7.13E-03 1.04E-02 9.26E-06 1.80E-07

462 6.89E-03 1.12E-02 9.42E-06 1.84E-07

463 6.65E-03 1.22E-02 9.58E-06 1.88E-07

464 6.41E-03 1.29E-02 9.73E-06 1.91E-07

465 6.17E-03 1.38E-02 9.89E-06 1.95E-07

466 5.93E-03 1.45E-02 1.01E-05 2.00E-07

467 5.69E-03 1.52E-02 1.02E-05 2.04E-07

468 5.45E-03 1.58E-02 1.04E-05 2.09E-07

469 5.22E-03 1.65E-02 1.05E-05 2.14E-07

470 4.98E-03 1.69E-02 1.07E-05 2.19E-07

471 4.75E-03 1.74E-02 1.08E-05 2.24E-07

472 4.51E-03 1.78E-02 1.10E-05 2.29E-07

473 4.29E-03 1.81E-02 1.11E-05 2.34E-07

474 4.06E-03 1.83E-02 1.12E-05 2.40E-07

475 3.84E-03 1.86E-02 1.14E-05 2.46E-07

476 3.63E-03 1.87E-02 1.15E-05 2.52E-07

477 3.42E-03 1.88E-02 1.16E-05 2.58E-07

478 3.21E-03 1.88E-02 1.18E-05 2.64E-07

479 3.02E-03 1.88E-02 1.19E-05 2.70E-07

480 2.83E-03 1.87E-02 1.20E-05 2.77E-07

481 2.64E-03 1.87E-02 1.21E-05 2.84E-07

482 2.47E-03 1.86E-02 1.22E-05 2.91E-07

483 2.30E-03 1.84E-02 1.24E-05 2.97E-07

484 2.14E-03 1.83E-02 1.25E-05 3.05E-07

485 1.99E-03 1.81E-02 1.26E-05 3.12E-07

486 1.84E-03 1.79E-02 1.27E-05 3.19E-07

487 1.70E-03 1.76E-02 8.95E-06 3.27E-07

488 1.57E-03 1.74E-02 6.65E-06 3.35E-07

489 1.45E-03 1.71E-02 2.53E-06 3.42E-07

490 1.34E-03 1.69E-02 2.16E-06 3.50E-07

491 1.23E-03 1.66E-02 0.00E+00 3.58E-07

492 1.13E-03 1.63E-02 4.13E-08 3.67E-07

493 1.03E-03 1.60E-02 1.72E-07 3.75E-07

494 9.48E-04 1.56E-02 3.95E-06 3.84E-07

495 8.67E-04 1.53E-02 8.25E-06 3.92E-07

496 7.92E-04 1.50E-02 1.60E-05 4.01E-07

497 7.23E-04 1.46E-02 2.97E-05 4.10E-07

498 6.59E-04 1.43E-02 4.65E-05 4.19E-07

499 6.00E-04 1.39E-02 7.58E-05 4.28E-07

500 5.46E-04 1.35E-02 1.09E-04 4.37E-07

501 4.97E-04 1.32E-02 1.63E-04 4.46E-07

502 4.52E-04 1.28E-02 2.21E-04 4.56E-07

503 4.10E-04 1.24E-02 3.16E-04 4.65E-07

504 3.72E-04 1.20E-02 4.13E-04 4.74E-07

505 3.37E-04 1.16E-02 5.66E-04 4.83E-07

506 3.05E-04 1.12E-02 7.21E-04 4.92E-07

507 2.76E-04 1.08E-02 9.57E-04 5.02E-07

508 2.50E-04 1.04E-02 1.19E-03 5.11E-07

509 2.26E-04 1.00E-02 1.53E-03 5.21E-07

510 2.05E-04 9.62E-03 1.87E-03 5.30E-07

511 1.85E-04 9.23E-03 2.34E-03 5.40E-07

512 1.67E-04 8.85E-03 2.79E-03 5.49E-07

513 1.51E-04 8.47E-03 3.41E-03 5.58E-07

514 1.36E-04 8.09E-03 3.99E-03 5.68E-07

515 1.23E-04 7.72E-03 4.75E-03 5.77E-07

516 1.11E-04 7.36E-03 5.46E-03 5.86E-07

517 1.00E-04 7.00E-03 6.36E-03 5.95E-07

518 9.05E-05 6.65E-03 7.17E-03 6.04E-07

519 8.16E-05 6.30E-03 8.16E-03 6.12E-07

520 7.36E-05 5.97E-03 9.04E-03 6.21E-07

521 6.65E-05 5.65E-03 1.01E-02 6.30E-07

522 6.00E-05 5.34E-03 1.10E-02 6.38E-07

523 5.41E-05 5.03E-03 1.20E-02 6.47E-07

524 4.89E-05 4.74E-03 1.29E-02 6.55E-07

525 4.41E-05 4.46E-03 1.39E-02 6.63E-07

526 3.97E-05 4.18E-03 1.46E-02 6.71E-07

527 3.58E-05 3.91E-03 1.55E-02 6.78E-07

528 3.23E-05 3.66E-03 1.62E-02 6.86E-07

529 2.92E-05 3.43E-03 1.69E-02 6.94E-07

530 2.64E-05 3.20E-03 1.74E-02 7.01E-07

531 2.38E-05 2.99E-03 1.80E-02 7.09E-07

532 2.15E-05 2.78E-03 1.84E-02 7.16E-07

533 1.94E-05 2.59E-03 1.88E-02 7.23E-07

534 1.76E-05 2.40E-03 1.91E-02 7.30E-07

535 1.59E-05 2.23E-03 1.93E-02 7.36E-07

536 1.43E-05 2.07E-03 1.95E-02 7.43E-07

537 1.30E-05 1.92E-03 1.96E-02 7.51E-07

538 1.18E-05 1.77E-03 1.97E-02 7.59E-07

539 1.07E-05 1.64E-03 1.97E-02 7.66E-07

540 9.66E-06 1.51E-03 1.96E-02 7.72E-07

541 8.75E-06 1.40E-03 1.95E-02 7.79E-07

542 7.93E-06 1.29E-03 1.94E-02 7.85E-07

543 7.19E-06 1.19E-03 1.92E-02 7.91E-07

544 6.52E-06 1.09E-03 1.90E-02 2.77E-07

545 5.91E-06 1.00E-03 1.88E-02 0.00E+00

546 5.36E-06 9.21E-04 1.85E-02 3.68E-08

547 4.86E-06 8.45E-04 1.82E-02 1.22E-06

548 4.42E-06 7.76E-04 1.79E-02 2.32E-06

549 4.01E-06 7.11E-04 1.76E-02 5.14E-06

550 3.64E-06 6.52E-04 1.73E-02 7.74E-06

551 3.31E-06 5.96E-04 1.69E-02 1.34E-05

552 3.00E-06 5.46E-04 1.65E-02 1.95E-05

553 2.73E-06 4.99E-04 1.61E-02 2.99E-05

554 2.48E-06 4.56E-04 1.57E-02 4.20E-05

555 2.26E-06 4.17E-04 1.53E-02 6.12E-05

556 2.06E-06 3.81E-04 1.49E-02 8.10E-05

557 1.87E-06 3.48E-04 1.45E-02 1.13E-04

558 1.70E-06 3.18E-04 1.41E-02 1.47E-04

559 1.55E-06 2.90E-04 1.37E-02 1.97E-04

560 1.41E-06 2.65E-04 1.33E-02 2.49E-04

561 1.29E-06 2.41E-04 1.29E-02 3.25E-04

562 1.17E-06 2.20E-04 1.24E-02 4.03E-04

563 1.07E-06 2.01E-04 1.20E-02 5.12E-04

564 9.77E-07 1.83E-04 1.16E-02 6.21E-04

565 8.91E-07 1.67E-04 1.12E-02 7.72E-04

566 8.13E-07 1.52E-04 1.08E-02 9.21E-04

567 7.42E-07 1.39E-04 1.04E-02 1.12E-03

568 6.77E-07 1.27E-04 9.98E-03 1.32E-03

569 6.18E-07 1.15E-04 9.58E-03 1.58E-03

570 5.64E-07 1.05E-04 9.19E-03 1.83E-03

571 5.16E-07 9.59E-05 8.81E-03 2.15E-03

572 4.71E-07 8.74E-05 8.43E-03 2.45E-03

573 4.31E-07 7.97E-05 8.06E-03 2.84E-03

574 3.94E-07 7.26E-05 7.70E-03 3.20E-03

575 3.60E-07 6.62E-05 7.35E-03 3.66E-03

576 3.30E-07 6.04E-05 7.01E-03 4.08E-03

577 3.02E-07 5.51E-05 6.67E-03 4.60E-03

578 2.77E-07 5.02E-05 6.35E-03 5.08E-03

579 2.53E-07 4.58E-05 6.04E-03 5.65E-03

580 2.32E-07 4.19E-05 5.74E-03 6.17E-03

581 2.13E-07 3.82E-05 5.45E-03 6.78E-03

582 1.95E-07 3.49E-05 5.16E-03 7.34E-03

583 1.79E-07 3.19E-05 4.89E-03 7.97E-03

584 1.65E-07 2.91E-05 4.62E-03 8.54E-03

585 1.51E-07 2.66E-05 4.37E-03 9.19E-03

586 1.39E-07 2.43E-05 4.12E-03 9.75E-03

587 1.28E-07 2.22E-05 3.89E-03 1.04E-02

588 1.17E-07 2.03E-05 3.66E-03 1.09E-02

589 1.08E-07 1.86E-05 3.45E-03 1.15E-02

590 9.91E-08 1.70E-05 3.24E-03 1.20E-02

591 9.11E-08 1.56E-05 3.04E-03 1.26E-02

592 8.38E-08 1.42E-05 2.85E-03 1.30E-02

593 7.71E-08 1.30E-05 2.68E-03 1.35E-02

594 7.10E-08 1.19E-05 2.51E-03 1.40E-02

595 6.54E-08 1.09E-05 2.35E-03 1.44E-02

596 6.02E-08 1.00E-05 2.19E-03 1.47E-02

597 5.55E-08 9.16E-06 2.05E-03 1.51E-02

598 5.11E-08 8.39E-06 1.91E-03 1.54E-02

599 4.71E-08 7.69E-06 1.78E-03 1.56E-02

600 4.34E-08 7.05E-06 1.66E-03 1.58E-02

601 4.00E-08 6.46E-06 1.54E-03 1.60E-02

602 3.69E-08 5.92E-06 1.43E-03 1.62E-02

603 3.40E-08 5.43E-06 1.33E-03 1.63E-02

604 3.14E-08 4.98E-06 1.24E-03 1.64E-02

605 2.89E-08 4.57E-06 1.15E-03 1.65E-02

606 2.67E-08 4.19E-06 1.06E-03 1.65E-02

607 2.47E-08 3.85E-06 9.86E-04 1.65E-02

608 2.28E-08 3.53E-06 9.13E-04 1.64E-02

609 2.10E-08 3.24E-06 8.46E-04 1.64E-02

610 1.94E-08 2.98E-06 7.82E-04 1.63E-02

611 1.80E-08 2.74E-06 7.24E-04 1.62E-02

612 1.66E-08 2.52E-06 6.69E-04 1.61E-02

613 1.54E-08 2.31E-06 6.18E-04 1.60E-02

614 1.42E-08 2.13E-06 5.71E-04 1.58E-02

615 1.31E-08 1.96E-06 5.27E-04 1.56E-02

616 1.22E-08 1.80E-06 4.87E-04 1.54E-02

617 1.13E-08 1.66E-06 4.49E-04 1.52E-02

618 1.04E-08 1.52E-06 4.14E-04 1.50E-02

619 9.64E-09 1.40E-06 3.82E-04 1.47E-02

620 8.93E-09 1.29E-06 3.52E-04 1.45E-02

621 8.27E-09 1.19E-06 3.25E-04 1.42E-02

622 7.67E-09 1.10E-06 2.99E-04 1.39E-02

623 7.11E-09 1.01E-06 2.76E-04 1.37E-02

624 6.59E-09 9.30E-07 2.54E-04 1.34E-02

625 6.11E-09 8.58E-07 2.34E-04 1.31E-02

626 5.67E-09 7.91E-07 2.16E-04 1.28E-02

627 5.26E-09 7.30E-07 1.99E-04 1.25E-02

628 4.88E-09 6.74E-07 1.83E-04 1.22E-02

629 4.53E-09 6.22E-07 1.68E-04 1.19E-02

630 4.21E-09 5.74E-07 1.55E-04 1.16E-02

631 3.91E-09 5.30E-07 1.43E-04 1.13E-02

632 3.63E-09 4.90E-07 1.32E-04 1.10E-02

633 3.38E-09 4.52E-07 1.21E-04 1.06E-02

634 3.14E-09 4.18E-07 1.12E-04 1.03E-02

635 2.92E-09 3.86E-07 1.03E-04 1.00E-02

636 2.71E-09 3.57E-07 9.47E-05 9.71E-03

637 2.52E-09 3.30E-07 8.72E-05 9.40E-03

638 2.35E-09 3.05E-07 8.03E-05 9.08E-03

639 2.18E-09 2.83E-07 7.40E-05 8.78E-03

640 2.03E-09 2.61E-07 6.81E-05 8.48E-03

641 1.89E-09 2.42E-07 6.28E-05 8.18E-03

642 1.76E-09 2.24E-07 5.79E-05 7.88E-03

643 1.64E-09 2.07E-07 5.33E-05 7.59E-03

644 1.53E-09 1.92E-07 4.91E-05 7.30E-03

645 1.42E-09 1.78E-07 4.52E-05 7.02E-03

646 1.33E-09 1.65E-07 4.17E-05 6.75E-03

647 1.24E-09 1.53E-07 3.84E-05 6.47E-03

648 1.15E-09 1.41E-07 3.54E-05 6.21E-03

649 1.07E-09 1.31E-07 3.27E-05 5.95E-03

650 1.00E-09 1.22E-07 3.01E-05 5.70E-03

651 9.34E-10 1.13E-07 2.78E-05 5.45E-03

652 8.72E-10 1.05E-07 2.56E-05 5.21E-03

653 8.13E-10 9.72E-08 2.37E-05 4.97E-03

654 7.59E-10 9.03E-08 2.18E-05 4.74E-03

655 7.09E-10 8.38E-08 2.01E-05 4.52E-03

656 6.62E-10 7.79E-08 1.86E-05 4.31E-03

657 6.19E-10 7.24E-08 1.72E-05 4.10E-03

658 5.78E-10 6.72E-08 1.59E-05 3.90E-03

659 5.40E-10 6.25E-08 1.47E-05 3.71E-03

660 5.05E-10 5.81E-08 1.35E-05 3.52E-03

661 4.72E-10 5.40E-08 1.25E-05 3.34E-03

662 4.41E-10 5.03E-08 1.16E-05 3.17E-03

663 4.13E-10 4.67E-08 1.07E-05 3.00E-03

664 3.86E-10 4.35E-08 9.87E-06 2.83E-03

665 3.61E-10 4.04E-08 9.12E-06 2.68E-03

666 3.37E-10 3.76E-08 8.43E-06 2.53E-03

667 3.16E-10 3.50E-08 7.79E-06 2.39E-03

668 2.96E-10 3.26E-08 7.21E-06 2.25E-03

669 2.77E-10 3.04E-08 6.68E-06 2.13E-03

670 2.59E-10 2.83E-08 6.18E-06 2.00E-03

671 2.43E-10 2.64E-08 5.72E-06 1.89E-03

672 2.28E-10 2.46E-08 5.30E-06 1.77E-03

673 2.13E-10 2.29E-08 4.91E-06 1.67E-03

674 2.00E-10 2.14E-08 4.55E-06 1.57E-03

675 1.88E-10 1.99E-08 4.21E-06 1.47E-03

676 1.76E-10 1.86E-08 3.91E-06 1.38E-03

677 1.65E-10 1.73E-08 3.62E-06 1.30E-03

678 1.55E-10 1.62E-08 3.35E-06 1.21E-03

679 1.45E-10 1.51E-08 3.11E-06 1.14E-03

680 1.36E-10 1.41E-08 2.88E-06 1.06E-03

681 1.28E-10 1.31E-08 2.67E-06 9.95E-04

682 1.20E-10 1.23E-08 2.47E-06 9.30E-04

683 1.12E-10 1.14E-08 2.29E-06 8.69E-04

684 1.05E-10 1.07E-08 2.13E-06 8.12E-04

685 9.89E-11 9.99E-09 1.98E-06 7.58E-04

686 9.29E-11 9.33E-09 1.83E-06 7.08E-04

687 8.73E-11 8.72E-09 1.70E-06 6.61E-04

688 8.20E-11 8.16E-09 1.58E-06 6.17E-04

689 7.71E-11 7.63E-09 1.47E-06 5.75E-04

690 7.24E-11 7.13E-09 1.37E-06 5.36E-04

691 6.81E-11 6.67E-09 1.27E-06 4.99E-04

692 6.40E-11 6.23E-09 1.18E-06 4.65E-04

693 6.01E-11 5.83E-09 1.09E-06 4.33E-04

694 5.66E-11 5.46E-09 1.02E-06 4.04E-04

695 5.32E-11 5.11E-09 9.46E-07 3.76E-04

696 5.00E-11 4.78E-09 8.80E-07 3.50E-04

697 4.70E-11 4.47E-09 8.18E-07 3.25E-04

698 4.42E-11 4.18E-09 7.61E-07 3.02E-04

699 4.16E-11 3.92E-09 7.08E-07 2.81E-04

700 3.92E-11 3.67E-09 6.59E-07 2.61E-04

];


doublecones = [0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

0.00E+00

1.19E-06

2.31E-05

4.54E-05

6.81E-05

9.13E-05

1.15E-04

1.39E-04

1.64E-04

1.90E-04

2.17E-04

2.44E-04

2.72E-04

3.02E-04

3.32E-04

3.64E-04

3.97E-04

4.31E-04

4.67E-04

5.04E-04

5.43E-04

5.84E-04

6.26E-04

6.70E-04

7.17E-04

7.65E-04

8.15E-04

8.68E-04

9.22E-04

9.79E-04

1.04E-03

1.10E-03

1.16E-03

1.23E-03

1.30E-03

1.37E-03

1.45E-03

1.52E-03

1.60E-03

1.69E-03

1.77E-03

1.86E-03

1.95E-03

2.05E-03

2.14E-03

2.25E-03

2.35E-03

2.46E-03

2.57E-03

2.68E-03

2.80E-03

2.92E-03

3.05E-03

3.18E-03

3.31E-03

3.44E-03

3.58E-03

3.72E-03

3.87E-03

4.02E-03

4.16E-03

4.32E-03

4.47E-03

4.63E-03

4.78E-03

4.93E-03

5.08E-03

5.24E-03

5.38E-03

5.53E-03

5.67E-03

5.82E-03

5.95E-03

6.09E-03

6.21E-03

6.34E-03

6.46E-03

6.58E-03

6.70E-03

6.82E-03

6.93E-03

7.04E-03

7.13E-03

7.23E-03

7.32E-03

7.43E-03

7.52E-03

7.61E-03

7.70E-03

7.78E-03

7.87E-03

7.95E-03

8.03E-03

8.12E-03

8.21E-03

8.29E-03

8.36E-03

8.44E-03

8.51E-03

8.58E-03

8.65E-03

8.71E-03

8.77E-03

8.84E-03

8.89E-03

8.96E-03

9.01E-03

9.05E-03

9.10E-03

9.15E-03

9.19E-03

9.24E-03

9.28E-03

9.32E-03

9.35E-03

9.38E-03

9.41E-03

9.43E-03

9.46E-03

9.48E-03

9.49E-03

9.50E-03

9.50E-03

9.50E-03

9.50E-03

9.49E-03

9.47E-03

9.46E-03

9.44E-03

9.42E-03

9.40E-03

9.37E-03

9.33E-03

9.30E-03

9.26E-03

9.22E-03

9.17E-03

9.12E-03

9.07E-03

9.01E-03

8.94E-03

8.87E-03

8.79E-03

8.71E-03

8.62E-03

8.53E-03

8.43E-03

8.32E-03

8.20E-03

8.08E-03

7.95E-03

7.82E-03

7.68E-03

7.54E-03

7.39E-03

7.23E-03

7.06E-03

6.89E-03

6.72E-03

6.54E-03

6.35E-03

6.16E-03

5.96E-03

5.76E-03

5.56E-03

5.36E-03

5.16E-03

4.96E-03

4.75E-03

4.55E-03

4.34E-03

4.14E-03

3.94E-03

3.74E-03

3.55E-03

3.36E-03

3.17E-03

2.99E-03

2.82E-03

2.65E-03

2.49E-03

2.34E-03

2.19E-03

2.05E-03

1.91E-03

1.78E-03

1.66E-03

1.54E-03

1.43E-03

1.33E-03

1.23E-03

1.14E-03

1.06E-03

9.77E-04

9.02E-04

8.33E-04

7.68E-04

7.08E-04

6.53E-04

6.01E-04

5.53E-04

5.09E-04

4.68E-04

4.30E-04

3.95E-04

3.63E-04

3.34E-04

3.07E-04

2.81E-04

2.58E-04

2.37E-04

2.18E-04

2.00E-04

1.83E-04

1.68E-04

1.54E-04

1.42E-04

1.30E-04

1.19E-04

1.10E-04

1.01E-04

9.22E-05

8.46E-05

7.77E-05

7.13E-05

6.55E-05

6.02E-05

5.53E-05

5.08E-05

4.66E-05

4.28E-05

3.94E-05

3.62E-05

3.33E-05

3.06E-05

2.81E-05

2.58E-05

2.37E-05

2.18E-05

2.01E-05

1.85E-05

1.70E-05

1.56E-05

1.44E-05

1.33E-05

1.22E-05

1.13E-05

1.04E-05

9.55E-06

8.80E-06

8.12E-06

7.48E-06

6.90E-06

6.36E-06

5.86E-06

5.41E-06

4.99E-06]; 


sensitivityCurves = cat(2, sensitivityCurves, doublecones);


case  ('User Defined')

%It is assumed that the UserDefinedCurves do not include double cone

%sensitivities

sensitivityCurves = cat(2, UserDefinedCurves, BlankDoubleCones); 

end


%Get size of user matrix

[rows cols] = size (User);

%This should be 401 rows  x (number of patches)columns


meanMatrix = User; 

meanMatrix(:, 1) = [];%Removes first column from meanMatrix, leaving 401 x (number of patches).


%sensitivityCurves 401 x 6

sensitivityCurves = sensitivityCurves.';%Transforms sensitivityCurves to make a 6 X 401

sensitivityCurves(1, :) = [];%Removes the first row(300 - 700 nm) from sensitivityCurves, now 5 x 401


newMatrix = sensitivityCurves * meanMatrix; %[5 x 401] * [401 x numpatches] gives a [5 x numpatches]

newMatrix = newMatrix.';%Transforms to numpatches x 5 matrix


[newrows newcols] = size(newMatrix); 


for n = 1:newrows

    doubleConePhotonCatch(n, 1) = newMatrix(n, 5); 

end


newMatrix(:, 5) = []; %Removes double cone photon catch values from newMatrix


%The idealized stimulation values of the four color cones are normalized to

%sum to 1.  

for n = 1:newrows

      rowSum = sum(newMatrix(n, :));

    for c = 1:4

      photonCatchMatrix (n, c) = newMatrix(n, c); %preserves photon catch data before normalization of u s m l to sum of 1

      newMatrix(n, c) = newMatrix(n, c) / rowSum;

    end

end


PhotonCatch = photonCatchMatrix; %contains the patches * 4 matrix with absolute u/v s m l stimulation values

Mega = newMatrix;

Mega = roundn(Mega, -6); 



%*************************************************************************%

%Gets brilliance Matrix

function NormBril = brillianceNoPrint(UserOriginal, patnum, patnames)

[rows cols] = size (UserOriginal);


brilMatrix = roundn(UserOriginal, -6);


for i = 1: patnum

   NormBril(i) = sum(brilMatrix(:,i+1))/(401*100); %(i+1) is desired column / column 1 of brilMatrix is 300 - 700

   ReflectanceMax(i) = max(brilMatrix(:,i+1));

   [a b] = find(brilMatrix(:, i+1) == ReflectanceMax(i));

   [j k] = size(a); 

   if j > 1

       E = 'Multiple occurences';

   else  %two break statements above removed from TCS1a.

    Wavelength(i) = brilMatrix(a, 1);

   end

end



%*************************************************************************%

%Displays selected matrix

function showmatrix(patnum, Mega, labeltxt, patnames)

D = ['                  '];

for i = 1:5

    cone = labeltxt(1,i);

    ncone = char(cone);

    ncone(end+1:12) = ' '; 

    D = [D ncone];

end

disp(D)

for i = 1:patnum

   C = Mega(i, :);

   word = patnames(i);

   S = char(word);

   S(end+1:30) = ' ';

   [s, errmsg] = sprintf(['%s', repmat('%.4f      ',1, 4)], S, C);

   disp(s)

end

   E = 'AVERAGE';

   E(end+1:30) = ' '; 

   u_av = mean(Mega(:, 1)); 

   s_av = mean(Mega(:, 2)); 

   m_av = mean(Mega(:, 3)); 

   l_av = mean(Mega(:, 4)); 

   [s] = sprintf(['%s', repmat('%.4f      ', 1, 4)], E , u_av, s_av, m_av, l_av);

   disp(s)



%*************************************************************************%

%Plots color tetrahedron

function tetraplotter (UVreply)

vertex_matrix = [0 0 .75; -.61237 -.35355 -.25; 0 .70711 -.25;

.61237 -.35355 -.25];

faces_matrix = [1 2 3; 1 3 4; 1 4 2; 2 3 4];

FaceVertexCData = [1 1 1; 0 0 1; 0 1 0; 1 0 0];

patch ('Vertices',vertex_matrix,'Faces',faces_matrix,'FaceVertexCData', FaceVertexCData, 'FaceColor', 'interp')

if UVreply == 1 || UVreply == 2 || UVreply == 3

text(0, 0, .75, ' u')

elseif UVreply == 4 || UVreply == 5

text(0, 0, .75, ' v')   

else

text(0, 0, .75, ' u/v')

end

text(-.61237, -.35355, -.25,' s')

text(0, .70711, -.25, ' m')

text(.61237, -.35355, -.25, ' l')

alpha(.6)

view(3)

drawnow;

axis image;

view(170, 20); 



%*************************************************************************%

%Plots white tetrahedron

function tetraplotterWhite(UVreply)

vertex_matrix = [0 0 .75; -.61237 -.35355 -.25; 0 .70711 -.25;

.61237 -.35355 -.25];

faces_matrix = [1 2 3; 1 3 4; 1 4 2; 2 3 4];

FaceVertexCData = [1 1 1; 1 1 1; 1 1 1; 1 1 1];

patch ('Vertices',vertex_matrix,'Faces',faces_matrix,'FaceVertexCData', FaceVertexCData, 'Facecolor', 'none', 'EdgeColor', 'black')

if UVreply == 1 || UVreply == 2 || UVreply == 3

text(0, 0, .75, ' u')

elseif UVreply == 4 || UVreply == 5

text(0, 0, .75, ' v')   

else

text(0, 0, .75, ' u/v')

end

text(-.61237, -.35355, -.25,' s')

text(0, .70711, -.25, ' m')

text(.61237, -.35355, -.25, ' l')

alpha(0)

view(3)

drawnow;

axis image;

view(170, 20); 



%*************************************************************************%

%Plots white tetrahedron with no grid or u,s,m,l labels

function tetraplotterNoGrid

grid off; 

vertex_matrix = [0 0 .75; -.61237 -.35355 -.25; 0 .70711 -.25;

.61237 -.35355 -.25];

faces_matrix = [1 2 3; 1 3 4; 1 4 2; 2 3 4];

FaceVertexCData = [1 1 1; 1 1 1; 1 1 1; 1 1 1];

patch ('Vertices',vertex_matrix,'Faces',faces_matrix,'FaceVertexCData', FaceVertexCData, 'Facecolor', 'none', 'EdgeColor', 'black')

set(gca,'XTickLabel',[' '])

set(gca,'YTickLabel',[' '])

set(gca,'ZTickLabel',[' '])

alpha(0)

view(3)

drawnow;

axis image;

view(170, 20); 



%*************************************************************************%

%Converts Cartesian coordinates to spherical coordinates

function spherical(X, Y, Z, patnum, patnames)

[theta, phi, r] = cart2sph(X, Y, Z); 

[s] = sprintf(['%s\t\t\t\t\t\t\t   ', '%s\t\t\t   ', '%s\t\t\t\t', '%s\t\t\t'], ' ', 'theta', 'phi', 'r');

disp(s)

f = 1; 

for i = 1:patnum

   T = theta(i);

   P = phi(i);

   R = r(i); 

   word = patnames(i);

   S = char(word);

   S(end+1:30) = ' '; 

   [s] = sprintf(['%s', repmat('%.4f\t\t\t', 1, 3)], S, T, P, R);

   disp(s)

end 



%*************************************************************************%

%Displays Robinson projection with labels

function LabeledRobinson(X, Y, Z, patnum, patnames, UVreply)

[theta, phi, r] = cart2sph(X, Y, Z); 

f = 1; 

for i = 1:patnum

   T = theta(i);

   P = phi(i);

   lon(f) = T;

   lat(f) = P;

   f = f + 1; 

end

h = figure('Color','white');

axesm('robinson', 'Frame', 'on', 'Grid', 'on', 'AngleUnits', 'radians');

geoshow(lat, lon, 'DisplayType', 'point', 'Marker', '.','MarkerSize', 6, 'MarkerEdgeColor','k',...

                'MarkerFaceColor','k');

f=1;

for i = 1:patnum

    word = patnames(i); 

    S = char(word);

    textm(lat(f), lon(f), S)

    f = f+1; 

end

vertex_matrix = [0 0 .75; -.61237 -.35355 -.25; 0 .70711 -.25;

.61237 -.35355 -.25];

faces_matrix = [1 2 3; 1 3 4; 1 4 2; 2 3 4];

FaceVertexCData = [1 1 1; 0 0 1; 0 1 0; 1 0 0];

X = [0, -.61237, 0, .61237];

Y = [0, -.35355, .70711, -.35355];

Z = [.75, -.25, -.25, -.25];

[theta, phi, r] = cart2sph(X,Y,Z);

for i = 1:4

tetralon(i) = theta(i);  

tetralat(i) = phi(i);

end

geoshow(tetralat, tetralon, 'DisplayType', 'point', 'Marker', '.', 'MarkerSize', 6, 'MarkerEdgeColor', 'k',...

       'MarkerFaceColor', 'k'); 

if UVreply == 1 || UVreply == 2 || UVreply == 3

   v = char('u', 's', 'm', 'l');

elseif UVreply == 4 || UVreply ==5 

   v = char('v', 's', 'm', 'l');

else

  v = char('u/v', 's', 'm', 'l');

end

f=1; 

for i = 1:4

    word = v(i);

    textm(tetralat(f), tetralon(f), word)

    f = f+1; 

end



%*************************************************************************%

%Displays Robinson projection with no labels, big dots, and triangle labels at u/v, s, m, l

function BasicRobinson(X, Y, Z, patnum, patnames)

[theta, phi, r] = cart2sph(X, Y, Z);

f = 1; 

for i = 1:patnum

   T = theta(i);

   P = phi(i);

   lon(f) = T;

   lat(f) = P;

   f = f + 1; 

end

h = figure('Color','white');

axesm('robinson', 'Frame', 'on', 'Grid', 'on', 'AngleUnits', 'radians');

geoshow(lat, lon, 'DisplayType', 'point', 'Marker', 'o','MarkerSize', 4, 'MarkerEdgeColor','k',...

                'MarkerFaceColor','k');

vertex_matrix = [0 0 .75; -.61237 -.35355 -.25; 0 .70711 -.25;

.61237 -.35355 -.25];

faces_matrix = [1 2 3; 1 3 4; 1 4 2; 2 3 4];

FaceVertexCData = [1 1 1; 0 0 1; 0 1 0; 1 0 0];

X = [0, -.61237, 0, .61237];

Y = [0, -.35355, .70711, -.35355];

Z = [.75, -.25, -.25, -.25];

[theta, phi, r] = cart2sph(X,Y,Z);

for i = 1:4

tetralon(i) = theta(i);  

tetralat(i) = phi(i);

end

geoshow(tetralat, tetralon, 'DisplayType', 'point', 'Marker', 'v', 'MarkerSize', 10, 'MarkerEdgeColor', 'k',...

       'MarkerFaceColor', 'k'); 


   

%*************************************************************************%

%Displays selected matrix with numbers next to patches

function showmatrixnum(patnum, Mega, labeltxt, patnames)

D = [];

for i = 1

    spaces = labeltxt(i);

    nspaces = char(spaces); 

    nspaces(end+1:40) = ' '; 

    D = nspaces; 

end

for i = 2:5

    cone = labeltxt(i);

    ncone = char(cone);

    ncone(end+1:12) = ' '; 

    D = [D ncone];

end  

disp(D)

for i = 1:patnum

   C = Mega(i, :);

   word = patnames(i);

   S = char(word);

   S(end+1:30) = ' ';

   x = num2str(i); 

   [s, errmsg] = sprintf(['%s      ', '%s', repmat('%.4f      ',1, 4)], x, S, C);

   disp(s)

end



%*************************************************************************%

%Displays graph showing u/v(r), s(r), m(r), l(r) for a given hue

function huefunctions (M, reply, patnames, UVreply)

H(1,:) = M(reply,:);

x = H(1, 1);

y = H(1, 2);

z = H(1, 3);

[theta, phi, r] = cart2sph(x, y, z);

if r == 0

    disp('This hue is achromatic.  It does not vary with chromaticity.  The maximum chromaticity is 0.')

    disp(' ')

else

utheta = 0; 

uphi = 1.570796; 

alphau = acos(cos(phi)*cos(uphi)*cos(theta - utheta)+sin(phi)*sin(uphi));

uhue = cos(alphau);

if UVreply == 1 || UVreply == 2 || UVreply == 3

[s] = sprintf(['%s', '%.4f'], 'u(r) = r * ', uhue); 

elseif UVreply == 4 || UVreply == 5

[s] = sprintf(['%s', '%.4f'], 'v(r) = r * ', uhue); 

else

[s] = sprintf(['%s', '%.4f'], 'u/v(r) = r * ', uhue);

end

disp(s)

stheta = -2.617994; 

sphi = -.339837; 

alphas = acos(cos(phi)*cos(sphi)*cos(theta - stheta)+sin(phi)*sin(sphi));

shue = cos(alphas);

[s] = sprintf(['%s', '%.4f'], 's(r) = r * ', shue); 

disp(s)

mtheta = 1.570796; 

mphi = -.339837; 

alpham = acos(cos(phi)*cos(mphi)*cos(theta - mtheta)+sin(phi)*sin(mphi));

mhue = cos(alpham);

[s] = sprintf(['%s', '%.4f'], 'm(r) = r * ', mhue); 

disp(s)

ltheta = -.523599; 

lphi = -.339837; 

alphal = acos(cos(phi)*cos(lphi)*cos(theta - ltheta)+sin(phi)*sin(lphi));

lhue = cos(alphal);

[s] = sprintf(['%s', '%.4f'], 'l(r) = r * ', lhue); 

disp(s)

A = [alphau alphas alpham alphal];

alphamax = max(A);

rmax = .25/(cos(pi-alphamax));

disp(' ')

disp('The maximum chromaticity, r, for this hue is:')

disp(' ')

[s, errmsg] = sprintf('%0.4f', rmax);

disp(s);

disp(' '); 

xdom = 0:.02:rmax;

y1 = uhue * xdom;

y2 = shue * xdom;

y3 = mhue * xdom;

y4 = lhue * xdom;

figure1 = figure;

set(gcf,'DefaultAxesColorOrder',[.45 .1 .45;0 0 1;0 1 0; 1 0 0])

plot(xdom, y1, xdom, y2, xdom, y3, xdom, y4)

axis([0 .75 -.25 .75]);

set(gca,'Xtick',[[0.00:0.15:0.75]])

set(gca,'Ytick',[-.25  0 .25 .50 .75])

ax1 = gca; 

location = 'northeastoutside'; 

if UVreply == 1 || UVreply == 2 || UVreply == 3

legend(['u(r) = ', num2str(uhue) , 'r'],['s(r) = ', num2str(shue) , 'r'],['m(r) = ', num2str(mhue) , 'r'],['l(r) = ', num2str(lhue) , 'r'], 'Location', location)

mytitle = patnames(reply);

title(mytitle)

xlabel('r')

ylabel('u(r), s(r), m(r), l(r)')

elseif UVreply == 4 || UVreply == 5

legend(['v(r) = ', num2str(uhue) , 'r'],['s(r) = ', num2str(shue) , 'r'],['m(r) = ', num2str(mhue) , 'r'],['l(r) = ', num2str(lhue) , 'r'], 'Location', location)

mytitle = patnames(reply);

title(mytitle)

xlabel('r')

ylabel('v(r), s(r), m(r), l(r)')

else

legend(['u/v(r) = ', num2str(uhue) , 'r'],['s(r) = ', num2str(shue) , 'r'],['m(r) = ', num2str(mhue) , 'r'],['l(r) = ', num2str(lhue) , 'r'], 'Location', location)

mytitle = patnames(reply);

title(mytitle)

xlabel('r')

ylabel('u/v(r), s(r), m(r), l(r)')   

end

ax2 = axes('Position',get(ax1,'Position'),...

           'XAxisLocation','top',...

           'YAxisLocation','right',...

           'YTick',[0 0.25 0.5 0.75 1],...

           'YTickLabel',{'0 %','25%','50%','75%','100%'},...

           'XTick', [[0.00:0.0:0.75]],...

           'XTickLabel',{' ', ' ', ' ', ' ', ' ', ' '},...

           'Color','none',...

           'Parent', figure1);

end



%*************************************************************************%

%Displays graph in black showing u/v(r), s(r), m(r), l(r) for a given hue 

function huefunctionsBlackLines (M, reply, patnames, UVreply)

H(1,:) = M(reply,:);

x = H(1, 1);

y = H(1, 2);

z = H(1, 3);

[theta, phi, r] = cart2sph(x, y, z);

if r == 0

    disp('This hue is achromatic.  It does not vary with chromaticity.  The maximum chromaticity is 0.')

    disp(' ')

else

utheta = 0; 

uphi = 1.570796; 

alphau = acos(cos(phi)*cos(uphi)*cos(theta - utheta)+sin(phi)*sin(uphi));

uhue = cos(alphau);

if UVreply == 1 || UVreply == 2 || UVreply == 3

[s] = sprintf(['%s', '%.4f'], 'u(r) = r * ', uhue); 

elseif UVreply == 4 || UVreply == 5

[s] = sprintf(['%s', '%.4f'], 'v(r) = r * ', uhue); 

else

[s] = sprintf(['%s', '%.4f'], 'u/v(r) = r * ', uhue);

end

stheta = -2.617994; 

sphi = -.339837; 

alphas = acos(cos(phi)*cos(sphi)*cos(theta - stheta)+sin(phi)*sin(sphi));

shue = cos(alphas);

[s] = sprintf(['%s', '%.4f'], 's(r) = r * ', shue); 

disp(s)

mtheta = 1.570796; 

mphi = -.339837; 

alpham = acos(cos(phi)*cos(mphi)*cos(theta - mtheta)+sin(phi)*sin(mphi));

mhue = cos(alpham);

[s] = sprintf(['%s', '%.4f'], 'm(r) = r * ', mhue); 

disp(s)

ltheta = -.523599; 

lphi = -.339837; 

alphal = acos(cos(phi)*cos(lphi)*cos(theta - ltheta)+sin(phi)*sin(lphi));

lhue = cos(alphal);

[s] = sprintf(['%s', '%.4f'], 'l(r) = r * ', lhue); 

disp(s)

A = [alphau alphas alpham alphal];

alphamax = max(A);

rmax = .25/(cos(pi-alphamax));

disp(' ')

disp('The maximum chromaticity, r, for this hue is:')

disp(' ')

[s, errmsg] = sprintf('%0.4f', rmax);

disp(s);

disp(' '); 

xdom = 0:.02:rmax;

y1 = uhue * xdom;

y2 = shue * xdom;

y3 = mhue * xdom;

y4 = lhue * xdom;

figure1 = figure;

set(0,'DefaultAxesColorOrder',[0 0 0;0 0 0;0 0 0;0 0 0])

plot(xdom, y1, '-.', xdom, y2, '-d', xdom, y3,'-o', xdom, y4, '-*')

axis([0 .75 -.25 .75])

set(gca,'Xtick',[0.00:0.15:0.75])

set(gca,'Ytick',[-.25  0 .25 .50 .75])

ax1 = gca; 

location = 'northeastoutside'; 

if UVreply == 1 || UVreply == 2 || UVreply == 3

legend(['u(r) = ', num2str(uhue) , 'r'],['s(r) = ', num2str(shue) , 'r'],['m(r) = ', num2str(mhue) , 'r'],['l(r) = ', num2str(lhue) , 'r'], 'Location', location)

mytitle = patnames(reply);

title(mytitle)

xlabel('r')

ylabel('u(r), s(r), m(r), l(r)')

elseif UVreply == 4 || UVreply == 5

legend(['v(r) = ', num2str(uhue) , 'r'],['s(r) = ', num2str(shue) , 'r'],['m(r) = ', num2str(mhue) , 'r'],['l(r) = ', num2str(lhue) , 'r'], 'Location', location)

mytitle = patnames(reply);

title(mytitle)

xlabel('r')

ylabel('v(r), s(r), m(r), l(r)')

else

legend(['u/v(r) = ', num2str(uhue) , 'r'],['s(r) = ', num2str(shue) , 'r'],['m(r) = ', num2str(mhue) , 'r'],['l(r) = ', num2str(lhue) , 'r'], 'Location', location)

mytitle = patnames(reply);

title(mytitle)

xlabel('r')

ylabel('u/v(r), s(r), m(r), l(r)')   

end

ax2 = axes('Position',get(ax1,'Position'),...

           'XAxisLocation','top',...

           'YAxisLocation','right',...

           'YTick',[0 0.25 0.5 0.75 1],...

           'YTickLabel',{'0 %','25%','50%','75%','100%'},...

           'XTick', [0.00:0:0.75],...    

           'XTickLabel',{' ', ' ', ' ', ' ', ' ', ' '},...

           'Color','none',...

           'Parent', figure1);

end



%*************************************************************************%

%Computes the achieved chroma and maximum chroma

function [avchroma] = rmax(X, Y, Z, patnum, patnames) 

[theta, phi, r] = cart2sph(X, Y, Z); 

[s] = sprintf(['%s\t\t\t\t\t\t\t\t\t   ', '%s\t\t\t', '%s\t\t\t\t', '%s\t\t\t\t', '%s\t\t\t', '%s\t\t\t'], ' ', 'theta', 'phi', 'r', 'rmax', 'achieved r');

disp(s)

for i = 1:patnum

   T (i) = theta(i);

   P (i)= phi(i);

   R (i)= r(i); 

   if R(i) == 0

       Rmax(i) = 0;

       AchievedR(i) = 0; 

   else

        utheta = 0; 

        uphi = 1.570796; 

        alphau = acos(cos(phi(i))*cos(uphi)*cos(theta(i) - utheta)+sin(phi(i))*sin(uphi));

        uhue = cos(alphau);

        stheta = -2.617994; 

        sphi = -.339837; 

        alphas = acos(cos(phi(i))*cos(sphi)*cos(theta(i) - stheta)+sin(phi(i))*sin(sphi));

        shue = cos(alphas);

        mtheta = 1.570796; 

        mphi = -.339837; 

        alpham = acos(cos(phi(i))*cos(mphi)*cos(theta(i) - mtheta)+sin(phi(i))*sin(mphi));

        mhue = cos(alpham);

        ltheta = -.523599; 

        lphi = -.339837; 

        alphal = acos(cos(phi(i))*cos(lphi)*cos(theta(i) - ltheta)+sin(phi(i))*sin(lphi));

        lhue = cos(alphal);

        A = [alphau alphas alpham alphal];

        alphamax = max(A);

   Rmax(i) = .25/(cos(pi-alphamax));

   AchievedR(i) = R(i)/Rmax(i); 

   end

   word = patnames(i);

   S = char(word);

   S(end+1:39) = ' '; 

   [s] = sprintf(['%s', repmat('%.4f\t\t\t', 1, 5)], S, T(i), P(i), R(i), Rmax(i), AchievedR(i));

   disp(s)

end

   E = 'AVERAGE';

   E(end+1:39) = ' '; 

   avchroma = mean(r); 

   [s] = sprintf(['%s', repmat('%.4f\t\t\t', 1, 5)], E , mean(theta), mean(phi), avchroma,  mean(Rmax), mean(AchievedR));

   disp(s)



%*************************************************************************%

%Calculates brilliance matrix

function [NormBril, avBril] = brilliance(UserOriginal, patnum, patnames)

[rows cols] = size (UserOriginal);


[s] = sprintf(['%s\t\t\t   ', '%s\t\t\t\t\t', '%s\t\t\t\t\t\t\t', '%s\t\t\t\t\t'], ' ', 'normalized brilliance', 'wavelength max (nm)', '% reflectance at wavelength max');

disp(s)

brilMatrix = roundn(UserOriginal, -6);


for i = 1: patnum

   NormBril(i) = sum(brilMatrix(:,i+1))/(401*100); %(i+1) is desired column / column 1 of brilMatrix is 300 - 700

   ReflectanceMax(i) = max(brilMatrix(:,i+1));

   [a b] = find(brilMatrix(:, i+1) == ReflectanceMax(i));

   [j k] = size(a); 

   if j > 1

       E = 'Multiple occurences';

        word = patnames(i);

        S = char(word);

        S(end+1:30) = ' '; 

        [s] = sprintf(['%s', repmat('%.4f\t\t\t\t\t\t\t', 1, 1), '%s\t\t\t\t\t', repmat('%.4f\t\t\t\t', 1, 1)], S, NormBril(i), E, ReflectanceMax(i));

        disp(s)

       break

       break

   else  

    Wavelength(i) = brilMatrix(a, 1);

   end

   word = patnames(i);

   S = char(word);

   S(end+1:30) = ' '; 

   [s] = sprintf(['%s', repmat('%.4f\t\t\t\t\t\t\t', 1, 5)], S, NormBril(i), Wavelength(i), ReflectanceMax(i));

   disp(s)

end

   E = 'AVERAGE';

   E(end+1:30) = ' '; 

   avBril = mean(NormBril);

   [ss] = sprintf(['%s', repmat('%.4f\t\t\t', 1, 2)], E , avBril);

   disp(ss)

   

   

%*************************************************************************%

%Computes average color span, variance, and matrix with the distances between points in the tetrahedron

%With thanks to Kalliope Stournaras for helpful suggestions

function [avcolorspan, varcolorspan, maxcolorspan] = distmatrix(M, patnum, patnames, preference)

 

if preference == 0 || preference == 1

        incZeroUpperMdist = pdist(M);

        avcolorspan = mean2(incZeroUpperMdist);

        varcolorspan = std2(incZeroUpperMdist) * std2(incZeroUpperMdist);

        maxcolorspan = max(incZeroUpperMdist);

end

   

if preference == 2

    

for i = 1:patnum

     for j = 1:patnum

        Mdist(i, j)= sqrt(sum((M(j,:)-M(i,:)).^2));

     end

 end

 

upperMdist = triu(Mdist);

upperMdist = roundn(upperMdist, -6);

nonZeroUpperMdist = nonzeros(upperMdist);

avcolorspan = mean2(nonZeroUpperMdist);

varcolorspan = std2(nonZeroUpperMdist) * std2(nonZeroUpperMdist);

maxcolorspan = max(nonZeroUpperMdist);


end


N = 'The average color span is: ';

M = 'The color span variance is: ';

O = 'The max color span is: '; 


[s, errmsg] = sprintf(['%s', repmat('%.4e',1,1)], N, avcolorspan);

disp(s)

[s, errmsg] = sprintf(['%s', repmat('%.4e',1,1)], M, varcolorspan);

disp(s)

[s, errmsg] = sprintf(['%s', repmat('%.4e',1,1)], O, maxcolorspan);

disp(s)

disp(' ')

L = []; 



%*************************************************************************%

%Computes average color span, variance, and matrix with the distances between points in the tetrahedron

%With thanks to Kalliope Stournaras for helpful suggestions

function [avcolorspan, varcolorspan, maxcolorspan] = distmatrixprint(M, patnum, patnames, preference)


if preference == 0 || preference == 1

    

        incZeroUpperMdist = pdist(M);

        avcolorspan = mean2(incZeroUpperMdist);

        varcolorspan = std2(incZeroUpperMdist) * std2(incZeroUpperMdist);

        maxcolorspan = max(incZeroUpperMdist);

        

        for i = 1:patnum %Mdist calculated here for printing only

            for j = 1:patnum

            Mdist(i, j)= sqrt(sum((M(j,:)-M(i,:)).^2));

            end

        end

end

   

if preference == 2

    

for i = 1:patnum

     for j = 1:patnum

        Mdist(i, j)= sqrt(sum((M(j,:)-M(i,:)).^2));

     end

 end

 

upperMdist = triu(Mdist);

upperMdist = roundn(upperMdist, -6);

nonZeroUpperMdist = nonzeros(upperMdist);

avcolorspan = mean2(nonZeroUpperMdist);

varcolorspan = std2(nonZeroUpperMdist) * std2(nonZeroUpperMdist);

maxcolorspan = max(nonZeroUpperMdist);


end


N = 'The average color span is: ';

M = 'The color span variance is: ';

O = 'The max color span is: '; 


[s, errmsg] = sprintf(['%s', repmat('%.4e',1,1)], N, avcolorspan);

disp(s)

[s, errmsg] = sprintf(['%s', repmat('%.4e',1,1)], M, varcolorspan);

disp(s)

[s, errmsg] = sprintf(['%s', repmat('%.4e',1,1)], O, maxcolorspan);

disp(s)

disp(' ')

L = []; 


for i = 1:(patnum)

   B = Mdist(i, :);

   word = patnames(i);

   S = char(word);

   S(end+1:15) = ' ';

   [s, errmsg] = sprintf(['%s', repmat('%.4f         ',1,patnum)], S, B);

   disp(s)

   L = [L,S]; 

end


[t]=sprintf(['%s', repmat('%s', 1, patnum)], '               ', L);

disp(t)



%*************************************************************************%

%Plots color tetrahedron with convex hull 

function tetraplotterhull (K, M, UVreply)

vertex_matrix = [0 0 .75; -.61237 -.35355 -.25; 0 .70711 -.25;

.61237 -.35355 -.25];

trisurf(K, M(:,1), M(:,2), M(:,3));

faces_matrix = [1 2 3; 1 3 4; 1 4 2; 2 3 4];

FaceVertexCData = [1 1 1; 0 0 1; 0 1 0; 1 0 0];

patch ('Vertices',vertex_matrix,'Faces',faces_matrix,'FaceVertexCData', FaceVertexCData, 'FaceColor', 'interp')

if UVreply == 1 || UVreply == 2 || UVreply == 3

text(0, 0, .75, ' u')

elseif UVreply == 4 || UVreply == 5

text(0, 0, .75, ' v')   

else

text(0, 0, .75, ' u/v')

end

text(-.61237, -.35355, -.25,' s')

text(0, .70711, -.25, ' m')

text(.61237, -.35355, -.25, ' l')

alpha(.6)

view(3)

drawnow;

axis image;

view(170, 20); 



%*************************************************************************%

%Plots tetrahedron and convex hull in white

function tetraplotterhullWhite (K, M, UVreply) 

vertex_matrix = [0 0 .75; -.61237 -.35355 -.25; 0 .70711 -.25;

.61237 -.35355 -.25];

trisurf(K, M(:,1), M(:,2), M(:,3))

faces_matrix = [1 2 3; 1 3 4; 1 4 2; 2 3 4];

FaceVertexCData = [1 1 1; 1 1 1; 1 1 1; 1 1 1];

patch ('Vertices',vertex_matrix,'Faces',faces_matrix,'FaceVertexCData', FaceVertexCData, 'Facecolor', 'none', 'EdgeColor', 'black')

if UVreply == 1 || UVreply == 2 || UVreply == 3

text(0, 0, .75, ' u')

elseif UVreply == 4 || UVreply == 5

text(0, 0, .75, ' v')   

else

text(0, 0, .75, ' u/v')

end

text(-.61237, -.35355, -.25,' s')

text(0, .70711, -.25, ' m')

text(.61237, -.35355, -.25, ' l')

alpha(.6)

view(3)

drawnow;

axis image;

view(170, 20); 



%*************************************************************************%

%Computes average hue disparity and variance of hue

%disparity

function [huedisparity, varhuedisparity, maxhuedisparity] = huedispmatrix(Huemat, patnum, patnames, preference)



 for i = 1:patnum

     for j = 1:patnum

        Huedisp(i, j)= acos(cos(Huemat(j,2))*cos(Huemat(i,2))*cos(Huemat(j,1)-Huemat(i,1))+sin(Huemat(j,2))*sin(Huemat(i,2)));

     end

 end

 

if preference == 1


combined = []; 

n=2; 

upperHuedisp = triu(Huedisp);

upperHuedisp = roundn(upperHuedisp, -6);

for i = 1: patnum

    for c = n:patnum

        incZeroUpperHuedisp(i, :) = upperHuedisp(i, c);

        combined = [combined, incZeroUpperHuedisp(i, :)];

    end

    n = n+1; 

    c = n; 

end

incZeroUpperHuedisp = combined;

huedisparity = mean2(incZeroUpperHuedisp);

varhuedisparity = std2(incZeroUpperHuedisp) * std2(incZeroUpperHuedisp);

maxhuedisparity = max(incZeroUpperHuedisp);


end


if preference == 2

 

upperHuedisp = triu(Huedisp);

upperHuedisp = roundn(upperHuedisp, -6);

nonZeroUpperHuedisp = nonzeros(upperHuedisp);

huedisparity = mean2(nonZeroUpperHuedisp);

varhuedisparity = std2(nonZeroUpperHuedisp) * std2(nonZeroUpperHuedisp);

maxhuedisparity = max(nonZeroUpperHuedisp);


end


N = 'The hue disparity is: ';

M = 'The variance of hue disparity is: ';

O = 'The maximum hue disparity is: ';

[s, errmsg] = sprintf(['%s', repmat('%.4e',1,1)], N, huedisparity);

disp(s)

[s, errmsg] = sprintf(['%s', repmat('%.4e',1,1)], M, varhuedisparity);

disp(s)

[s, errmsg] = sprintf(['%s', repmat('%.4e',1,1)], O, maxhuedisparity);

disp(s)



%*************************************************************************%

%Computes average hue disparity and variance of hue

%disparity, outputs hue disparity matrix

function [huedisparity, varhuedisparity, maxhuedisparity] = huedispmatrixprint(Huemat, patnum, patnames, preference)

 for i = 1:patnum

     for j = 1:patnum

        Huedisp(i, j)= acos(cos(Huemat(j,2))*cos(Huemat(i,2))*cos(Huemat(j,1)-Huemat(i,1))+sin(Huemat(j,2))*sin(Huemat(i,2)));

     end

 end

 

if preference == 1


combined = []; 

n=2; 

upperHuedisp = triu(Huedisp);

upperHuedisp = roundn(upperHuedisp, -6);

for i = 1: patnum

    for c = n:patnum

        incZeroUpperHuedisp(i, :) = upperHuedisp(i, c);

        combined = [combined, incZeroUpperHuedisp(i, :)];

    end

    n = n+1; 

    c = n; 

end

incZeroUpperHuedisp = combined;

huedisparity = mean2(incZeroUpperHuedisp);

varhuedisparity = std2(incZeroUpperHuedisp) * std2(incZeroUpperHuedisp);

maxhuedisparity = max(incZeroUpperHuedisp);


end


if preference == 2

 

upperHuedisp = triu(Huedisp);

upperHuedisp = roundn(upperHuedisp, -6);

nonZeroUpperHuedisp = nonzeros(upperHuedisp);

huedisparity = mean2(nonZeroUpperHuedisp);

varhuedisparity = std2(nonZeroUpperHuedisp) * std2(nonZeroUpperHuedisp);

maxhuedisparity = max(nonZeroUpperHuedisp);


end


N = 'The hue disparity is: ';

M = 'The variance of hue disparity is: ';

O = 'The maximum hue disparity is: ';

[s, errmsg] = sprintf(['%s', repmat('%.4e',1,1)], N, huedisparity);

disp(s)

[s, errmsg] = sprintf(['%s', repmat('%.4e',1,1)], M, varhuedisparity);

disp(s)

[s, errmsg] = sprintf(['%s', repmat('%.4e',1,1)], O, maxhuedisparity);

disp(s)

L = []; 

disp(' ')

for i = 1:patnum

   B = Huedisp(i, :);

   word = patnames(i);

   S = char(word);

   S(end+1:15) = ' ';

   [s, errmsg] = sprintf(['%s', repmat('%.4f         ',1,patnum)], S, B);

   disp(s)

   L = [L,S]; 

end

[t]=sprintf(['%s', repmat('%s', 1, patnum)], '               ', L);

disp(t)



%*************************************************************************%

%Rounds numbers to a given power of 10.

function y = roundn(x,n)


y = round(x/10^n)*10^n;


%*************************************************************************%

function keep(varargin)

%MATLAB library download

%KEEP keeps the caller workspace variables of your choice and clear the rest.

%       Its usage is just like "clear" but only for variables.

%

%       Xiaoning (David) Yang   xyang@lanl.gov 1998

%       Revision based on comments from Michael McPartland,

%       michael@gaitalf.mgh.harvard.edu, 1999

 

%       Keep all

if isempty(varargin)

        return

end



%       See what are in caller workspace

wh = evalin('caller','who');



%       Check workspace variables

if isempty(wh)

        error('  There is nothing to keep!')

end



%       Construct a string containing workspace variables delimited by ":"

variable = [];

for i = 1:length(wh)

        variable = [variable,':',wh{i}];

end

variable = [variable,':'];



%       Extract desired variables from string

flag = 0;

for i = 1:length(varargin)

        I = findstr(variable,[':',varargin{i},':']);

        if isempty(I)

                disp(['       ',varargin{i}, ' does not exist!'])

                flag = 1;

        elseif I == 1

                variable = variable(1+length(varargin{i})+1:length(variable));

        elseif I+length(varargin{i})+1 == length(variable)

                variable = variable(1:I);

        else

                variable = [variable(1:I),variable(I+length(varargin{i})+2:length(variable))];

        end

end



%       No delete if some input variables do not exist

if flag == 1

        disp('       No variables are deleted!')

        return

end



%       Convert string back to cell and delete the rest

I = findstr(variable,':');

if length(I) ~= 1

        for i = 1:length(I)-1

                if i ~= length(I)-1

                        del(i) = {[variable(I(i)+1:I(i+1)-1),' ']};

                else

                        del(i) = {variable(I(i)+1:length(variable)-1)};

                end

        end

        evalin('caller',['clear ',del{:}])

end 

% %**************************************************************************

% function xbar = mean2(A)

% %MEAN2(A) Computes the mean of entries of a matrix A

% Kindly provided by Martyna Boruta and Mark Deutschlander

% 

% [m, n] = size(A);

% tot = 0;

% for i=1:m

%     for j=1:n

%         tot = tot + A(i, j);

%     end

% end

% xbar = tot/(m*n);

% 

% %**************************************************************************

% function s = std2(A)

% %STD2(A) Computes the standard deviation of entries of a matrix A

% Kindly provided by Martyna Boruta and Mark Deutschlander


% [m, n] = size(A);

% xbar = mean2(A);

% s = sqrt(sum(sum((A-xbar).^2))/(m*n-1));

% %**************************************************************************

% function y = nanmean(x,dim)

% % FORMAT: Y = NANMEAN(X,DIM)

% % 

% %    Average or mean value ignoring NaNs

% %

% %    This function enhances the functionality of NANMEAN as distributed in

% %    the MATLAB Statistics Toolbox and is meant as a replacement (hence the

% %    identical name).  

% %

% %    NANMEAN(X,DIM) calculates the mean along any dimension of the N-D

% %    array X ignoring NaNs.  If DIM is omitted NANMEAN averages along the

% %    first non-singleton dimension of X.

% %

% %    Similar replacements exist for NANSTD, NANMEDIAN, NANMIN, NANMAX, and

% %    NANSUM which are all part of the NaN-suite.

% %

% %    See also MEAN

% 

% % -------------------------------------------------------------------------

% %    author:      Jan Gläscher

% %    affiliation: Neuroimage Nord, University of Hamburg, Germany