% ***********************************************************************
% chlorophyllAB.m
% ***********************************************************************
%
% Data description:
% specific absorption coefficient of chlorophyll a+b (400-2500nm), 
% with a resolution of 5nm 
%
% Prepared by: Gladimir V. G. Baranoski on November 2010
%
% ***********************************************************************
%
% Original data source:
% 
% S. Jacquemoud, S.L. Ustin, J. Verdebout, G. Schmuck, G. Andreoli
% and B. Hosgood, "Estimating leaf biochemistry using PROSPECT leaf 
% optical properties model", Remote Sensing of Environment, V. 56, 
% N. 3, pp. 194-202, June 1996.
%
% ***********************************************************************

clear all;
data=[
7.34e+004 
6.77e+004 
6.23e+004 
5.8e+004 
5.56e+004 
5.34e+004 
5.27e+004 
5.22e+004 
5.1e+004 
4.94e+004 
4.67e+004 
4.44e+004 
4.35e+004 
4.35e+004 
4.3e+004 
4.26e+004 
4.21e+004 
4.13e+004 
4e+004 
3.79e+004 
3.48e+004 
3.07e+004 
2.65e+004 
2.21e+004 
1.83e+004 
1.54e+004 
1.36e+004 
1.27e+004 
1.22e+004 
1.2e+004 
1.18e+004 
1.18e+004 
1.22e+004 
1.3e+004 
1.42e+004 
1.56e+004 
1.68e+004 
1.78e+004 
1.85e+004 
1.89e+004 
1.92e+004 
1.98e+004 
2.07e+004 
2.19e+004 
2.29e+004 
2.34e+004 
2.36e+004 
2.4e+004 
2.53e+004 
2.74e+004 
2.94e+004 
3.06e+004 
3.27e+004 
3.61e+004 
3.89e+004 
4.05e+004 
4.03e+004 
3.69e+004 
2.82e+004 
1.91e+004 
1.26e+004 
8700 
6200 
4500 
3200 
2200 
1500 
1000 
600 
300 
100
];

fid=fopen('chloAB-DFA-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:350
    wave(i)=750+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('Chlorophyll a+b','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','chlorophyll_a+b.png');
close 
