% ***********************************************************************
% eumelanin_extinction.m
% ***********************************************************************
%
% Data description:
% The extinction coefficient of zeaxanthin in [cm^-1, mg/ml^1] (380-520nm),
% with a resolution of 5nm.
%
% Prepared by: Boris Kravchenko on June 2016
%
% ***********************************************************************
%
% Original data source:
%      F.P. Zscheile, J.W. White, B.W. Beadle, and J.R. Roach, The preparation
%      and absorption spectra of five pure carotenoid pigments, Plant Physiology 17
%      (1942), no. 3, 331-346.
% 
% ***********************************************************************
clear all
data0=[37.0,43.0,56.0,69.0,80.0,90.0,107.0,130.0,150.0,166.0,172.0,185.0,203.0,230.0,242.0,241.0,230.0,225.0,200.0,215.0,218.0,210.0,170.0,120.0,80.0,49.0,28.0,16.0,10.0];

wave0 = [380, 385, 390, 395, 400, 405, 410, 415, 420, 425, 430, 435, 440, 445, 450, 455, 460, 465, 470, 475, 480, 485, 490, 495, 500, 505, 510, 515, 520];

wave = ceil(wave0(1)):5:floor(wave0(end));
data = interp1(wave0,data0,wave);

fid=fopen('zeaxanthin_extinction.txt','wb');
for i=1:length(wave)
    fprintf(fid,'%d  %3.4g \n',wave(i),data(i));
end
fclose(fid);


plot(wave,data,'b-','linewidth',1.5);
set(gca,'FontSize', 14);
grid on
title('zeaxanthin','fontsize',14)
ylabel('extinction coefficient (cm^{-1}(mg/ml)^{-1})','fontsize',14);
xlabel('wavelength (nm)','fontsize',14);
xlim([min(wave),max(wave)]);
set(gcf,'PaperUnits','inches','PaperPosition',[0 0 6 5]);


print('-dpng', '-r100','zeaxanthin_extinction.png');
close 
   



