% ***********************************************************************
% carotenoids.m
% ***********************************************************************
%
% Data description:
% specific absorption coefficient of carotenoids (400-2500nm),   
% adjusted for spectral shift and sieve factor (factor of 
% intensification = 4), with a resolution of 5nm
%
% Prepared by: Gladimir V. G. Baranoski on November 2010
%
% ***********************************************************************
%
% Original data source:
% 
% D. Eng and G.V.G. Baranoski, "The application of photoacoustic absorption
% spectral data to the modeling of leaf optical properties in the vsible
% range", IEEE Transactions on Geoscience and Remote Sensing, V. 45,
% N. 12, pp. 4077-4086, December 2007. 
%
% ***********************************************************************

clear all;
data=[
2.614e+004 
2.883e+004 
3.207e+004 
3.424e+004 
3.732e+004 
3.977e+004 
4.268e+004 
4.625e+004 
4.79e+004 
4.948e+004 
5.138e+004 
5.265e+004 
5.438e+004 
5.623e+004 
5.753e+004 
5.82e+004 
5.796e+004 
5.699e+004 
5.509e+004 
5.467e+004 
5.448e+004 
5.271e+004 
5.016e+004 
4.396e+004 
3.558e+004 
2.775e+004 
1.818e+004 
1.268e+004 
9336 
7298 
6079 
5236 
4658 
4274 
4045 
3833 
3833 
3833 
3792 
3685 
3606 
3533 
3500 
3500 
3494 
3470 
3447 
3423 
3399 
3376 
3352 
3338 
3367 
3396 
3425 
3453 
3482 
3524 
3589 
3654 
3576
3218 
2861 
2503 
2146 
1788 
1430 
1073 
715.2 
357.6 
0
];

fid=fopen('caro-PAS-400-2500.txt','wb');
for i=1:1:71
    wave(i)=395+i*5;
    fprintf(fid,'%d %3.4g \n',wave(i),data(i));
end


for i=72:1:421
    wave(i)=395+i*5;
    data(i)=0;
    fprintf(fid,'%d %3.4g \n',wave(i),data(i));
end    

fclose(fid);


plot(wave,data,'b-','linewidth',3);
axis([400 750 0 80000]);
set(gca,'FontSize', 14);
grid on
title('Carotenoids','fontsize',14)
ylabel('s.a.c. (cm^2 g^{-1}{})','fontsize',14);
xlabel('wavelength (nm)','fontsize',14);
set(gcf,'PaperUnits','inches','PaperPosition',[0 0 6 5]);
pause
print('-dpng', '-r100','carotenoids.png');
close 
