% ***********************************************************************
% lipid_absorption.m
% ***********************************************************************
%
% Data description:
% The absorption coefficient of lipid in [cm^-1] (429-2445nm), with a
% resolution of 5nm.
%
% Prepared by: Tenn Francis Chen on March 2011
%
% ***********************************************************************
%
% Original data source:
% 
%      429-1098 nm
%      R.L.P. van Veen and H.J.C.M. Sterenborg, A. Pifferi, A.
%      Torricelli and R. Cubeddu,"Determination of VIS- NIR absorption
%      coefficients of mammalian fat, with time and spatially resolved
%      diffuse reflectance and transmission spectroscopy,"
%      OSA Annual BIOMED Topical Meeting, 2004.
%      Acquired by Oregon Medical Laser Center
%      http://omlc.ogi.edu/spectra/fat/
%
%      1110.2-2449.5 nm
%      Altshuler, Anderson and Manstein, "Method and apparatus for the
%      selective targeting of lipid-rich tissue,"
%      United States Patent, Patent No. 6,605,080 B1, August 12, 2003.
%
% ***********************************************************************
clear all
data0=[0.08280, 0.08216, 0.08158, 0.08069, 0.07927, 0.07832, 0.07721, 0.07652, 0.07623, 0.07560, 0.07474, 0.07383, 0.07244, 0.07104, 0.07000, 0.06899, 0.06811, 0.06729, 0.06659, 0.06571, 0.06464, 0.06375, 0.06291, 0.06210, 0.06135, 0.06049, 0.05950, 0.05837, 0.05751, 0.05663, 0.05593, 0.05523, 0.05413, 0.05288, 0.05144, 0.04985, 0.04846, 0.04720, 0.04594, 0.04513, 0.04434, 0.04327, 0.04208, 0.04084, 0.03961, 0.03843, 0.03732, 0.03635, 0.03534, 0.03452, 0.03386, 0.03315, 0.03261, 0.03192, 0.03109, 0.03013, 0.02919, 0.02832, 0.02750, 0.02676, 0.02597, 0.02515, 0.02437, 0.02368, 0.02298, 0.02250, 0.02193, 0.02124, 0.02060, 0.01998, 0.01942, 0.01906, 0.01875, 0.01828, 0.01776, 0.01724, 0.01683, 0.01648, 0.01620, 0.01576, 0.01534, 0.01501, 0.01475, 0.01457, 0.01432, 0.01403, 0.01368, 0.01330, 0.01298, 0.01270, 0.01246, 0.01231, 0.01211, 0.01189, 0.01165, 0.01145, 0.01132, 0.01113, 0.01091, 0.01064, 0.01042, 0.01031, 0.01017, 0.01002, 0.00991, 0.00984, 0.00978, 0.00970, 0.00951, 0.00929, 0.00913, 0.00896, 0.00880, 0.00864, 0.00849, 0.00840, 0.00833, 0.00828, 0.00822, 0.00805, 0.00785, 0.00773, 0.00763, 0.00760, 0.00757, 0.00746, 0.00733, 0.00724, 0.00718, 0.00710, 0.00704, 0.00698, 0.00690, 0.00682, 0.00673, 0.00662, 0.00653, 0.00647, 0.00641, 0.00636, 0.00630, 0.00629, 0.00633, 0.00639, 0.00632, 0.00613, 0.00589, 0.00573, 0.00562, 0.00563, 0.00566, 0.00566, 0.00564, 0.00562, 0.00562, 0.00557, 0.00548, 0.00541, 0.00530, 0.00520, 0.00512, 0.00502, 0.00493, 0.00488, 0.00485, 0.00486, 0.00487, 0.00479, 0.00472, 0.00467, 0.00462, 0.00466, 0.00471, 0.00479, 0.00487, 0.00487, 0.00484, 0.00480, 0.00475, 0.00470, 0.00469, 0.00464, 0.00458, 0.00454, 0.00442, 0.00427, 0.00422, 0.00423, 0.00430, 0.00437, 0.00435, 0.00430, 0.00425, 0.00433, 0.00440, 0.00438, 0.00432, 0.00426, 0.00424, 0.00426, 0.00428, 0.00428, 0.00429, 0.00437, 0.00444, 0.00440, 0.00431, 0.00420, 0.00422, 0.00433, 0.00446, 0.00452, 0.00450, 0.00449, 0.00453, 0.00460, 0.00465, 0.00464, 0.00464, 0.00464, 0.00465, 0.00471, 0.00472, 0.00467, 0.00464, 0.00457, 0.00448, 0.00438, 0.00428, 0.00424, 0.00422, 0.00418, 0.00414, 0.00413, 0.00414, 0.00419, 0.00428, 0.00439, 0.00447, 0.00452, 0.00453, 0.00450, 0.00452, 0.00457, 0.00462, 0.00463, 0.00457, 0.00446, 0.00433, 0.00422, 0.00413, 0.00406, 0.00398, 0.00387, 0.00375, 0.00370, 0.00369, 0.00366, 0.00361, 0.00354, 0.00348, 0.00342, 0.00338, 0.00335, 0.00331, 0.00328, 0.00324, 0.00321, 0.00324, 0.00327, 0.00325, 0.00323, 0.00320, 0.00319, 0.00322, 0.00326, 0.00323, 0.00318, 0.00313, 0.00310, 0.00311, 0.00315, 0.00320, 0.00321, 0.00320, 0.00321, 0.00326, 0.00334, 0.00343, 0.00351, 0.00358, 0.00367, 0.00376, 0.00383, 0.00390, 0.00401, 0.00415, 0.00430, 0.00447, 0.00463, 0.00480, 0.00499, 0.00516, 0.00535, 0.00552, 0.00564, 0.00576, 0.00589, 0.00600, 0.00616, 0.00636, 0.00654, 0.00680, 0.00707, 0.00735, 0.00768, 0.00801, 0.00837, 0.00874, 0.00908, 0.00941, 0.00972, 0.01001, 0.01030, 0.01059, 0.01089, 0.01120, 0.01155, 0.01190, 0.01227, 0.01258, 0.01278, 0.01289, 0.01290, 0.01273, 0.01249, 0.01206, 0.01153, 0.01089, 0.01021, 0.00948, 0.00871, 0.00793, 0.00719, 0.00653, 0.00596, 0.00553, 0.00515, 0.00481, 0.00451, 0.00426, 0.00409, 0.00391, 0.00378, 0.00366, 0.00360, 0.00357, 0.00355, 0.00353, 0.00349, 0.00346, 0.00346, 0.00347, 0.00347, 0.00347, 0.00352, 0.00359, 0.00369, 0.00379, 0.00387, 0.00393, 0.00403, 0.00413, 0.00424, 0.00434, 0.00442, 0.00454, 0.00467, 0.00482, 0.00497, 0.00511, 0.00527, 0.00547, 0.00567, 0.00583, 0.00594, 0.00603, 0.00615, 0.00633, 0.00654, 0.00674, 0.00691, 0.00708, 0.00724, 0.00740, 0.00758, 0.00775, 0.00786, 0.00796, 0.00799, 0.00802, 0.00803, 0.00803, 0.00801, 0.00794, 0.00785, 0.00775, 0.00764, 0.00757, 0.00751, 0.00739, 0.00726, 0.00715, 0.00703, 0.00692, 0.00685, 0.00678, 0.00669, 0.00661, 0.00651, 0.00643, 0.00637, 0.00633, 0.00632, 0.00631, 0.00633, 0.00639, 0.00647, 0.00656, 0.00662, 0.00666, 0.00674, 0.00680, 0.00690, 0.00705, 0.00724, 0.00751, 0.00786, 0.00822, 0.00860, 0.00899, 0.00938, 0.00979, 0.01022, 0.01074, 0.01133, 0.01198, 0.01264, 0.01345, 0.01430, 0.01527, 0.01636, 0.01752, 0.01867, 0.01992, 0.02121, 0.02262, 0.02414, 0.02581, 0.02754, 0.02932, 0.03116, 0.03305, 0.03491, 0.03674, 0.03833, 0.03983, 0.04121, 0.04256, 0.04384, 0.04506, 0.04633, 0.04766, 0.04915, 0.05078, 0.05267, 0.05472, 0.05721, 0.05994, 0.06316, 0.06663, 0.07046, 0.07438, 0.07837, 0.08234, 0.08621, 0.08994, 0.09354, 0.09683, 0.1000, 0.1032, 0.1065, 0.1099, 0.1133, 0.1167, 0.1200, 0.1231, 0.1260, 0.1282, 0.1299, 0.1307, 0.1310, 0.1299, 0.1283, 0.1253, 0.1218, 0.1175, 0.1126, 0.1070, 0.1008, 0.09433, 0.08754, 0.08088, 0.07446, 0.06822, 0.06250, 0.05704, 0.05234, 0.04802, 0.04445, 0.04109, 0.03799, 0.03519, 0.03274, 0.03046, 0.02852, 0.02666, 0.02504, 0.02358, 0.02242, 0.02133, 0.02047, 0.01975, 0.01917, 0.01860, 0.01808, 0.01753, 0.01693, 0.01639, 0.01589, 0.01554, 0.01528, 0.01510, 0.01491, 0.01463, 0.01431, 0.01413, 0.01408, 0.01414, 0.01421, 0.01423, 0.01417, 0.01407, 0.01406, 0.01420, 0.01441, 0.01481, 0.01524, 0.01564, 0.01607, 0.01652, 0.01716, 0.01793, 0.01891, 0.01994, 0.02087, 0.02178, 0.02272, 0.02366, 0.02464, 0.02560, 0.02654, 0.02751, 0.02870, 0.02996, 0.03136, 0.03282, 0.03430, 0.03579, 0.03735, 0.03894, 0.04057, 0.04222, 0.04388, 0.04554, 0.04722, 0.04877, 0.05024, 0.05152, 0.05279, 0.05386, 0.05481, 0.05561, 0.05631, 0.05683, 0.05734, 0.05790, 0.05857, 0.05948, 0.06050, 0.06164, 0.06274, 0.06389, 0.06503, 0.06610, 0.06717, 0.06799, 0.06871, 0.06926, 0.06970, 0.07004, 0.07029, 0.07018, 0.06998, 0.06967, 0.06904, 0.06850, 0.06792, 0.06719, 0.06662, 0.06596, 0.06504, 0.06419, 0.06348, 0.06281, 0.06212, 0.06139, 0.06045, 0.05948, 0.05867, 0.05789, 0.05705, 0.05616, 0.05534, 0.05445, 0.05364, 0.05303, 0.05259, 0.05224, 0.05180, 0.05121, 0.05065, 0.05032, 0.05025, 0.05015, 0.05005, 0.04947, 0.04878, 0.04851, 0.04841, 0.04816, 0.04811, 0.04813, 0.04798, 0.04816, 0.04804, 0.04763, 0.04755, 0.04762, 0.04771, 0.04797, 0.04801, 0.04780, 0.04783, 0.04783, 0.04790, 0.04837, 0.04876, 0.04892, 0.04911,0.0134, 0.0692, 0.0802, 0.5788, 0.7450, 1.4911, 1.6564, 0.2832, 0.1301, 0.1274, 0.0610, 0.0737, 0.0737, 0.2110, 0.4312, 1.1109, 0.9389, 1.1345, 0.4593, 0.3964, 0.2953, 0.2549, 0.2603, 0.2247, 0.1710, 0.1605, 0.1639, 0.1539, 0.3722, 1.0878, 8.7225, 10.5398, 5.4919, 7.2185, 4.0914, 2.8021, 1.9191, 2.2235, 1.4911, 2.2707, 1.9191, 2.1772, 1.8792, 1.6916, 2.0016, 1.7643, 1.8401, 1.6220, 1.8018, 1.4601, 3.1789, 2.2707, 2.2707, 1.8401, 2.1772, 4.2671, 45.9304, 27.7282, 45.9304, 32.1255, 34.2174, 31.4570, 25.4913];

wave0 = [429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098,1110.2, 1125.5, 1140.8, 1167.6, 1179.1, 1202.0, 1209.7, 1248.0, 1270.9, 1282.4, 1316.8, 1332.1, 1343.6, 1358.9, 1370.4, 1389.5, 1401.0, 1416.3, 1466.1, 1481.4, 1492.9, 1515.8, 1523.5, 1546.4, 1554.1, 1561.7, 1584.7, 1596.2, 1649.7, 1680.4, 1703.3, 1730.1, 1745.4, 1760.7, 1783.7, 1837.2, 1856.4, 1875.5, 1883.2, 1906.1, 1917.6, 1932.9, 1971.2, 1975.0, 2005.6, 2020.9, 2032.4, 2047.7, 2059.2, 2074.5, 2131.9, 2166.3, 2174.0, 2200.8, 2216.1, 2235.2, 2300.3, 2315.6, 2342.3, 2357.7, 2365.3, 2399.7, 2449.5];

wave = 430:5:floor(wave0(end));
data = interp1(wave0,data0,wave);

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


plot(wave,data,'b-','linewidth',1.5);
set(gca,'FontSize', 14);
grid on
title('lipid','fontsize',14)
ylabel('absorption coefficient (cm^{-1})','fontsize',14);
xlabel('wavelength (nm)','fontsize',14);
xlim([min(wave),max(wave)]);
set(gcf,'PaperUnits','inches','PaperPosition',[0 0 6 5]);

pause
print('-dpng', '-r100','lipid_absorption.png');
close 
   



