% ***********************************************************************
% scScattering.m
% ***********************************************************************
%
% Data description:
% The scattering intensity as a function of angle for epidermis.
%
% 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 = [17.6, 55.2, 70.9, 79.1, 84.1, 87.6, 90.3, 92.5, 94.4, 96.1, 97.6, 99.0, 100.0];
inten546 = [20.6, 60.2, 75.2, 82.3, 86.5, 89.4, 91.5, 93.4, 95.0, 96.5, 97.8, 99.0, 100.0];

fid=fopen('scScattering.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('stratum corneum 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','scScattering.png');
close 
