diff --git a/plastic/Plastic_HDPE.txt b/plastic/Plastic_HDPE.txt new file mode 100644 index 0000000..5735255 --- /dev/null +++ b/plastic/Plastic_HDPE.txt @@ -0,0 +1,285 @@ +1.00000000 381.00500000 0.17086332 +2.00000000 388.40900000 0.25341281 +3.00000000 395.81600000 0.38855718 +4.00000000 403.22500000 0.53763327 +5.00000000 410.63800000 0.62919513 +6.00000000 418.05400000 0.66103688 +7.00000000 425.47200000 0.67031032 +8.00000000 432.89300000 0.67500768 +9.00000000 440.31700000 0.67872250 +10.00000000 447.74300000 0.68200807 +11.00000000 455.17000000 0.68420186 +12.00000000 462.59900000 0.68419369 +13.00000000 470.03000000 0.68188312 +14.00000000 477.46300000 0.67780266 +15.00000000 484.89700000 0.67154989 +16.00000000 492.33300000 0.66237137 +17.00000000 499.77100000 0.65165122 +18.00000000 507.21000000 0.64173400 +19.00000000 514.65000000 0.63395136 +20.00000000 522.09100000 0.62928469 +21.00000000 529.53300000 0.62783858 +22.00000000 536.97700000 0.62889566 +23.00000000 544.42100000 0.63088946 +24.00000000 551.86700000 0.63148173 +25.00000000 559.31400000 0.63044486 +26.00000000 566.76200000 0.62904124 +27.00000000 574.20900000 0.62717004 +28.00000000 581.65800000 0.62453451 +29.00000000 589.10800000 0.62162896 +30.00000000 596.55800000 0.61636865 +31.00000000 604.01000000 0.60690157 +32.00000000 611.46200000 0.60634070 +33.00000000 618.91500000 0.60979720 +34.00000000 626.36800000 0.61168250 +35.00000000 633.82100000 0.61010860 +36.00000000 641.27600000 0.60582667 +37.00000000 648.73000000 0.60947736 +38.00000000 656.18600000 0.60835555 +39.00000000 663.64100000 0.58365689 +40.00000000 671.09700000 0.52781584 +41.00000000 678.55400000 0.56605166 +42.00000000 686.01000000 0.61510103 +43.00000000 693.46800000 0.63431602 +44.00000000 700.92500000 0.64224572 +45.00000000 708.38300000 0.64578962 +46.00000000 715.84100000 0.64874563 +47.00000000 723.29900000 0.64998970 +48.00000000 730.75900000 0.65007070 +49.00000000 738.21700000 0.64954739 +50.00000000 745.67600000 0.64796041 +51.00000000 753.13600000 0.64448146 +52.00000000 760.59600000 0.63958953 +53.00000000 768.05600000 0.64062319 +54.00000000 775.51600000 0.64352885 +55.00000000 782.97700000 0.64333479 +56.00000000 790.43800000 0.64216444 +57.00000000 797.89900000 0.64053838 +58.00000000 805.36200000 0.63879285 +59.00000000 812.82300000 0.63678505 +60.00000000 820.28400000 0.63429288 +61.00000000 827.74600000 0.63148742 +62.00000000 835.20700000 0.63005240 +63.00000000 842.67000000 0.62927779 +64.00000000 850.13100000 0.62824894 +65.00000000 857.59400000 0.62715772 +66.00000000 865.05500000 0.62557608 +67.00000000 872.51700000 0.62323619 +68.00000000 879.98000000 0.62003666 +69.00000000 887.44100000 0.61611846 +70.00000000 894.90400000 0.60892965 +71.00000000 902.36600000 0.60355384 +72.00000000 909.82900000 0.59561991 +73.00000000 917.29100000 0.57622857 +74.00000000 924.75400000 0.54561478 +75.00000000 932.21600000 0.52014094 +76.00000000 939.67900000 0.53848388 +77.00000000 947.14000000 0.57216404 +78.00000000 954.60300000 0.58863970 +79.00000000 962.06400000 0.59456034 +80.00000000 969.52700000 0.59660696 +81.00000000 976.98800000 0.59761807 +82.00000000 984.45000000 0.59760003 +83.00000000 991.91100000 0.59612018 +84.00000000 999.37300000 0.59231755 +85.00000000 1006.83000000 0.59321305 +86.00000000 1014.29000000 0.58476629 +87.00000000 1021.76000000 0.57747354 +88.00000000 1029.22000000 0.56990818 +89.00000000 1036.68000000 0.56046082 +90.00000000 1044.14000000 0.55560149 +91.00000000 1051.60000000 0.55769197 +92.00000000 1059.06000000 0.56252011 +93.00000000 1066.52000000 0.56715433 +94.00000000 1073.98000000 0.56954371 +95.00000000 1081.44000000 0.57039801 +96.00000000 1088.90000000 0.57168987 +97.00000000 1096.36000000 0.57241499 +98.00000000 1103.82000000 0.57137579 +99.00000000 1111.28000000 0.56900691 +100.00000000 1118.74000000 0.56730504 +101.00000000 1126.20000000 0.56631684 +102.00000000 1133.66000000 0.56199585 +103.00000000 1141.11000000 0.54906540 +104.00000000 1148.57000000 0.52546860 +105.00000000 1156.03000000 0.48940698 +106.00000000 1163.49000000 0.43532851 +107.00000000 1170.95000000 0.40033014 +108.00000000 1178.40000000 0.37566928 +109.00000000 1185.86000000 0.33409908 +110.00000000 1193.32000000 0.29145994 +111.00000000 1200.78000000 0.23363795 +112.00000000 1208.23000000 0.17929207 +113.00000000 1215.69000000 0.15997695 +114.00000000 1223.15000000 0.19470298 +115.00000000 1230.60000000 0.26385580 +116.00000000 1238.06000000 0.32862136 +117.00000000 1245.52000000 0.37759728 +118.00000000 1252.97000000 0.41289285 +119.00000000 1260.43000000 0.43766669 +120.00000000 1267.88000000 0.45489688 +121.00000000 1275.34000000 0.46636368 +122.00000000 1282.79000000 0.47321408 +123.00000000 1290.25000000 0.47772533 +124.00000000 1297.71000000 0.48190939 +125.00000000 1305.16000000 0.48631745 +126.00000000 1312.61000000 0.49159895 +127.00000000 1320.07000000 0.49601498 +128.00000000 1327.52000000 0.49828792 +129.00000000 1334.98000000 0.49889478 +130.00000000 1342.43000000 0.49722536 +131.00000000 1349.88000000 0.49247200 +132.00000000 1357.33000000 0.48284878 +133.00000000 1364.79000000 0.46170592 +134.00000000 1372.24000000 0.42178862 +135.00000000 1379.69000000 0.36357186 +136.00000000 1387.14000000 0.28637173 +137.00000000 1394.59000000 0.23660096 +138.00000000 1402.04000000 0.25539639 +139.00000000 1409.49000000 0.24792988 +140.00000000 1416.94000000 0.22508231 +141.00000000 1424.39000000 0.22634479 +142.00000000 1431.84000000 0.23564708 +143.00000000 1439.29000000 0.24650177 +144.00000000 1446.74000000 0.26676540 +145.00000000 1454.19000000 0.28701015 +146.00000000 1461.64000000 0.30598385 +147.00000000 1469.08000000 0.33079731 +148.00000000 1476.53000000 0.35571511 +149.00000000 1483.98000000 0.37230995 +150.00000000 1491.43000000 0.38488804 +151.00000000 1498.87000000 0.39492262 +152.00000000 1506.32000000 0.40089546 +153.00000000 1513.76000000 0.40251459 +154.00000000 1521.21000000 0.39931275 +155.00000000 1528.65000000 0.39187305 +156.00000000 1536.10000000 0.37984271 +157.00000000 1543.55000000 0.37807936 +158.00000000 1550.99000000 0.39991715 +159.00000000 1558.43000000 0.41548097 +160.00000000 1565.88000000 0.42397864 +161.00000000 1573.32000000 0.43042366 +162.00000000 1580.76000000 0.43442864 +163.00000000 1588.21000000 0.43500566 +164.00000000 1595.65000000 0.43361005 +165.00000000 1603.09000000 0.43144418 +166.00000000 1610.53000000 0.42795330 +167.00000000 1617.97000000 0.42272835 +168.00000000 1625.41000000 0.41435854 +169.00000000 1632.85000000 0.40249896 +170.00000000 1640.29000000 0.39596019 +171.00000000 1647.73000000 0.39153443 +172.00000000 1655.17000000 0.37893932 +173.00000000 1662.61000000 0.35834074 +174.00000000 1670.05000000 0.32978535 +175.00000000 1677.48000000 0.29438895 +176.00000000 1684.92000000 0.26076248 +177.00000000 1692.36000000 0.22711433 +178.00000000 1699.80000000 0.18085189 +179.00000000 1707.23000000 0.11506432 +180.00000000 1714.67000000 0.06149580 +181.00000000 1722.10000000 0.03320750 +182.00000000 1729.54000000 0.02056997 +183.00000000 1736.97000000 0.03022627 +184.00000000 1744.41000000 0.05660054 +185.00000000 1751.84000000 0.07060313 +186.00000000 1759.27000000 0.05442489 +187.00000000 1766.71000000 0.04796462 +188.00000000 1774.14000000 0.07176955 +189.00000000 1781.57000000 0.09152780 +190.00000000 1789.01000000 0.09867683 +191.00000000 1796.44000000 0.09291055 +192.00000000 1803.87000000 0.09213700 +193.00000000 1811.30000000 0.09182802 +194.00000000 1818.73000000 0.09143824 +195.00000000 1826.16000000 0.09543891 +196.00000000 1833.59000000 0.10064914 +197.00000000 1841.02000000 0.10659598 +198.00000000 1848.45000000 0.11760263 +199.00000000 1855.88000000 0.12869738 +200.00000000 1863.31000000 0.13846280 +201.00000000 1870.73000000 0.14902865 +202.00000000 1878.16000000 0.15221631 +203.00000000 1885.59000000 0.15092787 +204.00000000 1893.01000000 0.15171549 +205.00000000 1900.44000000 0.15169961 +206.00000000 1907.86000000 0.14981842 +207.00000000 1915.29000000 0.14813776 +208.00000000 1922.71000000 0.14738659 +209.00000000 1930.14000000 0.14723855 +210.00000000 1937.56000000 0.14862238 +211.00000000 1944.98000000 0.15099799 +212.00000000 1952.41000000 0.15094275 +213.00000000 1959.83000000 0.14977310 +214.00000000 1967.25000000 0.15066070 +215.00000000 1974.67000000 0.15279589 +216.00000000 1982.09000000 0.15467320 +217.00000000 1989.51000000 0.15347767 +218.00000000 1996.94000000 0.14841702 +219.00000000 2004.35000000 0.13974588 +220.00000000 2011.77000000 0.13482786 +221.00000000 2019.19000000 0.14073184 +222.00000000 2026.61000000 0.14717374 +223.00000000 2034.03000000 0.14821484 +224.00000000 2041.45000000 0.14645872 +225.00000000 2048.86000000 0.14383083 +226.00000000 2056.28000000 0.14577665 +227.00000000 2063.70000000 0.15377922 +228.00000000 2071.11000000 0.16246692 +229.00000000 2078.53000000 0.17031203 +230.00000000 2085.94000000 0.17619277 +231.00000000 2093.36000000 0.18176843 +232.00000000 2100.77000000 0.18860738 +233.00000000 2108.18000000 0.19285835 +234.00000000 2115.59000000 0.19584482 +235.00000000 2123.01000000 0.20039378 +236.00000000 2130.42000000 0.20210233 +237.00000000 2137.83000000 0.19767003 +238.00000000 2145.24000000 0.19690159 +239.00000000 2152.65000000 0.19985639 +240.00000000 2160.06000000 0.19881786 +241.00000000 2167.47000000 0.19536514 +242.00000000 2174.88000000 0.19219321 +243.00000000 2182.28000000 0.18816485 +244.00000000 2189.69000000 0.18097964 +245.00000000 2197.10000000 0.17110624 +246.00000000 2204.50000000 0.16085436 +247.00000000 2211.91000000 0.14991026 +248.00000000 2219.31000000 0.13706081 +249.00000000 2226.72000000 0.12250404 +250.00000000 2234.12000000 0.10884624 +251.00000000 2241.53000000 0.09627205 +252.00000000 2248.93000000 0.08160886 +253.00000000 2256.33000000 0.06706380 +254.00000000 2263.73000000 0.05091578 +255.00000000 2271.14000000 0.03290572 +256.00000000 2278.54000000 0.01921431 +257.00000000 2285.94000000 0.01220760 +258.00000000 2293.34000000 0.00907285 +259.00000000 2300.74000000 0.00752335 +260.00000000 2308.14000000 0.00659827 +261.00000000 2315.53000000 0.00676532 +262.00000000 2322.93000000 0.00790473 +263.00000000 2330.33000000 0.00826087 +264.00000000 2337.73000000 0.00781302 +265.00000000 2345.12000000 0.00701682 +266.00000000 2352.52000000 0.00664955 +267.00000000 2359.91000000 0.00684666 +268.00000000 2367.31000000 0.00692164 +269.00000000 2374.70000000 0.00689234 +270.00000000 2382.09000000 0.00655461 +271.00000000 2389.49000000 0.00650691 +272.00000000 2396.88000000 0.00658107 +273.00000000 2404.27000000 0.00661120 +274.00000000 2411.66000000 0.00650596 +275.00000000 2419.05000000 0.00657362 +276.00000000 2426.44000000 0.00648416 +277.00000000 2433.83000000 0.00640918 +278.00000000 2441.22000000 0.00645057 +279.00000000 2448.61000000 0.00676783 +280.00000000 2455.99000000 0.00703492 +281.00000000 2463.38000000 0.00768439 +282.00000000 2470.77000000 0.00856632 +283.00000000 2478.15000000 0.00886176 +284.00000000 2485.54000000 0.00927648 +285.00000000 2492.92000000 0.01182118 diff --git a/plastic/Plastic_LDPE.txt b/plastic/Plastic_LDPE.txt new file mode 100644 index 0000000..bbaa457 --- /dev/null +++ b/plastic/Plastic_LDPE.txt @@ -0,0 +1,285 @@ +1.00000000 381.00500000 0.12812708 +2.00000000 388.40900000 0.20021370 +3.00000000 395.81600000 0.32963880 +4.00000000 403.22500000 0.51462098 +5.00000000 410.63800000 0.70141320 +6.00000000 418.05400000 0.82509369 +7.00000000 425.47200000 0.87416547 +8.00000000 432.89300000 0.88703487 +9.00000000 440.31700000 0.88960510 +10.00000000 447.74300000 0.88915696 +11.00000000 455.17000000 0.88845465 +12.00000000 462.59900000 0.88730377 +13.00000000 470.03000000 0.88575460 +14.00000000 477.46300000 0.88392867 +15.00000000 484.89700000 0.88162269 +16.00000000 492.33300000 0.87880125 +17.00000000 499.77100000 0.87546935 +18.00000000 507.21000000 0.87176714 +19.00000000 514.65000000 0.86775670 +20.00000000 522.09100000 0.86346959 +21.00000000 529.53300000 0.85905937 +22.00000000 536.97700000 0.85448604 +23.00000000 544.42100000 0.84999910 +24.00000000 551.86700000 0.84492897 +25.00000000 559.31400000 0.84015306 +26.00000000 566.76200000 0.83580423 +27.00000000 574.20900000 0.83200750 +28.00000000 581.65800000 0.82886785 +29.00000000 589.10800000 0.82593148 +30.00000000 596.55800000 0.82318564 +31.00000000 604.01000000 0.82106622 +32.00000000 611.46200000 0.81954051 +33.00000000 618.91500000 0.81908315 +34.00000000 626.36800000 0.81953158 +35.00000000 633.82100000 0.82032036 +36.00000000 641.27600000 0.82146307 +37.00000000 648.73000000 0.82280688 +38.00000000 656.18600000 0.82463471 +39.00000000 663.64100000 0.82670093 +40.00000000 671.09700000 0.82870176 +41.00000000 678.55400000 0.83073649 +42.00000000 686.01000000 0.83256111 +43.00000000 693.46800000 0.83394161 +44.00000000 700.92500000 0.83516064 +45.00000000 708.38300000 0.83600616 +46.00000000 715.84100000 0.83632990 +47.00000000 723.29900000 0.83624121 +48.00000000 730.75900000 0.83572167 +49.00000000 738.21700000 0.83498167 +50.00000000 745.67600000 0.83365902 +51.00000000 753.13600000 0.83138009 +52.00000000 760.59600000 0.82874697 +53.00000000 768.05600000 0.82883343 +54.00000000 775.51600000 0.82984064 +55.00000000 782.97700000 0.82939827 +56.00000000 790.43800000 0.82839155 +57.00000000 797.89900000 0.82722560 +58.00000000 805.36200000 0.82604089 +59.00000000 812.82300000 0.82466497 +60.00000000 820.28400000 0.82299312 +61.00000000 827.74600000 0.82116917 +62.00000000 835.20700000 0.81997315 +63.00000000 842.67000000 0.81908378 +64.00000000 850.13100000 0.81807689 +65.00000000 857.59400000 0.81692207 +66.00000000 865.05500000 0.81547170 +67.00000000 872.51700000 0.81386371 +68.00000000 879.98000000 0.81161038 +69.00000000 887.44100000 0.80899718 +70.00000000 894.90400000 0.80474115 +71.00000000 902.36600000 0.80109345 +72.00000000 909.82900000 0.79571054 +73.00000000 917.29100000 0.78484042 +74.00000000 924.75400000 0.76900301 +75.00000000 932.21600000 0.75599085 +76.00000000 939.67900000 0.76506237 +77.00000000 947.14000000 0.78191860 +78.00000000 954.60300000 0.78978244 +79.00000000 962.06400000 0.79230154 +80.00000000 969.52700000 0.79276118 +81.00000000 976.98800000 0.79264671 +82.00000000 984.45000000 0.79178228 +83.00000000 991.91100000 0.79018691 +84.00000000 999.37300000 0.78733638 +85.00000000 1006.83000000 0.78792066 +86.00000000 1014.29000000 0.78270319 +87.00000000 1021.76000000 0.77794293 +88.00000000 1029.22000000 0.77309979 +89.00000000 1036.68000000 0.76764697 +90.00000000 1044.14000000 0.76461926 +91.00000000 1051.60000000 0.76483494 +92.00000000 1059.06000000 0.76654878 +93.00000000 1066.52000000 0.76817594 +94.00000000 1073.98000000 0.76860609 +95.00000000 1081.44000000 0.76866536 +96.00000000 1088.90000000 0.76852249 +97.00000000 1096.36000000 0.76792276 +98.00000000 1103.82000000 0.76657677 +99.00000000 1111.28000000 0.76458829 +100.00000000 1118.74000000 0.76300963 +101.00000000 1126.20000000 0.76127154 +102.00000000 1133.66000000 0.75751018 +103.00000000 1141.11000000 0.74875540 +104.00000000 1148.57000000 0.73330425 +105.00000000 1156.03000000 0.71011035 +106.00000000 1163.49000000 0.67697328 +107.00000000 1170.95000000 0.65345438 +108.00000000 1178.40000000 0.63275087 +109.00000000 1185.86000000 0.59873009 +110.00000000 1193.32000000 0.56131039 +111.00000000 1200.78000000 0.51207383 +112.00000000 1208.23000000 0.46189350 +113.00000000 1215.69000000 0.44324040 +114.00000000 1223.15000000 0.47848934 +115.00000000 1230.60000000 0.54247764 +116.00000000 1238.06000000 0.59543022 +117.00000000 1245.52000000 0.63099439 +118.00000000 1252.97000000 0.65473067 +119.00000000 1260.43000000 0.67051444 +120.00000000 1267.88000000 0.68084601 +121.00000000 1275.34000000 0.68742321 +122.00000000 1282.79000000 0.69117932 +123.00000000 1290.25000000 0.69340569 +124.00000000 1297.71000000 0.69533630 +125.00000000 1305.16000000 0.69756063 +126.00000000 1312.61000000 0.70000589 +127.00000000 1320.07000000 0.70186777 +128.00000000 1327.52000000 0.70248875 +129.00000000 1334.98000000 0.70174241 +130.00000000 1342.43000000 0.69928318 +131.00000000 1349.88000000 0.69450704 +132.00000000 1357.33000000 0.68488065 +133.00000000 1364.79000000 0.66765785 +134.00000000 1372.24000000 0.63787048 +135.00000000 1379.69000000 0.59288798 +136.00000000 1387.14000000 0.52904074 +137.00000000 1394.59000000 0.48798768 +138.00000000 1402.04000000 0.50569974 +139.00000000 1409.49000000 0.49680341 +140.00000000 1416.94000000 0.47540707 +141.00000000 1424.39000000 0.47732788 +142.00000000 1431.84000000 0.48549920 +143.00000000 1439.29000000 0.49541678 +144.00000000 1446.74000000 0.51365826 +145.00000000 1454.19000000 0.53213764 +146.00000000 1461.64000000 0.54848976 +147.00000000 1469.08000000 0.56743207 +148.00000000 1476.53000000 0.58556758 +149.00000000 1483.98000000 0.59752360 +150.00000000 1491.43000000 0.60625872 +151.00000000 1498.87000000 0.61279598 +152.00000000 1506.32000000 0.61636740 +153.00000000 1513.76000000 0.61709580 +154.00000000 1521.21000000 0.61464847 +155.00000000 1528.65000000 0.60952227 +156.00000000 1536.10000000 0.60198944 +157.00000000 1543.55000000 0.60172441 +158.00000000 1550.99000000 0.61622369 +159.00000000 1558.43000000 0.62578790 +160.00000000 1565.88000000 0.63031979 +161.00000000 1573.32000000 0.63340594 +162.00000000 1580.76000000 0.63490628 +163.00000000 1588.21000000 0.63434972 +164.00000000 1595.65000000 0.63269087 +165.00000000 1603.09000000 0.63048841 +166.00000000 1610.53000000 0.62711343 +167.00000000 1617.97000000 0.62256768 +168.00000000 1625.41000000 0.61688976 +169.00000000 1632.85000000 0.61023675 +170.00000000 1640.29000000 0.60343421 +171.00000000 1647.73000000 0.59528603 +172.00000000 1655.17000000 0.58355810 +173.00000000 1662.61000000 0.56632603 +174.00000000 1670.05000000 0.54173844 +175.00000000 1677.48000000 0.50797722 +176.00000000 1684.92000000 0.46366638 +177.00000000 1692.36000000 0.40683922 +178.00000000 1699.80000000 0.34000396 +179.00000000 1707.23000000 0.25609953 +180.00000000 1714.67000000 0.18681354 +181.00000000 1722.10000000 0.13944281 +182.00000000 1729.54000000 0.10985196 +183.00000000 1736.97000000 0.13315115 +184.00000000 1744.41000000 0.18401043 +185.00000000 1751.84000000 0.20040420 +186.00000000 1759.27000000 0.17394118 +187.00000000 1766.71000000 0.16391836 +188.00000000 1774.14000000 0.19839504 +189.00000000 1781.57000000 0.22658924 +190.00000000 1789.01000000 0.23652424 +191.00000000 1796.44000000 0.22936624 +192.00000000 1803.87000000 0.22851822 +193.00000000 1811.30000000 0.22774018 +194.00000000 1818.73000000 0.22736858 +195.00000000 1826.16000000 0.23242382 +196.00000000 1833.59000000 0.23950046 +197.00000000 1841.02000000 0.24789306 +198.00000000 1848.45000000 0.26223559 +199.00000000 1855.88000000 0.27678307 +200.00000000 1863.31000000 0.28892717 +201.00000000 1870.73000000 0.30028037 +202.00000000 1878.16000000 0.30338339 +203.00000000 1885.59000000 0.30147161 +204.00000000 1893.01000000 0.30139012 +205.00000000 1900.44000000 0.30059273 +206.00000000 1907.86000000 0.29807679 +207.00000000 1915.29000000 0.29540317 +208.00000000 1922.71000000 0.29370768 +209.00000000 1930.14000000 0.29285196 +210.00000000 1937.56000000 0.29362742 +211.00000000 1944.98000000 0.29524883 +212.00000000 1952.41000000 0.29414970 +213.00000000 1959.83000000 0.29172160 +214.00000000 1967.25000000 0.29181166 +215.00000000 1974.67000000 0.29309404 +216.00000000 1982.09000000 0.29396775 +217.00000000 1989.51000000 0.29144591 +218.00000000 1996.94000000 0.28467669 +219.00000000 2004.35000000 0.27397908 +220.00000000 2011.77000000 0.26856663 +221.00000000 2019.19000000 0.27600639 +222.00000000 2026.61000000 0.28333640 +223.00000000 2034.03000000 0.28409803 +224.00000000 2041.45000000 0.28157048 +225.00000000 2048.86000000 0.27846840 +226.00000000 2056.28000000 0.28067511 +227.00000000 2063.70000000 0.28996488 +228.00000000 2071.11000000 0.30009368 +229.00000000 2078.53000000 0.30871641 +230.00000000 2085.94000000 0.31476263 +231.00000000 2093.36000000 0.32004424 +232.00000000 2100.77000000 0.32677703 +233.00000000 2108.18000000 0.33192673 +234.00000000 2115.59000000 0.33641670 +235.00000000 2123.01000000 0.34008055 +236.00000000 2130.42000000 0.33935003 +237.00000000 2137.83000000 0.33335317 +238.00000000 2145.24000000 0.33119955 +239.00000000 2152.65000000 0.33290970 +240.00000000 2160.06000000 0.33074084 +241.00000000 2167.47000000 0.32581459 +242.00000000 2174.88000000 0.31994069 +243.00000000 2182.28000000 0.31239991 +244.00000000 2189.69000000 0.30207694 +245.00000000 2197.10000000 0.28907295 +246.00000000 2204.50000000 0.27565629 +247.00000000 2211.91000000 0.26138344 +248.00000000 2219.31000000 0.24526028 +249.00000000 2226.72000000 0.22796460 +250.00000000 2234.12000000 0.20990848 +251.00000000 2241.53000000 0.19016585 +252.00000000 2248.93000000 0.16766408 +253.00000000 2256.33000000 0.14336273 +254.00000000 2263.73000000 0.11560059 +255.00000000 2271.14000000 0.08648464 +256.00000000 2278.54000000 0.06342044 +257.00000000 2285.94000000 0.04728881 +258.00000000 2293.34000000 0.03467522 +259.00000000 2300.74000000 0.02284159 +260.00000000 2308.14000000 0.01485841 +261.00000000 2315.53000000 0.01702073 +262.00000000 2322.93000000 0.02748300 +263.00000000 2330.33000000 0.03072277 +264.00000000 2337.73000000 0.02677812 +265.00000000 2345.12000000 0.01989563 +266.00000000 2352.52000000 0.01695197 +267.00000000 2359.91000000 0.02066182 +268.00000000 2367.31000000 0.02088808 +269.00000000 2374.70000000 0.01966535 +270.00000000 2382.09000000 0.01781582 +271.00000000 2389.49000000 0.01672517 +272.00000000 2396.88000000 0.01656960 +273.00000000 2404.27000000 0.01654383 +274.00000000 2411.66000000 0.01658013 +275.00000000 2419.05000000 0.01687599 +276.00000000 2426.44000000 0.01712111 +277.00000000 2433.83000000 0.01705139 +278.00000000 2441.22000000 0.01752980 +279.00000000 2448.61000000 0.02009748 +280.00000000 2455.99000000 0.02299386 +281.00000000 2463.38000000 0.02524416 +282.00000000 2470.77000000 0.02701764 +283.00000000 2478.15000000 0.02916741 +284.00000000 2485.54000000 0.03005045 +285.00000000 2492.92000000 0.03465435 diff --git a/plastic/Plastic_LDPE_Transparent.txt b/plastic/Plastic_LDPE_Transparent.txt new file mode 100644 index 0000000..0dd049f --- /dev/null +++ b/plastic/Plastic_LDPE_Transparent.txt @@ -0,0 +1,285 @@ +1.00000000 381.00500000 0.00010070 +2.00000000 388.40900000 0.00314485 +3.00000000 395.81600000 0.00169773 +4.00000000 403.22500000 0.00140738 +5.00000000 410.63800000 0.00040721 +6.00000000 418.05400000 -0.00066935 +7.00000000 425.47200000 -0.00087111 +8.00000000 432.89300000 0.00169432 +9.00000000 440.31700000 0.00153024 +10.00000000 447.74300000 -0.00092234 +11.00000000 455.17000000 -0.00086796 +12.00000000 462.59900000 -0.00106132 +13.00000000 470.03000000 -0.00113077 +14.00000000 477.46300000 -0.00143833 +15.00000000 484.89700000 -0.00167048 +16.00000000 492.33300000 -0.00193952 +17.00000000 499.77100000 -0.00209490 +18.00000000 507.21000000 -0.00228706 +19.00000000 514.65000000 -0.00243301 +20.00000000 522.09100000 -0.00206381 +21.00000000 529.53300000 -0.00208346 +22.00000000 536.97700000 -0.00131657 +23.00000000 544.42100000 -0.00008504 +24.00000000 551.86700000 -0.00058034 +25.00000000 559.31400000 -0.00055832 +26.00000000 566.76200000 0.00038010 +27.00000000 574.20900000 0.00028999 +28.00000000 581.65800000 0.00048692 +29.00000000 589.10800000 -0.00131626 +30.00000000 596.55800000 -0.00064730 +31.00000000 604.01000000 -0.00241087 +32.00000000 611.46200000 -0.00267841 +33.00000000 618.91500000 -0.00304838 +34.00000000 626.36800000 -0.00280681 +35.00000000 633.82100000 -0.00305049 +36.00000000 641.27600000 -0.00470848 +37.00000000 648.73000000 -0.00387324 +38.00000000 656.18600000 -0.00429615 +39.00000000 663.64100000 -0.00484024 +40.00000000 671.09700000 -0.00378807 +41.00000000 678.55400000 -0.00419622 +42.00000000 686.01000000 -0.00396605 +43.00000000 693.46800000 -0.00240365 +44.00000000 700.92500000 -0.00259435 +45.00000000 708.38300000 -0.00259589 +46.00000000 715.84100000 -0.00108424 +47.00000000 723.29900000 -0.00113271 +48.00000000 730.75900000 -0.00183234 +49.00000000 738.21700000 -0.00040482 +50.00000000 745.67600000 0.00075204 +51.00000000 753.13600000 -0.00034388 +52.00000000 760.59600000 -0.00028935 +53.00000000 768.05600000 0.00161487 +54.00000000 775.51600000 0.00224126 +55.00000000 782.97700000 0.00113173 +56.00000000 790.43800000 0.00103168 +57.00000000 797.89900000 0.00286396 +58.00000000 805.36200000 0.00364100 +59.00000000 812.82300000 0.00268209 +60.00000000 820.28400000 0.00238609 +61.00000000 827.74600000 0.00394971 +62.00000000 835.20700000 0.00504294 +63.00000000 842.67000000 0.00420190 +64.00000000 850.13100000 0.00295736 +65.00000000 857.59400000 0.00366256 +66.00000000 865.05500000 0.00578418 +67.00000000 872.51700000 0.00642947 +68.00000000 879.98000000 0.00476564 +69.00000000 887.44100000 0.00290487 +70.00000000 894.90400000 0.00302426 +71.00000000 902.36600000 0.00501710 +72.00000000 909.82900000 0.00620194 +73.00000000 917.29100000 0.00478840 +74.00000000 924.75400000 0.00205928 +75.00000000 932.21600000 0.00036739 +76.00000000 939.67900000 0.00155932 +77.00000000 947.14000000 0.00413941 +78.00000000 954.60300000 0.00563763 +79.00000000 962.06400000 0.00493654 +80.00000000 969.52700000 0.00279972 +81.00000000 976.98800000 0.00138765 +82.00000000 984.45000000 0.00152308 +83.00000000 991.91100000 0.00304806 +84.00000000 999.37300000 0.00448764 +85.00000000 1006.83000000 0.00449858 +86.00000000 1014.29000000 0.00365950 +87.00000000 1021.76000000 0.00231744 +88.00000000 1029.22000000 0.00162830 +89.00000000 1036.68000000 0.00212343 +90.00000000 1044.14000000 0.00287430 +91.00000000 1051.60000000 0.00317601 +92.00000000 1059.06000000 0.00317488 +93.00000000 1066.52000000 0.00294163 +94.00000000 1073.98000000 0.00268114 +95.00000000 1081.44000000 0.00279557 +96.00000000 1088.90000000 0.00320951 +97.00000000 1096.36000000 0.00318720 +98.00000000 1103.82000000 0.00289182 +99.00000000 1111.28000000 0.00231477 +100.00000000 1118.74000000 0.00163679 +101.00000000 1126.20000000 0.00113847 +102.00000000 1133.66000000 0.00099715 +103.00000000 1141.11000000 0.00145921 +104.00000000 1148.57000000 0.00219838 +105.00000000 1156.03000000 0.00213080 +106.00000000 1163.49000000 0.00144207 +107.00000000 1170.95000000 -0.00000620 +108.00000000 1178.40000000 -0.00198692 +109.00000000 1185.86000000 -0.00457584 +110.00000000 1193.32000000 -0.00683110 +111.00000000 1200.78000000 -0.00896658 +112.00000000 1208.23000000 -0.01085932 +113.00000000 1215.69000000 -0.01053833 +114.00000000 1223.15000000 -0.00711953 +115.00000000 1230.60000000 -0.00263942 +116.00000000 1238.06000000 -0.00007416 +117.00000000 1245.52000000 0.00073907 +118.00000000 1252.97000000 0.00025332 +119.00000000 1260.43000000 -0.00081915 +120.00000000 1267.88000000 -0.00196466 +121.00000000 1275.34000000 -0.00229888 +122.00000000 1282.79000000 -0.00184479 +123.00000000 1290.25000000 -0.00090456 +124.00000000 1297.71000000 0.00072759 +125.00000000 1305.16000000 0.00283179 +126.00000000 1312.61000000 0.00431993 +127.00000000 1320.07000000 0.00521469 +128.00000000 1327.52000000 0.00502394 +129.00000000 1334.98000000 0.00352282 +130.00000000 1342.43000000 0.00123832 +131.00000000 1349.88000000 -0.00077195 +132.00000000 1357.33000000 -0.00239396 +133.00000000 1364.79000000 -0.00351843 +134.00000000 1372.24000000 -0.00470580 +135.00000000 1379.69000000 -0.00523876 +136.00000000 1387.14000000 -0.00592301 +137.00000000 1394.59000000 -0.00601926 +138.00000000 1402.04000000 -0.00399414 +139.00000000 1409.49000000 -0.00340580 +140.00000000 1416.94000000 -0.00375337 +141.00000000 1424.39000000 -0.00355839 +142.00000000 1431.84000000 -0.00372598 +143.00000000 1439.29000000 -0.00414331 +144.00000000 1446.74000000 -0.00484627 +145.00000000 1454.19000000 -0.00530266 +146.00000000 1461.64000000 -0.00548145 +147.00000000 1469.08000000 -0.00499343 +148.00000000 1476.53000000 -0.00411672 +149.00000000 1483.98000000 -0.00296206 +150.00000000 1491.43000000 -0.00161104 +151.00000000 1498.87000000 -0.00005386 +152.00000000 1506.32000000 0.00125456 +153.00000000 1513.76000000 0.00242741 +154.00000000 1521.21000000 0.00320418 +155.00000000 1528.65000000 0.00331518 +156.00000000 1536.10000000 0.00287572 +157.00000000 1543.55000000 0.00222759 +158.00000000 1550.99000000 0.00184600 +159.00000000 1558.43000000 0.00109226 +160.00000000 1565.88000000 0.00014349 +161.00000000 1573.32000000 -0.00090948 +162.00000000 1580.76000000 -0.00154919 +163.00000000 1588.21000000 -0.00193796 +164.00000000 1595.65000000 -0.00199444 +165.00000000 1603.09000000 -0.00186975 +166.00000000 1610.53000000 -0.00183511 +167.00000000 1617.97000000 -0.00155868 +168.00000000 1625.41000000 -0.00115253 +169.00000000 1632.85000000 -0.00106212 +170.00000000 1640.29000000 -0.00084013 +171.00000000 1647.73000000 -0.00063168 +172.00000000 1655.17000000 -0.00065278 +173.00000000 1662.61000000 -0.00127323 +174.00000000 1670.05000000 -0.00188562 +175.00000000 1677.48000000 -0.00265279 +176.00000000 1684.92000000 -0.00338981 +177.00000000 1692.36000000 -0.00509598 +178.00000000 1699.80000000 -0.00774900 +179.00000000 1707.23000000 -0.01284247 +180.00000000 1714.67000000 -0.01951600 +181.00000000 1722.10000000 -0.02764513 +182.00000000 1729.54000000 -0.03557598 +183.00000000 1736.97000000 -0.02974533 +184.00000000 1744.41000000 -0.01934220 +185.00000000 1751.84000000 -0.01757213 +186.00000000 1759.27000000 -0.02194513 +187.00000000 1766.71000000 -0.02374412 +188.00000000 1774.14000000 -0.01950873 +189.00000000 1781.57000000 -0.01680893 +190.00000000 1789.01000000 -0.01674553 +191.00000000 1796.44000000 -0.01812386 +192.00000000 1803.87000000 -0.01833407 +193.00000000 1811.30000000 -0.01885738 +194.00000000 1818.73000000 -0.01933575 +195.00000000 1826.16000000 -0.01868158 +196.00000000 1833.59000000 -0.01755810 +197.00000000 1841.02000000 -0.01623146 +198.00000000 1848.45000000 -0.01415583 +199.00000000 1855.88000000 -0.01170107 +200.00000000 1863.31000000 -0.00950256 +201.00000000 1870.73000000 -0.00727210 +202.00000000 1878.16000000 -0.00561186 +203.00000000 1885.59000000 -0.00373154 +204.00000000 1893.01000000 -0.00184505 +205.00000000 1900.44000000 -0.00027090 +206.00000000 1907.86000000 0.00086177 +207.00000000 1915.29000000 0.00098932 +208.00000000 1922.71000000 0.00045454 +209.00000000 1930.14000000 0.00002435 +210.00000000 1937.56000000 -0.00074131 +211.00000000 1944.98000000 -0.00158446 +212.00000000 1952.41000000 -0.00311778 +213.00000000 1959.83000000 -0.00550689 +214.00000000 1967.25000000 -0.00807652 +215.00000000 1974.67000000 -0.01051070 +216.00000000 1982.09000000 -0.01268590 +217.00000000 1989.51000000 -0.01449338 +218.00000000 1996.94000000 -0.01645310 +219.00000000 2004.35000000 -0.01807718 +220.00000000 2011.77000000 -0.01877299 +221.00000000 2019.19000000 -0.01827657 +222.00000000 2026.61000000 -0.01745540 +223.00000000 2034.03000000 -0.01744231 +224.00000000 2041.45000000 -0.01736703 +225.00000000 2048.86000000 -0.01598615 +226.00000000 2056.28000000 -0.01426810 +227.00000000 2063.70000000 -0.01231144 +228.00000000 2071.11000000 -0.01001978 +229.00000000 2078.53000000 -0.00741289 +230.00000000 2085.94000000 -0.00549759 +231.00000000 2093.36000000 -0.00410561 +232.00000000 2100.77000000 -0.00241567 +233.00000000 2108.18000000 -0.00045543 +234.00000000 2115.59000000 0.00075149 +235.00000000 2123.01000000 0.00128215 +236.00000000 2130.42000000 0.00158378 +237.00000000 2137.83000000 0.00155541 +238.00000000 2145.24000000 0.00167746 +239.00000000 2152.65000000 0.00179355 +240.00000000 2160.06000000 0.00221043 +241.00000000 2167.47000000 0.00228467 +242.00000000 2174.88000000 0.00183174 +243.00000000 2182.28000000 0.00153975 +244.00000000 2189.69000000 0.00045967 +245.00000000 2197.10000000 -0.00027051 +246.00000000 2204.50000000 -0.00074888 +247.00000000 2211.91000000 -0.00159236 +248.00000000 2219.31000000 -0.00395847 +249.00000000 2226.72000000 -0.00585790 +250.00000000 2234.12000000 -0.00822743 +251.00000000 2241.53000000 -0.00972372 +252.00000000 2248.93000000 -0.01230867 +253.00000000 2256.33000000 -0.01598006 +254.00000000 2263.73000000 -0.02118902 +255.00000000 2271.14000000 -0.02804380 +256.00000000 2278.54000000 -0.03630484 +257.00000000 2285.94000000 -0.04573948 +258.00000000 2293.34000000 -0.06086136 +259.00000000 2300.74000000 -0.08946165 +260.00000000 2308.14000000 -0.12553533 +261.00000000 2315.53000000 -0.11728023 +262.00000000 2322.93000000 -0.07449352 +263.00000000 2330.33000000 -0.06364747 +264.00000000 2337.73000000 -0.07228986 +265.00000000 2345.12000000 -0.09542092 +266.00000000 2352.52000000 -0.10621857 +267.00000000 2359.91000000 -0.08830078 +268.00000000 2367.31000000 -0.08547862 +269.00000000 2374.70000000 -0.08956421 +270.00000000 2382.09000000 -0.09625908 +271.00000000 2389.49000000 -0.09856915 +272.00000000 2396.88000000 -0.09797856 +273.00000000 2404.27000000 -0.09734454 +274.00000000 2411.66000000 -0.09539829 +275.00000000 2419.05000000 -0.09402922 +276.00000000 2426.44000000 -0.09233711 +277.00000000 2433.83000000 -0.09145783 +278.00000000 2441.22000000 -0.08818483 +279.00000000 2448.61000000 -0.07971919 +280.00000000 2455.99000000 -0.07232331 +281.00000000 2463.38000000 -0.06735760 +282.00000000 2470.77000000 -0.06415124 +283.00000000 2478.15000000 -0.05921233 +284.00000000 2485.54000000 -0.05193377 +285.00000000 2492.92000000 -0.04333920 diff --git a/plastic/Plastic_PVC.txt b/plastic/Plastic_PVC.txt new file mode 100644 index 0000000..a70fc78 --- /dev/null +++ b/plastic/Plastic_PVC.txt @@ -0,0 +1,285 @@ +1.0 381.005 0.13816170394420624 +2.0 388.409 0.18955369293689728 +3.0 395.816 0.28125306963920593 +4.0 403.225 0.40540993213653564 +5.0 410.638 0.5136008858680725 +6.0 418.054 0.5675216317176819 +7.0 425.472 0.5877035856246948 +8.0 432.893 0.5995801687240601 +9.0 440.317 0.6065618395805359 +10.0 447.743 0.6123111844062805 +11.0 455.17 0.6197780966758728 +12.0 462.599 0.6258185505867004 +13.0 470.03 0.6309583187103271 +14.0 477.463 0.6367213129997253 +15.0 484.897 0.6416654586791992 +16.0 492.333 0.6461796760559082 +17.0 499.771 0.650391697883606 +18.0 507.21 0.6536366939544678 +19.0 514.65 0.6562151312828064 +20.0 522.091 0.6582500338554382 +21.0 529.533 0.6598526239395142 +22.0 536.977 0.6608676910400391 +23.0 544.421 0.6613756418228149 +24.0 551.867 0.6617177128791809 +25.0 559.314 0.6623402833938599 +26.0 566.762 0.6633585691452026 +27.0 574.209 0.6644152998924255 +28.0 581.658 0.6651273965835571 +29.0 589.108 0.6653316020965576 +30.0 596.558 0.665768027305603 +31.0 604.01 0.6670668125152588 +32.0 611.462 0.6691715717315674 +33.0 618.915 0.6722482442855835 +34.0 626.368 0.6761171817779541 +35.0 633.821 0.6801667213439941 +36.0 641.276 0.6844643950462341 +37.0 648.73 0.6888806223869324 +38.0 656.186 0.6929230690002441 +39.0 663.641 0.6964603066444397 +40.0 671.097 0.6994932293891907 +41.0 678.554 0.7020423412322998 +42.0 686.01 0.7041210532188416 +43.0 693.468 0.7057304382324219 +44.0 700.925 0.7068991661071777 +45.0 708.383 0.7076833844184875 +46.0 715.841 0.7081143856048584 +47.0 723.299 0.7080532312393188 +48.0 730.759 0.707513689994812 +49.0 738.217 0.7069027423858643 +50.0 745.676 0.7065221071243286 +51.0 753.136 0.7067621350288391 +52.0 760.596 0.707676887512207 +53.0 768.056 0.708223819732666 +54.0 775.516 0.7083621621131897 +55.0 782.977 0.7082144021987915 +56.0 790.438 0.7079307436943054 +57.0 797.899 0.7075115442276001 +58.0 805.362 0.7069171667098999 +59.0 812.823 0.7062261700630188 +60.0 820.284 0.7057439684867859 +61.0 827.746 0.705525815486908 +62.0 835.207 0.7054276466369629 +63.0 842.67 0.7052862644195557 +64.0 850.131 0.7049660086631775 +65.0 857.594 0.7044727802276611 +66.0 865.055 0.7033554315567017 +67.0 872.517 0.7015631198883057 +68.0 879.98 0.6987128257751465 +69.0 887.441 0.6927961111068726 +70.0 894.904 0.6843170523643494 +71.0 902.366 0.678299605846405 +72.0 909.829 0.673614501953125 +73.0 917.291 0.6705310940742493 +74.0 924.754 0.6751520037651062 +75.0 932.216 0.6836546659469604 +76.0 939.679 0.6894627809524536 +77.0 947.14 0.6927722692489624 +78.0 954.603 0.6942976117134094 +79.0 962.064 0.6946718692779541 +80.0 969.527 0.694706916809082 +81.0 976.988 0.6945160627365112 +82.0 984.45 0.693900465965271 +83.0 991.911 0.6920750737190247 +84.0 999.373 0.6898289322853088 +85.0 1006.83 0.6780680418014526 +86.0 1014.29 0.6730366349220276 +87.0 1021.76 0.6674510836601257 +88.0 1029.22 0.6645755171775818 +89.0 1036.68 0.6651111245155334 +90.0 1044.14 0.6675155162811279 +91.0 1051.6 0.67009437084198 +92.0 1059.06 0.6720449328422546 +93.0 1066.52 0.6738961935043335 +94.0 1073.98 0.675277829170227 +95.0 1081.44 0.6762551665306091 +96.0 1088.9 0.6770205497741699 +97.0 1096.36 0.6774681806564331 +98.0 1103.82 0.6774006485939026 +99.0 1111.28 0.6764591932296753 +100.0 1118.74 0.673590362071991 +101.0 1126.2 0.6681842803955078 +102.0 1133.66 0.6536589860916138 +103.0 1141.11 0.6315978765487671 +104.0 1148.57 0.6021460890769958 +105.0 1156.03 0.5641721487045288 +106.0 1163.49 0.5147503614425659 +107.0 1170.95 0.47651395201683044 +108.0 1178.4 0.46752578020095825 +109.0 1185.86 0.4584161341190338 +110.0 1193.32 0.4474663734436035 +111.0 1200.78 0.4522498846054077 +112.0 1208.23 0.4766034185886383 +113.0 1215.69 0.5139057040214539 +114.0 1223.15 0.5455852150917053 +115.0 1230.6 0.5756795406341553 +116.0 1238.06 0.5938326120376587 +117.0 1245.52 0.6074953079223633 +118.0 1252.97 0.6155204176902771 +119.0 1260.43 0.6213420629501343 +120.0 1267.88 0.626502513885498 +121.0 1275.34 0.6302666664123535 +122.0 1282.79 0.6338765025138855 +123.0 1290.25 0.6362940669059753 +124.0 1297.71 0.6387479901313782 +125.0 1305.16 0.6406810283660889 +126.0 1312.61 0.6425653100013733 +127.0 1320.07 0.6436771750450134 +128.0 1327.52 0.6437522172927856 +129.0 1334.98 0.6424827575683594 +130.0 1342.43 0.6389361023902893 +131.0 1349.88 0.630782425403595 +132.0 1357.33 0.6171581745147705 +133.0 1364.79 0.5852709412574768 +134.0 1372.24 0.5392948985099792 +135.0 1379.69 0.48536738753318787 +136.0 1387.14 0.4588876962661743 +137.0 1394.59 0.44352078437805176 +138.0 1402.04 0.4317951202392578 +139.0 1409.49 0.427686870098114 +140.0 1416.94 0.4207363426685333 +141.0 1424.39 0.4170941114425659 +142.0 1431.84 0.42972996830940247 +143.0 1439.29 0.45448872447013855 +144.0 1446.74 0.476304292678833 +145.0 1454.19 0.49118682742118835 +146.0 1461.64 0.5044753551483154 +147.0 1469.08 0.5115721225738525 +148.0 1476.53 0.5199613571166992 +149.0 1483.98 0.5282018184661865 +150.0 1491.43 0.5351523160934448 +151.0 1498.87 0.5422664880752563 +152.0 1506.32 0.5464701652526855 +153.0 1513.76 0.547409176826477 +154.0 1521.21 0.547228991985321 +155.0 1528.65 0.548639178276062 +156.0 1536.1 0.5517639517784119 +157.0 1543.55 0.5547364354133606 +158.0 1550.99 0.5574912428855896 +159.0 1558.43 0.5606712102890015 +160.0 1565.88 0.5620115399360657 +161.0 1573.32 0.5605384707450867 +162.0 1580.76 0.556462824344635 +163.0 1588.21 0.5530409216880798 +164.0 1595.65 0.5497223734855652 +165.0 1603.09 0.546527624130249 +166.0 1610.53 0.5423799157142639 +167.0 1617.97 0.5378744602203369 +168.0 1625.41 0.5312041640281677 +169.0 1632.85 0.5215775966644287 +170.0 1640.29 0.5168739557266235 +171.0 1647.73 0.5116382241249084 +172.0 1655.17 0.499271035194397 +173.0 1662.61 0.47322022914886475 +174.0 1670.05 0.4430335760116577 +175.0 1677.48 0.40547263622283936 +176.0 1684.92 0.3390773832798004 +177.0 1692.36 0.25810861587524414 +178.0 1699.8 0.1791044920682907 +179.0 1707.23 0.1352822482585907 +180.0 1714.67 0.10859555006027222 +181.0 1722.1 0.115684375166893 +182.0 1729.54 0.1397732049226761 +183.0 1736.97 0.1472100019454956 +184.0 1744.41 0.14284825325012207 +185.0 1751.84 0.14456862211227417 +186.0 1759.27 0.15456554293632507 +187.0 1766.71 0.16737808287143707 +188.0 1774.14 0.17227472364902496 +189.0 1781.57 0.17875877022743225 +190.0 1789.01 0.1877754181623459 +191.0 1796.44 0.19868479669094086 +192.0 1803.87 0.20558668673038483 +193.0 1811.3 0.20768162608146667 +194.0 1818.73 0.20557254552841187 +195.0 1826.16 0.20239177346229553 +196.0 1833.59 0.20369960367679596 +197.0 1841.02 0.20757277309894562 +198.0 1848.45 0.20991601049900055 +199.0 1855.88 0.2128129005432129 +200.0 1863.31 0.21914520859718323 +201.0 1870.73 0.2281704992055893 +202.0 1878.16 0.2350170761346817 +203.0 1885.59 0.24127838015556335 +204.0 1893.01 0.2424960881471634 +205.0 1900.44 0.24044322967529297 +206.0 1907.86 0.24209430813789368 +207.0 1915.29 0.24409396946430206 +208.0 1922.71 0.2427535206079483 +209.0 1930.14 0.24078190326690674 +210.0 1937.56 0.2393532544374466 +211.0 1944.98 0.23929332196712494 +212.0 1952.41 0.24039950966835022 +213.0 1959.83 0.2420908808708191 +214.0 1967.25 0.24311429262161255 +215.0 1974.67 0.24461141228675842 +216.0 1982.09 0.24646444618701935 +217.0 1989.51 0.24818310141563416 +218.0 1996.94 0.24822141230106354 +219.0 2004.35 0.24801130592823029 +220.0 2011.77 0.24793308973312378 +221.0 2019.19 0.24734248220920563 +222.0 2026.61 0.24615289270877838 +223.0 2034.03 0.24533115327358246 +224.0 2041.45 0.2445199191570282 +225.0 2048.86 0.24247059226036072 +226.0 2056.28 0.24088159203529358 +227.0 2063.7 0.24155139923095703 +228.0 2071.11 0.24387983977794647 +229.0 2078.53 0.2461971789598465 +230.0 2085.94 0.24673722684383392 +231.0 2093.36 0.2464086413383484 +232.0 2100.77 0.24541743099689484 +233.0 2108.18 0.24331450462341309 +234.0 2115.59 0.24038568139076233 +235.0 2123.01 0.2392231822013855 +236.0 2130.42 0.23791983723640442 +237.0 2137.83 0.23546980321407318 +238.0 2145.24 0.23373286426067352 +239.0 2152.65 0.23205076158046722 +240.0 2160.06 0.23024988174438477 +241.0 2167.47 0.22848621010780334 +242.0 2174.88 0.2266269326210022 +243.0 2182.28 0.22423645853996277 +244.0 2189.69 0.21964767575263977 +245.0 2197.1 0.21352262794971466 +246.0 2204.5 0.20390574634075165 +247.0 2211.91 0.1937815099954605 +248.0 2219.31 0.18239915370941162 +249.0 2226.72 0.1677698940038681 +250.0 2234.12 0.15420596301555634 +251.0 2241.53 0.13748988509178162 +252.0 2248.93 0.12170496582984924 +253.0 2256.33 0.106632761657238 +254.0 2263.73 0.09046098589897156 +255.0 2271.14 0.07647919654846191 +256.0 2278.54 0.06083695963025093 +257.0 2285.94 0.049169521778821945 +258.0 2293.34 0.04194088280200958 +259.0 2300.74 0.038216255605220795 +260.0 2308.14 0.03651366010308266 +261.0 2315.53 0.03761517256498337 +262.0 2322.93 0.039791375398635864 +263.0 2330.33 0.04063376039266586 +264.0 2337.73 0.041636109352111816 +265.0 2345.12 0.04218612611293793 +266.0 2352.52 0.04069185256958008 +267.0 2359.91 0.039233673363924026 +268.0 2367.31 0.038307201117277145 +269.0 2374.7 0.03820018470287323 +270.0 2382.09 0.03932589292526245 +271.0 2389.49 0.04020627960562706 +272.0 2396.88 0.03976504132151604 +273.0 2404.27 0.04020681977272034 +274.0 2411.66 0.04207724705338478 +275.0 2419.05 0.04417923092842102 +276.0 2426.44 0.045346856117248535 +277.0 2433.83 0.04582918435335159 +278.0 2441.22 0.045737843960523605 +279.0 2448.61 0.045526791363954544 +280.0 2455.99 0.04576978087425232 +281.0 2463.38 0.04734033718705177 +282.0 2470.77 0.048217810690402985 +283.0 2478.15 0.048539649695158005 +284.0 2485.54 0.04903135821223259 +285.0 2492.92 0.05101119354367256 diff --git a/plastic/parallel_mf_plastic.py b/plastic/parallel_mf_plastic.py new file mode 100644 index 0000000..b6f179e --- /dev/null +++ b/plastic/parallel_mf_plastic.py @@ -0,0 +1,503 @@ +#! /usr/bin/env python +# +# Copyright 2022 California Institute of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ISOFIT: Imaging Spectrometer Optimal FITting +# Authors: David R. Thompson +# Brian Bue +# Philip G. Brodrick, philip.brodrick@jpl.nasa.gov + +import argparse +from spectral.io import envi + +from os import makedirs +from os.path import join as pathjoin, exists as pathexists +import scipy +import numpy as np +import pylab as plt + +from sklearn.cluster import MiniBatchKMeans +import logging + +import os +os.environ['SPECTRAL_DATA'] = '/restrela/Documents/emit-ghg-main/' + +ppmscaling = 1 +CH4_WL = [2137, 2493] +CO2_WL = [1922, 2337] + +PLASTIC_WL_lowertrim = [380,1300] +PLASTIC_WL_midtrim = [1400,1790] +PLASTIC_WL_uppertrim = [2000,2400] + +# 1320-1440 nm and 1770-1970 nm + + +def main(input_args=None): + parser = argparse.ArgumentParser(description="Robust MF") + parser.add_argument('-k', '--kmodes', type=int, default=1, help='number of columnwise modes (k-means clusters)') + parser.add_argument('-r', '--reject', action='store_true', help='enable multimodal covariance outlier rejection') + parser.add_argument('-f', '--full', action='store_true', help='regularize multimodal estimates with the full column covariariance') + parser.add_argument('--pcadim', default=6, type=int, help='number of PCA dimensions to use') + parser.add_argument('-m', '--metadata', action='store_true', help='save metadata image') + parser.add_argument('-R', '--reflectance', action='store_true', help='reflectance signature') + parser.add_argument('-M', '--model', type=str, default='looshrinkage', help='model name (looshrinkage (default)|empirical)') + parser.add_argument('-n', '--num_cores', type=int, default=-1, help='number of cores (-1 (default))') + parser.add_argument('--ray_temp_dir', type=str, default=None, help='ray temp directory (None (default))') + parser.add_argument('--loglevel', type=str, default='DEBUG', help='logging verbosity') + parser.add_argument('--logfile', type=str, default=None, help='output file to write log to') + parser.add_argument('--threshold', type=float, default=None, help='Max-value threshold for connectivity and vis.') + parser.add_argument('--connectivity', type=int, default=None, help='Number of connected components for plume detection.') + parser.add_argument('--use_ace_filter', action='store_true', help='Use the Adaptive Cosine Estimator (ACE) Filter') + parser.add_argument('--output_whitened_spectra', default='', help='Use the Adaptive Cosine Estimator (ACE) Filter') + parser.add_argument('radiance_file', type=str, metavar='INPUT', help='path to input image') + parser.add_argument('library', type=str, metavar='LIBRARY', help='path to target library file') + parser.add_argument('output', type=str, metavar='OUTPUT', help='path for output image (mf ch4 ppm)') + args = parser.parse_args(input_args) + + + logging.basicConfig(format='%(levelname)s:%(asctime)s ||| %(message)s', level=args.loglevel, + filename=args.logfile, datefmt='%Y-%m-%d,%H:%M:%S') + + + radiance_file = args.radiance_file + if radiance_file.endswith('.img'): + radiance_filehdr = radiance_file.replace('.img','.hdr') + else: + radiance_filehdr = radiance_file + '.hdr' + + baseoutfile = args.output + if baseoutfile.endswith('.img'): + baseoutfilehdr = baseoutfile.replace('.img','.hdr') + else: + baseoutfilehdr = baseoutfile + '.hdr' + + # columnwise spectral averaging function + colavgfn = np.mean + + logging.info('Started processing input file: "%s"'%str(radiance_file)) + img = envi.open(radiance_filehdr,image=radiance_file) + img_mm = img.open_memmap(interleave='source',writeable=False) + logging.debug('Memmap openned: "%s"'%str(radiance_file)) + nrows,nbands,ncols = img_mm.shape + + # define active channels wrt target gas + measurement units + if 'wavelength' not in img.metadata: + sys.exit(0) + wavelengths = np.array([float(x) for x in img.metadata['wavelength']]) + # cond_wav = ((wavelengths < 1320) | (wavelengths > 1440)) & ((wavelengths < 1770) | (wavelengths > 1970)) + cond_wav = (wavelengths > 1440) | (wavelengths < 1770) + #wavelenghts = wavelengths[cond_wav] + if 'ch4' in args.library: + active = [np.argmin(np.abs(wavelengths - x)) for x in CH4_WL] + logging.debug(f'CH4 active chanels: {active}') + elif 'co2' in args.library: + active = [np.argmin(np.abs(wavelengths - x)) for x in CO2_WL] + logging.debug(f'CO2 active chanels: {active}') + # active = [np.argmin(np.abs(wavelengths - x)) for x in PLASTIC_WL] + elif 'Plastic' in args.library: + active = [np.argmin(np.abs(wavelengths - x)) for x in PLASTIC_WL_lowertrim] + active2 = [np.argmin(np.abs(wavelengths - x)) for x in PLASTIC_WL_midtrim] + active3 = [np.argmin(np.abs(wavelengths - x)) for x in PLASTIC_WL_uppertrim] + logging.debug(f'Plastic active chanels: {active}') + logging.debug(f'Plastic active chanels: {active2}') + logging.debug(f'Plastic active chanels: {active3}') + else: + logging.error('could not set active range - neither co2 nor ch4 found in library name') + sys.exit(0) + + img_mm1 = img.open_memmap(interleave='source',writeable=False)[:,active[0]-1:active[1],:] + img_mm2 = img.open_memmap(interleave='source',writeable=False)[:,active2[0]-1:active2[1],:] + img_mm3 = img.open_memmap(interleave='source',writeable=False)[:,active3[0]-1:active3[1],:] + img_mm = np.hstack((img_mm1,img_mm2,img_mm3)) + + # load the gas spectrum + libdata = np.float64(np.loadtxt(args.library)) + abscf1=libdata[active[0]-1:active[1],2] + abscf2 = libdata[active2[0]-1:active2[1],2] + abscf3 = libdata[active3[0]-1:active3[1],2] + abscf = np.concatenate((abscf1,abscf2,abscf3)) + + # want bg modes to have at least as many samples as 120% x (# features) + #bgminsamp = int((active[1]-active[0])*1.2) + bgminsamp = int(((active[1]-active[0])+(active2[1]-active2[0])+(active3[1]-active3[0]))*1.2) + bgmodel = 'unimodal' if args.kmodes==1 else 'multimodal' + + # alphas for leave-one-out cross validation shrinkage + if args.model == 'looshrinkage': + astep,aminexp,amaxexp = 0.05,-10.0,0.0 + alphas=(10.0 ** np.arange(aminexp,amaxexp+astep,astep)) + nll=np.zeros(len(alphas)) + + + # Get header info + outmeta = img.metadata + outmeta['lines'] = nrows + outmeta['data type'] = np2envitype(np.float64) + outmeta['bands'] = 1 + outmeta['description'] = 'matched filter results' + outmeta['band names'] = 'mf' + + outmeta['interleave'] = 'bip' + for kwarg in ['smoothing factors','wavelength','wavelength units','fwhm']: + outmeta.pop(kwarg,None) + + nodata = float(outmeta.get('data ignore value',-9999)) + if nodata > 0: + raise Exception('nodata value=%f > 0, values will not be masked'%nodata) + + modelparms = 'modelname={args.model}, bgmodel={bgmodel}' + if args.kmodes > 1: + modelparms += ', bgmodes={args.kmodes}, pcadim={args.pcadim}, reject={args.reject}' + if args.model == 'looshrinkage': + modelparms += ', regfull={args.full}' + + if args.model == 'looshrinkage': + modelparms += ', aminexp={aminexp}, amaxexp={amaxexp}, astep={astep}' + + modelparms += ', reflectance={args.reflectance}, active_bands={active}' + + outdict = locals() + outdict.update(globals()) + outmeta['model parameters'] = '{ %s }'%(modelparms.format(**outdict)) + + # Create output image + outimg = envi.create_image(baseoutfilehdr,outmeta,force=True,ext='') + outimg_mm = outimg.open_memmap(interleave='source',writable=True) + assert((outimg_mm.shape[0]==nrows) & (outimg_mm.shape[1]==ncols)) + # Set values to nodata + outimg_mm[...] = nodata + + if args.metadata: + # output image of bgster membership labels per column + bgfile=baseoutfile+'_bg' + bgfilehdr=envi_header(bgfile) + bgmeta = outmeta + bgmeta['bands'] = 2 + bgmeta['data type'] = np2envitype(np.uint16) + bgmeta['num alphas'] = len(alphas) + bgmeta['alphas'] = '{%s}'%(str(alphas)[1:-1]) + bgmeta['band names'] = '{cluster_count, alpha_index}' + bgimg = envi.create_image(bgfilehdr,bgmeta,force=True,ext='') + bgimg_mm = bgimg.open_memmap(interleave='source',writable=True) + + outimg_shp = (outimg_mm.shape[0],1,outimg_mm.shape[2]) + bgimg_shp = None + if args.metadata: + bgimg_shp = (bgimg_mm.shape[0],1,bgimg_mm.shape[2]) + del outimg_mm + + + # Run jobs in parallel + #rayargs = {'_temp_dir': args.ray_temp_dir, 'ignore_reinit_error': True, 'include_dashboard': False} + #if args.num_cores != -1: + # rayargs['num_cpus'] = args.num_cores + #else: + # import multiprocessing + # rayargs['num_cpus'] = multiprocessing.cpu_count() - 1 + #ray.init(**rayargs) + img_mm_id = img_mm.copy()#ray.put(img_mm.copy()) + abscf_id = abscf.copy() #ray.put(abscf) + + #jobs = [mf_one_column.remote(col,img_mm_id, bgminsamp, outimg_shp, bgimg_shp, abscf_id, args) for col in np.arange(ncols)] + #rreturn = [ray.get(jid) for jid in jobs] + rreturn = [mf_one_column(col,img_mm_id, bgminsamp, outimg_shp, bgimg_shp, abscf_id, args) for col in np.arange(ncols)] + + outimg_mm = outimg.open_memmap(interleave='source',writable=True) + for ret in rreturn: + if ret[0] is not None: + outimg_mm[:, ret[2],-1] = np.squeeze(ret[0]) + if args.metadata: + bgimg_mm[:, ret[2] ,-1] = np.squeeze(ret[1]) + + logging.info('Complete') + +def randperm(*args): + n = args[0] + k = n if len(args) < 2 else args[1] + return np.random.permutation(n)[:k] + +def np2envitype(np_dtype): + _dtype = np.dtype(np_dtype).char + return envi.dtype_to_envi[_dtype] + +def cov(A,**kwargs): + """ + cov(A,**kwargs) + + Summary: computes covariance that matches matlab covariance function (ddof=1) + + Arguments: + - A: n x m array of n samples with m features per sample + + Keyword Arguments: + - same as numpy.cov + + Output: + m x m covariance matrix + """ + + kwargs.setdefault('ddof',1) + return np.cov(A.T,**kwargs) + +def inv(A,**kwargs): + kwargs.setdefault('overwrite_a',False) + kwargs.setdefault('check_finite',False) + return scipy.linalg.inv(A,**kwargs) + +def eig(A,**kwargs): + kwargs.setdefault('overwrite_a',False) + kwargs.setdefault('check_finite',False) + kwargs.setdefault('left',False) + kwargs.setdefault('right',True) + return scipy.linalg.eig(A,**kwargs) + +def det(A,**kwargs): + kwargs.setdefault('overwrite_a',False) + kwargs.setdefault('check_finite',False) + return scipy.linalg.det(A,**kwargs) + +#@ray.remote +def par_looshrinkage(I_zm,alpha,nll,n,I_reg=[]): + # loocv shrinkage estimation via Theiler et al. + print(f'starting {alpha}') + stability_scaling=100.0 + nchan = I_zm.shape[1] + + X = I_zm*stability_scaling + S = cov(X) + T = np.diag(np.diag(S)) if len(I_reg)==0 else cov(I_reg*stability_scaling) + + nchanlog2pi = nchan*np.log(2.0*np.pi) + + # Closed form for leave one out cross validation error + try: + # See Theiler, "The Incredible Shrinking Covariance Estimator", + # Proc. SPIE, 2012. eqn. 29 + beta = (1.0-alpha) / (n-1.0) + G_alpha = n * (beta*S) + (alpha*T) + G_det = det(G_alpha) + if G_det==0: + return np.nan + r_k = (X.dot(inv(G_alpha)) * X).sum(axis=1) + q = 1.0 - beta * r_k + print(f'completed {alpha}') + return 0.5*(nchanlog2pi+np.log(G_det))+1.0/(2.0*n) * \ + (np.log(q)+(r_k/q)).sum() + except np.linalg.LinAlgError: + logging.warning('looshrinkage encountered a LinAlgError') + return np.nan + + +def looshrinkage(I_zm,alphas,nll,n,I_reg=[]): + # loocv shrinkage estimation via Theiler et al. + stability_scaling=100.0 + nchan = I_zm.shape[1] + + C = cov(I_zm)+np.eye(nchan)*1e-10 + return C,1 + + X = I_zm*stability_scaling + S = cov(X) + T = np.diag(np.diag(S)) if len(I_reg)==0 else cov(I_reg*stability_scaling) + + nchanlog2pi = nchan*np.log(2.0*np.pi) + nll[:] = np.inf + + # Closed form for leave one out cross validation error + for i,alpha in enumerate(alphas): + try: + # See Theiler, "The Incredible Shrinking Covariance Estimator", + # Proc. SPIE, 2012. eqn. 29 + beta = (1.0-alpha) / (n-1.0) + G_alpha = n * (beta*S) + (alpha*T) + G_det = det(G_alpha) + if G_det==0: + continue + r_k = (X.dot(inv(G_alpha)) * X).sum(axis=1) + q = 1.0 - beta * r_k + nll[i] = 0.5*(nchanlog2pi+np.log(G_det))+1.0/(2.0*n) * \ + (np.log(q)+(r_k/q)).sum() + except np.linalg.LinAlgError: + logging.warning('looshrinkage encountered a LinAlgError') + + mindex = np.argmin(nll) + + if nll[mindex]!=np.inf: + alpha = alphas[mindex] + else: + mindex = -1 + alpha = 0.0 + + # Final nonregularized covariance and shrinkage target + S = cov(I_zm) + T = np.diag(np.diag(S)) if len(I_reg)==0 else cov(I_reg) + + # Final covariance + C = (1.0 - alpha) * S + alpha * T + + return C,mindex + + +#@ray.remote +def mf_one_column(col, img_mm, bgminsamp, outimg_mm_shape, bgimg_mm_shape, abscf, args): + + + logging.basicConfig(format='%(levelname)s:%(asctime)s ||| %(message)s', level=args.loglevel, + filename=args.logfile, datefmt='%Y-%m-%d,%H:%M:%S') + + logging.debug(f'Col: {col}') + bgmodes = args.kmodes + reject = args.reject + regfull = args.full + reflectance = args.reflectance + savebgmeta = args.metadata + modelname = args.model + pcadim = args.pcadim + use_ace_filter = args.use_ace_filter + + # alphas for leave-one-out cross validation shrinkage + if args.model == 'looshrinkage': + astep,aminexp,amaxexp = 0.05,-10.0,0.0 + alphas=(10.0 ** np.arange(aminexp,amaxexp+astep,astep)) + nll=np.zeros(len(alphas)) + + + outimg_mm = np.zeros((outimg_mm_shape)) + if savebgmeta: + bgimg_mm = np.zeros((outimg_mm_shape)) + else: + bgimg_mm = None + + # exclude nonfinite + negative spectra in covariance estimates + #useidx = lambda Icolz: np.where(((~(Icolz<0)) & np.isfinite(Icolz)).all(axis=1))[0] + # columnwise spectral averaging function + colavgfn = np.mean + + Icol_full=img_mm[...,col] + use = np.where(np.all(np.logical_and(np.isfinite(Icol_full), Icol_full > -0.05), axis=1))[0] + Icol = np.float64(Icol_full[use,:].copy()) + nuse = Icol.shape[0] + + if nuse == 0: + return None, None, None + if len(use) == 1: + bglabels = np.ones(nuse) + bgulab = np.array([1]) + return None, None, None + if bgmodes > 1: + # PCA projection down to a smaller number of dimensions + # then apply K-means to separate spatially into clusters + Icol_zm = Icol-colavgfn(Icol,axis=0) + evals,evecs = eig(cov(Icol_zm)) + Icol_pca = Icol_zm.dot(evecs[:,:pcadim]) + cmodel = MiniBatchKMeans(n_clusters=bgmodes) + if np.iscomplexobj(Icol_pca): + return None, None, None + bglabels = cmodel.fit(Icol_pca).labels_ + bgulab = np.unique(bglabels) + bgcounts = [] + bgulabn = np.zeros(len(bgulab)) + for i,l in enumerate(bgulab): + lmask = bglabels==l + bgulabn[i] = lmask.sum() + if reject and bgulabn[i] < bgminsamp: + logging.debug('Flagged outlier cluster %d (%d samples)'%(l,bgulabn[i])) + bglabels[lmask] = -l + bgulab[i] = -l + bgcounts.append("%d: %d"%(l,bgulabn[i])) + + if savebgmeta: + bgimg_mm[use[lmask],0,0] = bgulabn[i] + + logging.debug('bg cluster counts:',', '.join(bgcounts)) + if (bgulab<0).all(): + logging.warning('all clusters rejected, proceeding without rejection (beware!)') + bglabels,bgulab = abs(bglabels),abs(bgulab) + + else: # bgmodes==1 + bglabels = np.ones(nuse) + bgulab = np.array([1]) + # operate independently on each columnwise partition + for ki in bgulab: + # if bglabel<0 (=rejected), estimate using all (nonrejected) modes + kmask = bglabels==ki if ki >= 0 else bglabels>=0 + + # need to recompute mu and associated vars wrt this cluster + Icol_ki = (Icol if bgmodes == 1 else Icol[kmask,:]).copy() + + Icol_sub = Icol_ki.copy() + mu = colavgfn(Icol_sub,axis=0) + # reinit model/modelfit here for each column/cluster instance + if modelname == 'empirical': + modelfit = lambda I_zm: cov(I_zm) + elif modelname == 'looshrinkage': + # optionally use the full zero mean column as a regularizer + Icol_reg = Icol-mu if (regfull and bgmodes>1) else [] + modelfit = lambda I_zm: looshrinkage(I_zm,alphas,nll, + nuse,I_reg=Icol_reg) + + try: + Icol_sub = Icol_sub-mu + Icol_model = modelfit(Icol_sub) + if modelname=='looshrinkage': + C,alphaidx = Icol_model + Cinv=inv(C) + if savebgmeta: + bgimg_mm[use[kmask],0,1] = alphaidx + elif modelname=='empirical': + Cinv = inv(Icol_model) + else: + Cinv = Icol_model + + except np.linalg.LinAlgError: + logging.warn('singular matrix. skipping this column mode.') + outimg_mm[use[kmask],0,-1] = 0 + return None, None, None + + # Classical matched filter + Icol_ki = Icol_ki-mu # = fully-sampled column mode + target = abscf.copy() + target = target-mu if reflectance else target*mu + normalizer = target.dot(Cinv).dot(target.T) + + if use_ace_filter: + # Self Mahalanobis distance + rx = np.sum(Icol_ki @ Cinv * Icol_ki, axis = 1) + # ACE filter normalization + #normalizer = np.sqrt(normalizer * rx) + normalizer = normalizer * rx + + mf = (Icol_ki.dot(Cinv).dot(target.T)) / normalizer + + if reflectance: + outimg_mm[use[kmask],0,-1] = mf + else: + outimg_mm[use[kmask],0,-1] = mf*ppmscaling + + colmu = outimg_mm[use[bglabels>=0],0,-1].mean() + logging.debug('Column %i mean: %e'%(col,colmu)) + return outimg_mm, bgimg_mm, col + + + + +if __name__ == '__main__': + main() + #ray.shutdown() + + + + diff --git a/plume_tracking/README.md b/plume_tracking/README.md new file mode 100644 index 0000000..52cb152 --- /dev/null +++ b/plume_tracking/README.md @@ -0,0 +1 @@ +This repository contains code and data to accompany the manuscript "Direct Measurement of Plume Velocity to Characterize Point Source Emissions," by Eastwood, Thompson, Green, Fahlen et al. diff --git a/plume_tracking/data/AV320250126t183602_66989_CH4_stack_rgb.png b/plume_tracking/data/AV320250126t183602_66989_CH4_stack_rgb.png new file mode 100644 index 0000000..7872366 Binary files /dev/null and b/plume_tracking/data/AV320250126t183602_66989_CH4_stack_rgb.png differ diff --git a/plume_tracking/data/manual_mask.png b/plume_tracking/data/manual_mask.png new file mode 100644 index 0000000..2dde42f Binary files /dev/null and b/plume_tracking/data/manual_mask.png differ diff --git a/plume_tracking/data/windspeed_estimates.xlsx b/plume_tracking/data/windspeed_estimates.xlsx new file mode 100644 index 0000000..4501cd2 Binary files /dev/null and b/plume_tracking/data/windspeed_estimates.xlsx differ diff --git a/plume_tracking/output/README.txt b/plume_tracking/output/README.txt new file mode 100644 index 0000000..918511d --- /dev/null +++ b/plume_tracking/output/README.txt @@ -0,0 +1 @@ +This directory holds output from the experiment diff --git a/plume_tracking/step1_track_plume.py b/plume_tracking/step1_track_plume.py new file mode 100644 index 0000000..0d3d57b --- /dev/null +++ b/plume_tracking/step1_track_plume.py @@ -0,0 +1,153 @@ +# David R Thompson david.r.thompson@jpl.nasa.gov +# Optical plume tracking + +import cv2 +import numpy as np +from sklearn.gaussian_process import GaussianProcessRegressor +from sklearn.gaussian_process.kernels import ConstantKernel, RBF + + +# Function to preprocess the channels as frames +def split_channels_as_frames(image_path): + # Read the image + image = cv2.imread(image_path) + + if image is None: + raise FileNotFoundError(f"Could not read the image at {image_path}") + + # Split the image into R, G, and B channels + b, g, r = cv2.split(image) + return [r,g,b] + + +separations = [0,15,12] # seconds between frames +GSD = 2.5 +ycutoff = [30,550] # part of the image to analyze +source = [556,141] # source pixel location +manual_mask = np.any(cv2.imread('data/manual_mask.png'),axis=2) + + +# Function to track features across frames using Optical Flow +def track_features_with_optical_flow(frames, prefix,thresh=150): + + # Convert the first frame to grayscale + prev_gray = frames[0] + output_frame = cv2.cvtColor(np.array(prev_gray/2+100,dtype=np.uint8), cv2.COLOR_GRAY2BGR) + cv2.imwrite("output/%s_frame_0.png"%(prefix),prev_gray)#output_frame) + cv2.imwrite("output/%s_frame_0_gray.png"%(prefix),prev_gray) + + # Detect good features to track in the first frame + features = cv2.goodFeaturesToTrack(prev_gray, maxCorners=500, qualityLevel=0.01, minDistance=5) + + for i in range(1, len(frames)): + + stationary_threshold = separations[i]/GSD*1.0 # 1 mps min speed for time separation + + gpxk = ConstantKernel(1.0) * RBF(50.0) + gpyk = ConstantKernel(1.0) * RBF(50.0) + gpx = GaussianProcessRegressor(kernel=gpxk, alpha=10,normalize_y = True) + gpy = GaussianProcessRegressor(kernel=gpyk, alpha=10,normalize_y = True) + dists_to_source = [] + curr_gray = frames[i] + + # Calculate optical flow + next_features, st, err = cv2.calcOpticalFlowPyrLK(prev_gray, curr_gray, features, + None, winSize=(31, 31), maxLevel=5, + criteria=(cv2.TERM_CRITERIA_EPS, 100, 0.01)) + + # Select the points that have been tracked + good_prev = features[st == 1] + good_next = next_features[st == 1] + + # Calculate motion vectors and average velocity + motion_vectors = good_next - good_prev + + blur_prev = cv2.blur(prev_gray, (5, 5)) + blur_next = cv2.blur(curr_gray, (5, 5)) + + use = [] + for j in range(good_next.shape[0]): + + good = good_next[j] + goodp = good_prev[j] + try: + if blur_next[int(good[1]),int(good[0])] > thresh and \ + blur_prev[int(goodp[1]),int(goodp[0])] > thresh and \ + np.sqrt(sum(pow(motion_vectors[j,:],2))) > stationary_threshold: + use.append(j) + + except IndexError: + continue + + use = np.array(use,dtype=int) + motion_vectors = motion_vectors[use,:] + + # Our estimate is the median + median_velocity = np.median(motion_vectors, axis=0) + + # Bootstrap uncertainties + bootstrap_medians = [] + nboot = 10000 + for iteration in range(nboot): + samples = np.random.choice(np.arange(motion_vectors.shape[0]), + size=motion_vectors.shape[0]) + my_median = np.median(motion_vectors[samples,:], axis=0) + bootstrap_medians.append(my_median) + bootstrap_medians = np.array(bootstrap_medians) + np.savetxt('output/%s_frame_%i_boot.csv'%(prefix,i),bootstrap_medians,delimiter=',',fmt='%10.8f') + + print(f"Frame {i}: median velocity = {median_velocity} pixels/frame") + + gpx.fit(good_next, good_prev[:,0]) + gpy.fit(good_next, good_prev[:,1]) + gridx, gridy = np.meshgrid(np.arange(0,curr_gray.shape[1],15), + np.arange(0,curr_gray.shape[0],15)) + gridx = gridx.flatten() + gridy = gridy.flatten() + xpred = gpx.predict(np.c_[gridx,gridy]) + ypred = gpy.predict(np.c_[gridx,gridy]) + + # Visualize the tracked points and motion vectors with GP + resize_factor = 5 + large = cv2.resize(prev_gray,np.array([prev_gray.shape[1],prev_gray.shape[0]])*resize_factor) + output_frame = cv2.cvtColor(np.array(155+large/3,dtype=np.uint8), cv2.COLOR_GRAY2BGR) + for ny, nx, py, px in zip(ypred,xpred,gridy.flatten(), gridx.flatten()): + + dist_to_source = np.sqrt(pow(ny-source[1],2)+pow(nx-source[0],2)) + dists_to_source.append(dist_to_source) + + if blur_prev[int(py),int(px)] > thresh and \ + blur_next[int(ny),int(nx)] > thresh and py>ycutoff[0] and py2: %f meters per second (95%% confidence: %f to %f)"%(pair1_velocity, pair1_pct2p5, pair1_pct97p5)) + + +# Calculate estimate and bootstrap confidence intervals for pair 2 +pair2_separation_s = 27 - 15 +pair2_pixel_vector = np.array([10.7,-15.2]) + +pair2_velocity = calc_plume_velocity(pair2_pixel_vector, pair2_separation_s) + +pair2_pixel_vector_samples = np.loadtxt('output/AV320250126t183602_frame_2_boot.csv', delimiter=',') +pair2_velocity_samples = np.array([calc_plume_velocity(q, pair2_separation_s) \ + for q in pair2_pixel_vector_samples]) +pair2_pct2p5 = np.percentile(pair2_velocity_samples,2.5) +pair2_pct97p5 = np.percentile(pair2_velocity_samples,97.5) +print("Frames 2->3: %f meters per second (95%% confidence: %f to %f)"%(pair2_velocity, pair2_pct2p5, pair2_pct97p5)) + +print("Average velocity: ",(pair1_velocity+pair2_velocity)/2.0) diff --git a/plume_tracking/step3_calculate_parallax.xlsx b/plume_tracking/step3_calculate_parallax.xlsx new file mode 100644 index 0000000..e5d8eb8 Binary files /dev/null and b/plume_tracking/step3_calculate_parallax.xlsx differ diff --git a/plume_tracking/step4_estimate_flux.xlsx b/plume_tracking/step4_estimate_flux.xlsx new file mode 100644 index 0000000..b14a103 Binary files /dev/null and b/plume_tracking/step4_estimate_flux.xlsx differ diff --git a/plume_tracking/step5_plot_results.py b/plume_tracking/step5_plot_results.py new file mode 100644 index 0000000..63ed6a5 --- /dev/null +++ b/plume_tracking/step5_plot_results.py @@ -0,0 +1,79 @@ +# David R Thompson +# David R Thompson + +from sklearn.gaussian_process import GaussianProcessRegressor +from sklearn.gaussian_process.kernels import ConstantKernel, RBF +import numpy as np +import pylab as plt +import pandas as pd + +fig, ax1 = plt.subplots() +k=2 + +# noise estimate for LIDAR +a = 0.5 + +# Read the Excel file into a DataFrame +df = pd.read_excel('data/windspeed_estimates.xlsx') + +for field, color, ls in [('LIDAR 40m', '#6666ff','--'), + ('10m wind', '#6666ff','-'), + ('LIDAR 100m','#6666ff',':')]: + + # Fit a GP + gpk = ConstantKernel(1.0) * RBF(50.0) + gp40m = GaussianProcessRegressor(kernel=gpk, alpha=a,normalize_y = True) + x = df['Time index'].to_numpy()[:,np.newaxis] + y = df[field].to_numpy() + use = np.logical_and(np.all(np.isfinite(x),axis=1),np.isfinite(y)) + gp40m.fit(x[use,:],y[use]) + y_pred, y_sigma = gp40m.predict(x[use,:], return_std=True) + + # Plot the results + plt.plot(x[use,:],y_pred,linestyle=ls,color=color) + plt.fill_between(x[use,:].ravel(), y_pred - k*y_sigma, y_pred + k*y_sigma, + alpha=0.1, color=color, label='±2 std. dev.') + +plt.text(15,3.75,'LIDAR\n40 m', color='#6666ff') +plt.text(30,2,'In Situ\n10 m', color='#6666ff') +plt.text(2,4.5,'LIDAR\n100 m', color='#6666ff') + + + +# ERA5 +plt.text(100,2.55,'ERA5',color='#66aa66') +plt.plot(x,np.ones_like(x)*2.9,color='#66aa66') + +# HRRR +plt.text(100,3.1,'HRRR',color='#66aa66') +plt.plot(x,np.ones_like(x)*3.446246676,color='#66aa66') + +# Metered value +factor = 37 # scaling factor relating windspeed to flux (via IME method) +metered_value = 150 +plt.text(50,3.7,'Metered',color='#cc6666') +ival = np.logical_and(x>=48,x<=66) +plt.plot(x[ival],np.ones_like(x[ival])*metered_value/factor,color='#cc6666') + +# Remote observations +plt.plot(60,4.48,'o',color='k') +plt.plot([60,60],[4.014331,4.887689],color='k') +plt.plot(66,3.46,'o',color='k') +plt.plot([66,66],[3.062652,4.131594],color='k') +plt.text(46,4.65,'Remote',color='k') + +# Set up the plot & axes +lo = 0 +hi = 8 +plt.xlim(0,120) +plt.ylim([lo,hi]) +plt.grid(False) +plt.box(True) +plt.xlabel('UTC Time') +plt.ylabel('Wind or Plume Velocity (m s$^{-1}$)') +ax2 = ax1.twinx() +plt.xticks([0,20,40,60,80,100,120],['18:31:45','18:33:25','18:35:05','18:36:45','18:38:25','18:40:05','18:41:45']) +plt.plot([0,120],[lo*factor,hi*factor],color='w',alpha=0) +plt.ylim(lo*factor,hi*factor) +plt.ylabel('Source Emission (kg hr$^{-1}$)') +plt.savefig('output/timeseries_revised.pdf')