% ***********************************************************************
% water2_k.m
% ***********************************************************************
%
% Data description:
% refractive index (imaginary part) of water (200-2500nm), 
% linearly interpolated from original data (resolution of 5nm) 
%
% Prepared by: Bradley W. Kimmel on October 2013
%
% ***********************************************************************
%
% Original data source:
% 
% G.M. Hale and M.R. Querry, Optical Constants of Water in the 200-nm to
% 200-um Wavelength Region, Applied Optics, Vol. 12, No. 3, pp 555-563,
% March 1973.
%
% ***********************************************************************
clear all
data=[
1.1000e-07 
9.7800e-08 
8.5600e-08 
7.3400e-08 
6.1200e-08 
4.9000e-08 
4.5900e-08 
4.2800e-08 
3.9700e-08 
3.6600e-08 
3.3500e-08 
3.1500e-08 
2.9500e-08 
2.7500e-08 
2.5500e-08 
2.3500e-08 
2.2000e-08 
2.0500e-08 
1.9000e-08 
1.7500e-08 
1.6000e-08 
1.4960e-08 
1.3920e-08 
1.2880e-08 
1.1840e-08 
1.0800e-08 
9.9400e-09 
9.0800e-09 
8.2200e-09 
7.3600e-09 
6.5000e-09 
5.9000e-09 
5.3000e-09 
4.7000e-09 
4.1000e-09 
3.5000e-09 
3.1720e-09 
2.8440e-09 
2.5160e-09 
2.1880e-09 
1.8600e-09 
1.7480e-09 
1.6360e-09 
1.5240e-09 
1.4120e-09 
1.3000e-09 
1.2440e-09 
1.1880e-09 
1.1320e-09 
1.0760e-09 
1.0200e-09 
1.0030e-09 
9.8600e-10 
9.6900e-10 
9.5200e-10 
9.3500e-10 
9.4800e-10 
9.6100e-10 
9.7400e-10 
9.8700e-10 
1.0000e-09 
1.0640e-09 
1.1280e-09 
1.1920e-09 
1.2560e-09 
1.3200e-09 
1.4480e-09 
1.5760e-09 
1.7040e-09 
1.8320e-09 
1.9600e-09 
2.2880e-09 
2.6160e-09 
2.9440e-09 
3.2720e-09 
3.6000e-09 
5.0600e-09 
6.5200e-09 
7.9800e-09 
9.4400e-09 
1.0900e-08 
1.1500e-08 
1.2100e-08 
1.2700e-08 
1.3300e-08 
1.3900e-08 
1.4400e-08 
1.4900e-08 
1.5400e-08 
1.5900e-08 
1.6400e-08 
1.7580e-08 
1.8760e-08 
1.9940e-08 
2.1120e-08 
2.2300e-08 
2.4540e-08 
2.6780e-08 
2.9020e-08 
3.1260e-08 
3.3500e-08 
4.5100e-08 
5.6700e-08 
6.8300e-08 
7.9900e-08 
9.1500e-08 
7.6320e-08 
6.1140e-08 
4.5960e-08 
3.0780e-08 
1.5600e-08 
4.2080e-08 
6.8560e-08 
9.5040e-08 
1.2152e-07 
1.4800e-07 
1.4340e-07 
1.3880e-07 
1.3420e-07 
1.2960e-07 
1.2500e-07 
1.3640e-07 
1.4780e-07 
1.5920e-07 
1.7060e-07 
1.8200e-07 
2.0420e-07 
2.2640e-07 
2.4860e-07 
2.7080e-07 
2.9300e-07 
3.1260e-07 
3.3220e-07 
3.5180e-07 
3.7140e-07 
3.9100e-07 
4.1000e-07 
4.2900e-07 
4.4800e-07 
4.6700e-07 
4.8600e-07 
6.0080e-07 
7.1560e-07 
8.3040e-07 
9.4520e-07 
1.0600e-06 
1.4340e-06 
1.8080e-06 
2.1820e-06 
2.5560e-06 
2.9300e-06 
3.0400e-06 
3.1500e-06 
3.2600e-06 
3.3700e-06 
3.4800e-06 
3.3620e-06 
3.2440e-06 
3.1260e-06 
3.0080e-06 
2.8900e-06 
3.0650e-06 
3.2400e-06 
3.4150e-06 
3.5900e-06 
3.7650e-06 
3.9400e-06 
4.1150e-06 
4.2900e-06 
4.4650e-06 
4.6400e-06 
4.8150e-06 
4.9900e-06 
5.1650e-06 
5.3400e-06 
5.5150e-06 
5.6900e-06 
5.8650e-06 
6.0400e-06 
6.2150e-06 
6.3900e-06 
6.5650e-06 
6.7400e-06 
6.9150e-06 
7.0900e-06 
7.2650e-06 
7.4400e-06 
7.6150e-06 
7.7900e-06 
7.9650e-06 
8.1400e-06 
8.3150e-06 
8.4900e-06 
8.6650e-06 
8.8400e-06 
9.0150e-06 
9.1900e-06 
9.3650e-06 
9.5400e-06 
9.7150e-06 
9.8900e-06 
1.3093e-05 
1.6296e-05 
1.9498e-05 
2.2701e-05 
2.5904e-05 
2.9106e-05 
3.2309e-05 
3.5512e-05 
3.8715e-05 
4.1917e-05 
4.5120e-05 
4.8323e-05 
5.1526e-05 
5.4728e-05 
5.7931e-05 
6.1134e-05 
6.4337e-05 
6.7539e-05 
7.0742e-05 
7.3945e-05 
7.7148e-05 
8.0351e-05 
8.3553e-05 
8.6756e-05 
8.9959e-05 
9.3162e-05 
9.6364e-05 
9.9567e-05 
1.0277e-04 
1.0597e-04 
1.0918e-04 
1.1238e-04 
1.1558e-04 
1.1878e-04 
1.2199e-04 
1.2519e-04 
1.2839e-04 
1.3159e-04 
1.3480e-04 
1.3800e-04 
1.3669e-04 
1.3537e-04 
1.3406e-04 
1.3275e-04 
1.3144e-04 
1.3013e-04 
1.2881e-04 
1.2750e-04 
1.2619e-04 
1.2487e-04 
1.2356e-04 
1.2225e-04 
1.2094e-04 
1.1962e-04 
1.1831e-04 
1.1700e-04 
1.1569e-04 
1.1438e-04 
1.1306e-04 
1.1175e-04 
1.1044e-04 
1.0912e-04 
1.0781e-04 
1.0650e-04 
1.0519e-04 
1.0387e-04 
1.0256e-04 
1.0125e-04 
9.9938e-05 
9.8625e-05 
9.7313e-05 
9.6000e-05 
9.4688e-05 
9.3375e-05 
9.2062e-05 
9.0750e-05 
8.9437e-05 
8.8125e-05 
8.6813e-05 
8.5500e-05 
8.6238e-05 
8.6975e-05 
8.7713e-05 
8.8450e-05 
8.9188e-05 
8.9925e-05 
9.0663e-05 
9.1400e-05 
9.2138e-05 
9.2875e-05 
9.3613e-05 
9.4350e-05 
9.5088e-05 
9.5825e-05 
9.6563e-05 
9.7300e-05 
9.8038e-05 
9.8775e-05 
9.9512e-05 
1.0025e-04 
1.0099e-04 
1.0173e-04 
1.0246e-04 
1.0320e-04 
1.0394e-04 
1.0468e-04 
1.0541e-04 
1.0615e-04 
1.0689e-04 
1.0763e-04 
1.0836e-04 
1.0910e-04 
1.0984e-04 
1.1058e-04 
1.1131e-04 
1.1205e-04 
1.1279e-04 
1.1353e-04 
1.1426e-04 
1.1500e-04 
1.3962e-04 
1.6425e-04 
1.8887e-04 
2.1350e-04 
2.3813e-04 
2.6275e-04 
2.8737e-04 
3.1200e-04 
3.3663e-04 
3.6125e-04 
3.8588e-04 
4.1050e-04 
4.3512e-04 
4.5975e-04 
4.8437e-04 
5.0900e-04 
5.3363e-04 
5.5825e-04 
5.8287e-04 
6.0750e-04 
6.3212e-04 
6.5675e-04 
6.8137e-04 
7.0600e-04 
7.3062e-04 
7.5525e-04 
7.7987e-04 
8.0450e-04 
8.2912e-04 
8.5375e-04 
8.7838e-04 
9.0300e-04 
9.2762e-04 
9.5225e-04 
9.7688e-04 
1.0015e-03 
1.0261e-03 
1.0508e-03 
1.0754e-03 
1.1000e-03 
1.0797e-03 
1.0594e-03 
1.0392e-03 
1.0189e-03 
9.9862e-04 
9.7835e-04 
9.5808e-04 
9.3780e-04 
9.1752e-04 
8.9725e-04 
8.7697e-04 
8.5670e-04 
8.3643e-04 
8.1615e-04 
7.9588e-04 
7.7560e-04 
7.5533e-04 
7.3505e-04 
7.1478e-04 
6.9450e-04 
6.7422e-04 
6.5395e-04 
6.3367e-04 
6.1340e-04 
5.9313e-04 
5.7285e-04 
5.5257e-04 
5.3230e-04 
5.1203e-04 
4.9175e-04 
4.7147e-04 
4.5120e-04 
4.3093e-04 
4.1065e-04 
3.9037e-04 
3.7010e-04 
3.4982e-04 
3.2955e-04 
3.0928e-04 
2.8900e-04 
3.0567e-04 
3.2235e-04 
3.3902e-04 
3.5570e-04 
3.7237e-04 
3.8905e-04 
4.0573e-04 
4.2240e-04 
4.3908e-04 
4.5575e-04 
4.7243e-04 
4.8910e-04 
5.0577e-04 
5.2245e-04 
5.3912e-04 
5.5580e-04 
5.7248e-04 
5.8915e-04 
6.0582e-04 
6.2250e-04 
6.3918e-04 
6.5585e-04 
6.7252e-04 
6.8920e-04 
7.0588e-04 
7.2255e-04 
7.3923e-04 
7.5590e-04 
7.7257e-04 
7.8925e-04 
8.0593e-04 
8.2260e-04 
8.3928e-04 
8.5595e-04 
8.7263e-04 
8.8930e-04 
9.0598e-04 
9.2265e-04 
9.3932e-04 
9.5600e-04 
1.0114e-03 
1.0667e-03 
1.1221e-03 
1.1774e-03 
1.2327e-03 
1.2881e-03 
1.3434e-03 
1.3988e-03 
1.4541e-03 
1.5095e-03 
1.5649e-03 
1.6202e-03 
1.6756e-03 
1.7309e-03 
1.7863e-03 
1.8416e-03 
1.8969e-03 
1.9523e-03 
2.0076e-03 
2.0630e-03 
];

fid=fopen('ecW2.txt','wb');
for i=1:461
    wave(i)=195+i*5;
    fprintf(fid,'%d  %3.4e \n',wave(i),data(i));
end
fclose(fid);


semilogy(wave,data,'b-','linewidth',3);
axis([200 2500 1e-10 1e-0]);
set(gca,'FontSize', 14);
grid on
title('Water','fontsize',14)
ylabel('extinction coefficient','fontsize',14);
xlabel('wavelength (nm)','fontsize',14);
set(gcf,'PaperUnits','inches','PaperPosition',[0 0 6 5]);
pause
print('-dpng', '-r100','water2_k.png');
close 
   




