Commit 8441320a authored by Meryem Ayse Yucel's avatar Meryem Ayse Yucel
Browse files

Fix on GetExtinctions

Fixed the default Hemoglobin spectrum to be clear that it comes from Wray. And fixed the "Prahl" spectrum to be pure "Prahl" and not be corrupted by Wray from 650 to 900nm. - DAB
parent b9b3daca
Loading
Loading
Loading
Loading
+287 −127
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ num_lambda = length(lambda);


if ~exist('WhichSpectrum')
    WhichSpectrum=1;
    WhichSpectrum=0;
end


@@ -132,6 +132,166 @@ switch(WhichSpectrum)
    %**************************************************************************
    %**************************************************************************

    case 0
        Citation=sprintf('%s\n%s','Wray, S., Cope, M., Delpy, D., Wyatt, J., Reynolds, E. (1988). Characterization of the near infrared absorption spectra of cytochrome aa3 and haemoglobin for the non-invasive monitoring of cerebral oxygenation Biochimica et Biophysica Acta (BBA) - Bioenergetics  933(1), 184-192. https://dx.doi.org/10.1016/0005-2728(88)90069-2');

        % These values for the molar extinction coefficient e in
        % [cm-1/(moles/liter)] come from
        %
        % Wray, S., Cope, M., Delpy, D., Wyatt, J., Reynolds, E. (1988). 
        % Characterization of the near infrared absorption spectra of cytochrome aa3 and 
        % haemoglobin for the non-invasive monitoring of cerebral oxygenation Biochimica et Biophysica Acta (BBA) - 
        % Bioenergetics  933(1), 184-192. https://dx.doi.org/10.1016/0005-2728(88)90069-2
        %
        % To convert this data to absorbance A, multiply by the molar concentration and the pathlength. For example, if x is the number of grams per liter and a 1 cm cuvette is being used, then the absorbance is given by
        %
        %        (e) [(1/cm)/(moles/liter)] (x) [g/liter] (1) [cm]
        %  A =  ---------------------------------------------------
        %                          66,500 [g/mole]
        %
        % using 66,500 as the gram molecular weight of hemoglobin.
        % To convert this data to absorption coefficient in (cm-1), multiply by the molar concentration and 2.303,
        %
        % µa = (2.303) e (x g/liter)/(66,500 g Hb/mole)
        % where x is the number of grams per liter. A typical value of x for whole blood is x=150 g Hb/liter.

        vLambdaHbOHb = [
            650.0	506.0	3743.0;
            652.0	488.0	3677.0;
            654.0	474.0	3612.0;
            656.0	464.0	3548.0;
            658.0	454.3	3491.3;
            660.0	445.0	3442.0;
            662.0	438.3	3364.7;
            664.0	433.8	3292.8;
            666.0	431.3	3226.3;
            668.0	429.0	3133.0;
            670.0	427.0	3013.0;
            672.0	426.5	2946.0;
            674.0	426.0	2879.0;
            676.0	424.0	2821.7;
            678.0	423.0	2732.3;
            680.0	423.0	2610.8;
            682.0	422.0	2497.3;
            684.0	420.0	2392.0;
            686.0	418.0	2292.7;
            688.0	416.5	2209.3;
            690.0	415.5	2141.8;
            692.0	415.0	2068.7;
            694.0	415.0	1990.0;
            696.0	415.5	1938.5;
            698.0	416.0	1887.0;
            700.0	419.3	1827.7;
            702.0	422.5	1778.5;
            704.0	425.5	1739.5;
            706.0	429.7	1695.7;
            708.0	435.0	1647.0;
            710.0	441.0	1601.7;
            712.0	446.5	1562.5;
            714.0	451.5	1529.5;
            716.0	458.0	1492.0;
            718.0	466.0	1450.0;
            720.0	472.7	1411.3;
            722.0	479.5	1380.0;
            724.0	486.5	1356.0;
            726.0	494.3	1331.7;
            728.0	503.0	1307.0;
            730.0	510.0	1296.5;
            732.0	517.0	1286.0;
            734.0	521.0	1286.0;
            736.0	530.7	1293.0;
            738.0	546.0	1307.0;
            740.0	553.5	1328.0;
            742.0	561.0	1349.0;
            744.0	571.0	1384.3;
            746.0	581.3	1431.3;
            748.0	592.0	1490.0;
            750.0	600.0	1532.0;
            752.0	608.0	1574.0;
            754.0	618.7	1620.7;
            756.0	629.7	1655.3;
            758.0	641.0	1678.0;
            760.0	645.5	1669.0;
            762.0	650.0	1660.0;
            764.0	666.7	1613.3;
            766.0	681.0	1555.0;
            768.0	693.0	1485.0;
            770.0	701.5	1425.0;
            772.0	710.0	1365.0;
            774.0	722.0	1288.3;
            776.0	733.7	1216.3;
            778.0	745.0	1149.0;
            780.0	754.0	1107.5;
            782.0	763.0	1066.0;
            784.0	775.0	1021.3;
            786.0	787.0	972.0;
            788.0	799.0	918.0;
            790.0	808.0	913.0;
            792.0	817.0	908.0;
            794.0	829.0	887.3;
            796.0	840.7	868.7;
            798.0	852.0	852.0;
            800.0	863.3	838.7;
            802.0	873.3	828.0;
            804.0	881.8	820.0;
            806.0	891.7	812.0;
            808.0	903.0	804.0;
            810.0	914.3	798.7;
            812.0	924.7	793.7;
            814.0	934.0	789.0;
            816.0	943.0	787.0;
            818.0	952.0	785.0;
            820.0	962.7	783.0;
            822.0	973.0	781.0;
            824.0	983.0	779.0;
            826.0	990.5	778.5;
            828.0	998.0	778.0;
            830.0	1008.0	778.0;
            832.0	1018.0	777.7;
            834.0	1028.0	777.0;
            836.0	1038.0	777.0;
            838.0	1047.7	777.0;
            840.0	1057.0	777.0;
            842.0	1063.5	777.5;
            844.0	1070.0	778.0;
            846.0	1079.3	779.3;
            848.0	1088.3	780.3;
            850.0	1097.0	781.0;
            852.0	1105.7	783.0;
            854.0	1113.0	785.0;
            856.0	1119.0	787.0;
            858.0	1126.0	789.3;
            860.0	1134.0	792.0;
            862.0	1142.0	795.3;
            864.0	1149.7	799.0;
            866.0	1157.0	803.0;
            868.0	1163.7	807.7;
            870.0	1170.3	812.3;
            872.0	1177.0	817.0;
            874.0	1182.0	820.5;
            876.0	1187.0	824.0;
            878.0	1193.0	830.0;
            880.0	1198.7	835.7;
            882.0	1204.0	841.0;
            884.0	1209.3	847.0;
            886.0	1214.3	852.7;
            888.0	1219.0	858.0;
            890.0	1223.7	863.3;
            892.0	1227.5	867.8;
            894.0	1230.5	871.3;
            896.0	1234.0	875.3;
            898.0	1238.0	880.0;
            900.0	1241.3	883.3 ];


        vLambdaHbOHb(:,2) = vLambdaHbOHb(:,2) * 2.303;
        vLambdaHbOHb(:,3) = vLambdaHbOHb(:,3) * 2.303;

        %**************************************************************************
        %**************************************************************************
        %**************************************************************************
        %**************************************************************************
    
    case 1
        Citation=sprintf('%s\n%s','W. B. Gratzer, Med. Res. Council Labs, Holly Hill,London',...
            'N. Kollias, Wellman Laboratories, Harvard Medical School, Boston');
@@ -353,132 +513,132 @@ switch(WhichSpectrum)
            644	405.2	4088.4;
            646	390.4	3965.08;
            648	379.2	3857.6;
            650.0	506.0	3743.0;
            652.0	488.0	3677.0;
            654.0	474.0	3612.0;
            656.0	464.0	3548.0;
            658.0	454.3	3491.3;
            660.0	445.0	3442.0;
            662.0	438.3	3364.7;
            664.0	433.8	3292.8;
            666.0	431.3	3226.3;
            668.0	429.0	3133.0;
            670.0	427.0	3013.0;
            672.0	426.5	2946.0;
            674.0	426.0	2879.0;
            676.0	424.0	2821.7;
            678.0	423.0	2732.3;
            680.0	423.0	2610.8;
            682.0	422.0	2497.3;
            684.0	420.0	2392.0;
            686.0	418.0	2292.7;
            688.0	416.5	2209.3;
            690.0	415.5	2141.8;
            692.0	415.0	2068.7;
            694.0	415.0	1990.0;
            696.0	415.5	1938.5;
            698.0	416.0	1887.0;
            700.0	419.3	1827.7;
            702.0	422.5	1778.5;
            704.0	425.5	1739.5;
            706.0	429.7	1695.7;
            708.0	435.0	1647.0;
            710.0	441.0	1601.7;
            712.0	446.5	1562.5;
            714.0	451.5	1529.5;
            716.0	458.0	1492.0;
            718.0	466.0	1450.0;
            720.0	472.7	1411.3;
            722.0	479.5	1380.0;
            724.0	486.5	1356.0;
            726.0	494.3	1331.7;
            728.0	503.0	1307.0;
            730.0	510.0	1296.5;
            732.0	517.0	1286.0;
            734.0	521.0	1286.0;
            736.0	530.7	1293.0;
            738.0	546.0	1307.0;
            740.0	553.5	1328.0;
            742.0	561.0	1349.0;
            744.0	571.0	1384.3;
            746.0	581.3	1431.3;
            748.0	592.0	1490.0;
            750.0	600.0	1532.0;
            752.0	608.0	1574.0;
            754.0	618.7	1620.7;
            756.0	629.7	1655.3;
            758.0	641.0	1678.0;
            760.0	645.5	1669.0;
            762.0	650.0	1660.0;
            764.0	666.7	1613.3;
            766.0	681.0	1555.0;
            768.0	693.0	1485.0;
            770.0	701.5	1425.0;
            772.0	710.0	1365.0;
            774.0	722.0	1288.3;
            776.0	733.7	1216.3;
            778.0	745.0	1149.0;
            780.0	754.0	1107.5;
            782.0	763.0	1066.0;
            784.0	775.0	1021.3;
            786.0	787.0	972.0;
            788.0	799.0	918.0;
            790.0	808.0	913.0;
            792.0	817.0	908.0;
            794.0	829.0	887.3;
            796.0	840.7	868.7;
            798.0	852.0	852.0;
            800.0	863.3	838.7;
            802.0	873.3	828.0;
            804.0	881.8	820.0;
            806.0	891.7	812.0;
            808.0	903.0	804.0;
            810.0	914.3	798.7;
            812.0	924.7	793.7;
            814.0	934.0	789.0;
            816.0	943.0	787.0;
            818.0	952.0	785.0;
            820.0	962.7	783.0;
            822.0	973.0	781.0;
            824.0	983.0	779.0;
            826.0	990.5	778.5;
            828.0	998.0	778.0;
            830.0	1008.0	778.0;
            832.0	1018.0	777.7;
            834.0	1028.0	777.0;
            836.0	1038.0	777.0;
            838.0	1047.7	777.0;
            840.0	1057.0	777.0;
            842.0	1063.5	777.5;
            844.0	1070.0	778.0;
            846.0	1079.3	779.3;
            848.0	1088.3	780.3;
            850.0	1097.0	781.0;
            852.0	1105.7	783.0;
            854.0	1113.0	785.0;
            856.0	1119.0	787.0;
            858.0	1126.0	789.3;
            860.0	1134.0	792.0;
            862.0	1142.0	795.3;
            864.0	1149.7	799.0;
            866.0	1157.0	803.0;
            868.0	1163.7	807.7;
            870.0	1170.3	812.3;
            872.0	1177.0	817.0;
            874.0	1182.0	820.5;
            876.0	1187.0	824.0;
            878.0	1193.0	830.0;
            880.0	1198.7	835.7;
            882.0	1204.0	841.0;
            884.0	1209.3	847.0;
            886.0	1214.3	852.7;
            888.0	1219.0	858.0;
            890.0	1223.7	863.3;
            892.0	1227.5	867.8;
            894.0	1230.5	871.3;
            896.0	1234.0	875.3;
            898.0	1238.0	880.0;
            900.0	1241.3	883.3;
            650	368	3750.12;
            652	356.8	3642.64;
            654	345.6	3535.16;
            656	335.2	3427.68;
            658	325.6	3320.2;
            660	319.6	3226.56;
            662	314	3140.28;
            664	308.4	3053.96;
            666	302.8	2967.68;
            668	298	2881.4;
            670	294	2795.12;
            672	290	2708.84;
            674	285.6	2627.64;
            676	282	2554.4;
            678	279.2	2481.16;
            680	277.6	2407.92;
            682	276	2334.68;
            684	274.4	2261.48;
            686	272.8	2188.24;
            688	274.4	2115;
            690	276	2051.96;
            692	277.6	2000.48;
            694	279.2	1949.04;
            696	282	1897.56;
            698	286	1846.08;
            700	290	1794.28;
            702	294	1741;
            704	298	1687.76;
            706	302.8	1634.48;
            708	308.4	1583.52;
            710	314	1540.48;
            712	319.6	1497.4;
            714	325.2	1454.36;
            716	332	1411.32;
            718	340	1368.28;
            720	348	1325.88;
            722	356	1285.16;
            724	364	1244.44;
            726	372.4	1203.68;
            728	381.2	1152.8;
            730	390	1102.2;
            732	398.8	1102.2;
            734	407.6	1102.2;
            736	418.8	1101.76;
            738	432.4	1100.48;
            740	446	1115.88;
            742	459.6	1161.64;
            744	473.2	1207.4;
            746	487.6	1266.04;
            748	502.8	1333.24;
            750	518	1405.24;
            752	533.2	1515.32;
            754	548.4	1541.76;
            756	562	1560.48;
            758	574	1560.48;
            760	586	1548.52;
            762	598	1508.44;
            764	610	1459.56;
            766	622.8	1410.52;
            768	636.4	1361.32;
            770	650	1311.88;
            772	663.6	1262.44;
            774	677.2	1213;
            776	689.2	1163.56;
            778	699.6	1114.8;
            780	710	1075.44;
            782	720.4	1036.08;
            784	730.8	996.72;
            786	740	957.36;
            788	748	921.8;
            790	756	890.8;
            792	764	859.8;
            794	772	828.8;
            796	786.4	802.96;
            798	807.2	782.36;
            800	816	761.72;
            802	828	743.84;
            804	836	737.08;
            806	844	730.28;
            808	856	723.52;
            810	864	717.08;
            812	872	711.84;
            814	880	706.6;
            816	887.2	701.32;
            818	901.6	696.08;
            820	916	693.76;
            822	930.4	693.6;
            824	944.8	693.48;
            826	956.4	693.32;
            828	965.2	693.2;
            830	974	693.04;
            832	982.8	692.92;
            834	991.6	692.76;
            836	1001.2	692.64;
            838	1011.6	692.48;
            840	1022	692.36;
            842	1032.4	692.2;
            844	1042.8	691.96;
            846	1050	691.76;
            848	1054	691.52;
            850	1058	691.32;
            852	1062	691.08;
            854	1066	690.88;
            856	1072.8	690.64;
            858	1082.4	692.44;
            860	1092	694.32;
            862	1101.6	696.2;
            864	1111.2	698.04;
            866	1118.4	699.92;
            868	1123.2	701.8;
            870	1128	705.84;
            872	1132.8	709.96;
            874	1137.6	714.08;
            876	1142.8	718.2;
            878	1148.4	722.32;
            880	1154	726.44;
            882	1159.6	729.84;
            884	1165.2	733.2;
            886	1170	736.6;
            888	1174	739.96;
            890	1178	743.6;
            892	1182	747.24;
            894	1186	750.88;
            896	1190	754.52;
            898	1194	758.16;
            900	1198	761.84;
            902	1202	765.04;
            904	1206	767.44;
            906	1209.2	769.8;