% ***********************************************************************
% magnetite_k.m
% ***********************************************************************
%
% Data description:
% refractive index (imaginary part) of magnetite (310-1230nm), 
% interpolated from original data (resolution of 1nm) 
%
% Prepared by: Bradley W. Kimmel on June 2009
%
% ***********************************************************************
%
% Original data source:
%
% A. Schlegel, S.F. Alvarado, and P. Wachter, Optical properties of
% magnetite (Fe3O4), Journal of Physics C: Solid State Physics,
% 12:1157-1164, 1979.
% 
% ***********************************************************************
clear all;
data = [...
	0.62361, 0.62666, 0.62970, 0.63275, 0.63579, ...
	0.63882, 0.64180, 0.64476, 0.64771, 0.65042, ...
	0.65257, 0.65472, 0.65686, 0.65901, 0.66115, ...
	0.66329, 0.66543, 0.66756, 0.66970, 0.67183, ...
	0.67396, 0.67608, 0.67821, 0.68030, 0.68180, ...
	0.68331, 0.68547, 0.68843, 0.69139, 0.69434, ...
	0.69728, 0.70023, 0.70318, 0.70613, 0.70907, ...
	0.71201, 0.71493, 0.71785, 0.72076, 0.72365, ...
	0.72649, 0.72831, 0.73003, 0.73175, 0.73347, ...
	0.73577, 0.73819, 0.74061, 0.74303, 0.74554, ...
	0.74813, 0.75072, 0.75368, 0.75697, 0.76027, ...
	0.76355, 0.76681, 0.76991, 0.77300, 0.77610, ...
	0.77918, 0.78226, 0.78534, 0.78842, 0.79149, ...
	0.79456, 0.79724, 0.79987, 0.80249, 0.80511, ...
	0.80772, 0.81033, 0.81330, 0.81675, 0.82020, ...
	0.82363, 0.82689, 0.83021, 0.83365, 0.83709, ...
	0.84052, 0.84396, 0.84738, 0.85081, 0.85423, ...
	0.85765, 0.86106, 0.86446, 0.86763, 0.87079, ...
	0.87395, 0.87710, 0.88025, 0.88340, 0.88654, ...
	0.88967, 0.89281, 0.89594, 0.89904, 0.90182, ...
	0.90461, 0.90740, 0.91051, 0.91424, 0.91798, ...
	0.92172, 0.92547, 0.92922, 0.93298, 0.93675, ...
	0.93975, 0.94213, 0.94451, 0.94688, 0.94925, ...
	0.95162, 0.95399, 0.95635, 0.95907, 0.96218, ...
	0.96528, 0.96839, 0.97206, 0.97702, 0.98199, ...
	0.98698, 0.99197, 0.99658, 1.00120, 1.00450, ...
	1.00760, 1.00880, 1.00950, 1.01020, 1.01080, ...
	1.01150, 1.01210, 1.01270, 1.01330, 1.01390, ...
	1.01460, 1.01520, 1.01580, 1.01650, 1.01710, ...
	1.01770, 1.01840, 1.01900, 1.01960, 1.02000, ...
	1.02020, 1.02050, 1.02120, 1.02190, 1.02260, ...
	1.02340, 1.02410, 1.02480, 1.02550, 1.02620, ...
	1.02690, 1.02760, 1.02830, 1.02900, 1.02970, ...
	1.03040, 1.03110, 1.03180, 1.03250, 1.03320, ...
	1.03390, 1.03460, 1.03530, 1.03600, 1.03670, ...
	1.03740, 1.03810, 1.03880, 1.03950, 1.04030, ...
	1.04120, 1.04220, 1.04310, 1.04410, 1.04500, ...
	1.04600, 1.04690, 1.04790, 1.04880, 1.04980, ...
	1.05070, 1.05160, 1.05260, 1.05350, 1.05450, ...
	1.05540, 1.05640, 1.05730, 1.05830, 1.05920, ...
	1.06010, 1.06110, 1.06200, 1.06300, 1.06390, ...
	1.06490, 1.06580, 1.06670, 1.06770, 1.06860, ...
	1.06960, 1.07050, 1.07150, 1.07240, 1.07330, ...
	1.07430, 1.07520, 1.07620, 1.07710, 1.07800, ...
	1.07900, 1.07990, 1.08090, 1.08180, 1.08290, ...
	1.08390, 1.08500, 1.08610, 1.08710, 1.08820, ...
	1.08920, 1.09030, 1.09130, 1.09240, 1.09340, ...
	1.09450, 1.09560, 1.09660, 1.09770, 1.09870, ...
	1.09980, 1.10080, 1.10190, 1.10290, 1.10400, ...
	1.10510, 1.10610, 1.10720, 1.10820, 1.10930, ...
	1.11030, 1.11140, 1.11240, 1.11350, 1.11450, ...
	1.11560, 1.11670, 1.11770, 1.11900, 1.12040, ...
	1.12170, 1.12300, 1.12430, 1.12560, 1.12700, ...
	1.12830, 1.12960, 1.13090, 1.13220, 1.13360, ...
	1.13490, 1.13620, 1.13750, 1.13880, 1.14020, ...
	1.14150, 1.14260, 1.14340, 1.14410, 1.14480, ...
	1.14560, 1.14630, 1.14700, 1.14770, 1.14850, ...
	1.14920, 1.14990, 1.15070, 1.15140, 1.15210, ...
	1.15280, 1.15360, 1.15430, 1.15500, 1.15580, ...
	1.15650, 1.15720, 1.15790, 1.15870, 1.15940, ...
	1.16010, 1.16080, 1.16160, 1.16230, 1.16300, ...
	1.16370, 1.16450, 1.16520, 1.16590, 1.16670, ...
	1.16750, 1.16840, 1.16920, 1.17010, 1.17090, ...
	1.17170, 1.17260, 1.17340, 1.17430, 1.17510, ...
	1.17590, 1.17670, 1.17750, 1.17820, 1.17900, ...
	1.17970, 1.18050, 1.18120, 1.18200, 1.18270, ...
	1.18350, 1.18420, 1.18490, 1.18570, 1.18640, ...
	1.18720, 1.18790, 1.18870, 1.18940, 1.19020, ...
	1.19090, 1.19200, 1.19300, 1.19410, 1.19520, ...
	1.19630, 1.19740, 1.19840, 1.19950, 1.20060, ...
	1.20170, 1.20280, 1.20390, 1.20490, 1.20600, ...
	1.20710, 1.20820, 1.20930, 1.21030, 1.21130, ...
	1.21210, 1.21290, 1.21370, 1.21450, 1.21530, ...
	1.21620, 1.21730, 1.21830, 1.21940, 1.22040, ...
	1.22150, 1.22260, 1.22360, 1.22470, 1.22580, ...
	1.22680, 1.22790, 1.22900, 1.23000, 1.23110, ...
	1.23220, 1.23320, 1.23430, 1.23540, 1.23640, ...
	1.23750, 1.23860, 1.23970, 1.24080, 1.24180, ...
	1.24290, 1.24400, 1.24500, 1.24590, 1.24680, ...
	1.24770, 1.24850, 1.24940, 1.25030, 1.25120, ...
	1.25210, 1.25300, 1.25390, 1.25480, 1.25570, ...
	1.25660, 1.25750, 1.25840, 1.25880, 1.25930, ...
	1.25970, 1.26020, 1.26070, 1.26110, 1.26160, ...
	1.26200, 1.26250, 1.26290, 1.26340, 1.26390, ...
	1.26430, 1.26470, 1.26490, 1.26520, 1.26540, ...
	1.26560, 1.26590, 1.26610, 1.26630, 1.26660, ...
	1.26680, 1.26700, 1.26730, 1.26750, 1.26780, ...
	1.26800, 1.26820, 1.26850, 1.26870, 1.26890, ...
	1.26920, 1.26940, 1.26970, 1.26990, 1.27010, ...
	1.27040, 1.27060, 1.27090, 1.27110, 1.27130, ...
	1.27160, 1.27180, 1.27200, 1.27230, 1.27250, ...
	1.27280, 1.27300, 1.27330, 1.27350, 1.27370, ...
	1.27400, 1.27420, 1.27450, 1.27470, 1.27490, ...
	1.27520, 1.27540, 1.27570, 1.27590, 1.27620, ...
	1.27640, 1.27660, 1.27690, 1.27710, 1.27740, ...
	1.27760, 1.27790, 1.27810, 1.27750, 1.27690, ...
	1.27630, 1.27570, 1.27510, 1.27450, 1.27400, ...
	1.27340, 1.27280, 1.27220, 1.27160, 1.27100, ...
	1.27040, 1.26980, 1.26920, 1.26870, 1.26820, ...
	1.26790, 1.26760, 1.26740, 1.26710, 1.26680, ...
	1.26650, 1.26620, 1.26590, 1.26570, 1.26540, ...
	1.26510, 1.26480, 1.26450, 1.26420, 1.26400, ...
	1.26370, 1.26340, 1.26310, 1.26280, 1.26260, ...
	1.26230, 1.26200, 1.26160, 1.26110, 1.26060, ...
	1.26010, 1.25970, 1.25920, 1.25870, 1.25820, ...
	1.25770, 1.25730, 1.25680, 1.25630, 1.25580, ...
	1.25540, 1.25490, 1.25440, 1.25390, 1.25340, ...
	1.25300, 1.25250, 1.25200, 1.25150, 1.25100, ...
	1.25060, 1.25010, 1.24960, 1.24910, 1.24870, ...
	1.24820, 1.24770, 1.24720, 1.24670, 1.24590, ...
	1.24500, 1.24410, 1.24320, 1.24230, 1.24140, ...
	1.24050, 1.23950, 1.23860, 1.23770, 1.23680, ...
	1.23590, 1.23500, 1.23400, 1.23310, 1.23220, ...
	1.23130, 1.23040, 1.22940, 1.22850, 1.22760, ...
	1.22670, 1.22580, 1.22500, 1.22430, 1.22350, ...
	1.22280, 1.22200, 1.22130, 1.22050, 1.21980, ...
	1.21900, 1.21830, 1.21750, 1.21680, 1.21610, ...
	1.21530, 1.21460, 1.21380, 1.21310, 1.21230, ...
	1.21160, 1.21080, 1.21000, 1.20900, 1.20800, ...
	1.20690, 1.20590, 1.20480, 1.20380, 1.20280, ...
	1.20170, 1.20070, 1.19970, 1.19860, 1.19760, ...
	1.19650, 1.19550, 1.19450, 1.19340, 1.19240, ...
	1.19130, 1.19030, 1.18930, 1.18820, 1.18720, ...
	1.18610, 1.18510, 1.18400, 1.18300, 1.18200, ...
	1.18090, 1.17990, 1.17880, 1.17780, 1.17670, ...
	1.17570, 1.17460, 1.17360, 1.17260, 1.17150, ...
	1.17050, 1.16930, 1.16820, 1.16710, 1.16600, ...
	1.16490, 1.16380, 1.16270, 1.16160, 1.16040, ...
	1.15930, 1.15820, 1.15710, 1.15600, 1.15490, ...
	1.15380, 1.15260, 1.15150, 1.15040, 1.14930, ...
	1.14820, 1.14710, 1.14600, 1.14480, 1.14370, ...
	1.14260, 1.14150, 1.14040, 1.13920, 1.13810, ...
	1.13700, 1.13590, 1.13480, 1.13370, 1.13250, ...
	1.13140, 1.13030, 1.12920, 1.12800, 1.12700, ...
	1.12620, 1.12540, 1.12460, 1.12380, 1.12300, ...
	1.12220, 1.12140, 1.12070, 1.11990, 1.11910, ...
	1.11830, 1.11750, 1.11670, 1.11580, 1.11490, ...
	1.11400, 1.11310, 1.11220, 1.11130, 1.11040, ...
	1.10940, 1.10850, 1.10760, 1.10670, 1.10580, ...
	1.10490, 1.10400, 1.10310, 1.10220, 1.10130, ...
	1.10040, 1.09950, 1.09850, 1.09760, 1.09670, ...
	1.09580, 1.09490, 1.09400, 1.09310, 1.09220, ...
	1.09130, 1.09040, 1.08950, 1.08860, 1.08770, ...
	1.08680, 1.08580, 1.08490, 1.08400, 1.08310, ...
	1.08220, 1.08130, 1.08040, 1.07950, 1.07860, ...
	1.07770, 1.07680, 1.07590, 1.07500, 1.07410, ...
	1.07320, 1.07230, 1.07140, 1.07050, 1.06960, ...
	1.06870, 1.06780, 1.06690, 1.06600, 1.06510, ...
	1.06420, 1.06320, 1.06230, 1.06140, 1.06050, ...
	1.05950, 1.05860, 1.05770, 1.05680, 1.05580, ...
	1.05490, 1.05400, 1.05310, 1.05210, 1.05120, ...
	1.05030, 1.04940, 1.04850, 1.04750, 1.04660, ...
	1.04570, 1.04480, 1.04380, 1.04290, 1.04200, ...
	1.04140, 1.04080, 1.04020, 1.03960, 1.03900, ...
	1.03840, 1.03780, 1.03720, 1.03660, 1.03600, ...
	1.03540, 1.03480, 1.03410, 1.03350, 1.03290, ...
	1.03230, 1.03170, 1.03110, 1.03050, 1.02990, ...
	1.02930, 1.02870, 1.02810, 1.02750, 1.02690, ...
	1.02630, 1.02570, 1.02510, 1.02450, 1.02390, ...
	1.02330, 1.02270, 1.02210, 1.02150, 1.02090, ...
	1.02030, 1.01970, 1.01910, 1.01850, 1.01790, ...
	1.01730, 1.01670, 1.01610, 1.01550, 1.01500, ...
	1.01440, 1.01380, 1.01320, 1.01260, 1.01200, ...
	1.01140, 1.01080, 1.01020, 1.00960, 1.00900, ...
	1.00840, 1.00780, 1.00720, 1.00660, 1.00600, ...
	1.00530, 1.00470, 1.00410, 1.00350, 1.00280, ...
	1.00220, 1.00160, 1.00100, 1.00030, 0.99972, ...
	0.99910, 0.99848, 0.99786, 0.99724, 0.99663, ...
	0.99601, 0.99539, 0.99477, 0.99415, 0.99354, ...
	0.99292, 0.99230, 0.99169, 0.99107, 0.99046, ...
	0.98984, 0.98923, 0.98862, 0.98800, 0.98739, ...
	0.98678, 0.98616, 0.98555, 0.98494, 0.98433, ...
	0.98372, 0.98311, 0.98250, 0.98189, 0.98128, ...
	0.98067, 0.98006, 0.97945, 0.97885, 0.97824, ...
	0.97763, 0.97703, 0.97642, 0.97581, 0.97521, ...
	0.97460, 0.97400, 0.97340, 0.97279, 0.97219, ...
	0.97159, 0.97098, 0.97038, 0.96978, 0.96918, ...
	0.96858, 0.96798, 0.96738, 0.96678, 0.96618, ...
	0.96558, 0.96498, 0.96438, 0.96378, 0.96318, ...
	0.96259, 0.96199, 0.96139, 0.96080, 0.96020, ...
	0.95961, 0.95901, 0.95842, 0.95782, 0.95723, ...
	0.95664, 0.95604, 0.95545, 0.95486, 0.95427, ...
	0.95368, 0.95308, 0.95249, 0.95190, 0.95131, ...
	0.95072, 0.95014, 0.94955, 0.94896, 0.94837, ...
	0.94778 ...
];

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

plot(wave, data, 'b-', 'linewidth', 3);
axis([310 1230 0.5 1.3]);
set(gca, 'FontSize', 14);
grid on;
title('Magnetite', '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', 'magnetite_k.png');
close;

