% ***********************************************************************
% fused_silica.m
% ***********************************************************************
%
% Data description:
% Real refractive index (real part) of fused silica (200-1000nm)
% This is the material that we used for the glass cuvette considered 
% in our simulations involving light interactions with human blood.
%
% Prepared by: Gladimir Baranoski on April 2019
%
% ***********************************************************************
% 
% Original data source:
%
%   W.J. Tropf and M.E. Thomas, “Properties of Crystals and Glasses” 
%   (Table 24, fused silica) in Handbook of Optics
%   (Volume IV: Optical Propertis of Materials, Nonlinear Optics, 
%   Quantum Optics), M. Bass, C.M. DeCusatis, V. Lakshminarayanan, 
%   G. Li, C. MacDonald, V.N. Mahajan and E.V. Stryland, eds., 
%   pp. 2:1–93, Optical Society of America, McGraw-Hill, Inc., New York,
%   USA, 2010. Chapter 2.
%
%   Usage range recomended by the source: 210-3710 nm.
%
%   Graph generated using Matlab 2014a
% ***********************************************************************
clear all

format long;

A = [0.6961663, 0.4079426, 0.8974794];
B = [0.0684043 0.1162414 9.896161];

% arbitrarily chosen wavelengths, selected to match the 
% the spectral resolution consider in the CLBlood simulations

wave = 300:5:1000;


fid=fopen('fused_silica.txt','wb');

for i=1:length(wave)
    
    % w2 is wavelength squared, in micrometers (not nm)
    w2 = (wave(i)/1000.0)^2;
    
    aux=0;
    for j=1:3
        aux=aux+(A(j)*w2)/(w2-B(j)^2);
    end
    data(i)=sqrt(aux+1.0);
    
    fprintf(fid,'%d  %f \n',wave(i),data(i));
end
fclose(fid);


plot(wave,data,'b-','linewidth',3);
axis([min(wave) max(wave) 1.45 1.49]);
set(gca,'FontSize', 14);
grid on
title('Fused Silica','fontsize',14)
ylabel('refractive index','fontsize',14);
xlabel('wavelength (nm)','fontsize',14);
set(gcf,'PaperUnits','inches','PaperPosition',[0 0 6 5]);
pause
print('-dpng', '-r100','fused_silica.png');
close 
   



