% ***********************************************************************
% epScattering.m
% ***********************************************************************
%
% Data description:
% The scattering intensity as a function of angle for stratum corneum.
%
% Prepared by: Tenn Francis Chen and Gladimir Baranoski on March 2011
%
% ***********************************************************************
%
% Original data source:
% 
%      Bruls and van der Leun, "Forward scattering properties of human
%      epidermal layers," Photochemistry and Photobiology Vol. 40, No. 2,
%      pp. 231 - 242, 1984.
%
% ***********************************************************************
clear all
angles =   [2.5, 7.5, 12.5, 17.5, 22.5, 27.5, 32.5, 37.5, 42.5, 47.5, 52.5, 57.5, 62.5];
inten436 = [2.6, 16.1, 30.8, 43.6, 54.5, 63.9, 71.9, 79.0, 85.0, 90.1, 94.3, 97.8, 100.0];
inten546 = [4.0, 22.5, 39.7, 52.5, 62.4, 70.2, 76.7, 82.4, 87.2, 91.4, 94.9, 97.9, 100.0];

fid=fopen('epScattering.txt','wb');
for i=1:length(angles)
    fprintf(fid,'%3.4g  %3.4g %3.4g \n',angles(i),inten436(i),inten546(i));
end
fclose(fid);

hold off
plot(angles,inten436,'b*-','linewidth',1.5);
hold on;
plot(angles,inten546,'b*:','linewidth',1.5);
set(gca,'FontSize', 14);
grid on
title('epidermis scattering profile','fontsize',14)
ylabel('cumulative fraction of radiation (%)','fontsize',14);
xlabel('scattering angle (degrees)','fontsize',14);
xlim([min(angles),max(angles)]);
legend('436 nm','546 nm','location','SouthEast');
set(gcf,'PaperUnits','inches','PaperPosition',[0 0 6 5]);
pause
print('-dpng', '-r100','epScattering.png');
close 
