% ***********************************************************************
% basalt_n.m
% ***********************************************************************
%
% Data description:
% refractive index (real part) of basalt (185-2600nm), 
% Chimney Rock, New Jersey Sample
%
% Prepared by: Gladimir V. G. Baranoski on October 2013
%
% ***********************************************************************
%
% Original data source:
% 
% Chapter V: Optical Complex Index of Refraction Between 
% 0.185 and 2.5 um, Table V-16, page 87
% in
%
% Egan, W.G. and Hilgeman, T.W., "Optical Properties of Inhomogeneous
% Materials:  Applications to Geology, Astronomy, Chemistry, and
% Engineering", Academic Press, 1979
%
% ***********************************************************************
clear all;

wave = [185, 190, 200, 210, 220, 233, 260, 280, 300, 325, 355, 370, ...
    400, 433, 466, 500, 533, 566, 600, 633, 666, 700, 817, 907, ...
    1000, 1105, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, ...
    2000, 2100, 2200, 2300, 2400, 2500];

data = [1.662, 1.655, 1.658, 1.652, 1.649, 1.643, 1.644, 1.646, 1.644, ...
        1.637, 1.634, 1.627, 1.621, 1.612, 1.611, 1.613, 1.606, 1.599, ...
        1.609, 1.599, 1.597, 1.597, 1.595, 1.595, 1.593, 1.590, 1.589, ...
        1.590, 1.590, 1.590, 1.589, 1.587, 1.587, 1.588, 1.589, 1.586, ...
        1.584, 1.584, 1.584, 1.583];

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

plot(wave, data, 'b-', 'linewidth', 3);
axis([185 2500 1.580, 1.670]);
set(gca, 'FontSize', 14);
grid on;
title('Basalt', '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', 'basalt_n.png');
close;

