From 6ef916ba1ccfdf518db27a022452aa26e595438d Mon Sep 17 00:00:00 2001 From: James Szalkie Date: Thu, 21 May 2026 11:59:47 -0400 Subject: [PATCH] cmd line feature for eloss app --- ELoss/E_vs_x_proton.dat | 1000 ++++++++++++++++++------------------- ELoss/PCEnergyAnalysis.py | 183 ++++++- 2 files changed, 678 insertions(+), 505 deletions(-) diff --git a/ELoss/E_vs_x_proton.dat b/ELoss/E_vs_x_proton.dat index 34ed7c6..61524a0 100644 --- a/ELoss/E_vs_x_proton.dat +++ b/ELoss/E_vs_x_proton.dat @@ -1,501 +1,501 @@ Distance_cm Energy_MeV --0.0 30.0 -24.985989093059406 29.9398997995992 -49.93385253964537 29.879799599198396 -74.84354189791377 29.819699398797596 -99.71500875282149 29.759599198396792 -124.54820471633691 29.699498997995992 -149.34308142767225 29.63939879759519 -174.09959055350112 29.579298597194388 -198.81768378817623 29.519198396793588 -223.49731285396138 29.459098196392784 -248.13842950124163 29.398997995991984 -272.7409855087552 29.338897795591183 -297.3049326838107 29.27879759519038 -321.8302228625043 29.21869739478958 -346.3168079099498 29.15859719438878 -370.76463972049555 29.098496993987975 -395.17367021794155 29.038396793587175 -419.54385135577024 28.97829659318637 -443.8751351173561 28.91819639278557 -468.1674735161964 28.85809619238477 -492.42081859612773 28.797995991983967 -516.6351224315418 28.737895791583167 -540.8103371276164 28.677795591182363 -564.9464148205236 28.617695390781563 -589.0433076776601 28.557595190380763 -613.1009678978627 28.49749498997996 -637.1193477116236 28.43739478957916 -661.0983993813202 28.377294589178355 -685.0380752014225 28.317194388777555 -708.9383274987229 28.257094188376755 -732.7991086325499 28.19699398797595 -756.6203709949835 28.13689378757515 -780.4020670110817 28.07679358717435 -804.1441491390943 28.016693386773547 -827.8465698706773 27.956593186372746 -851.5092817594665 27.896492985971943 -875.1322381018085 27.836392785571142 -898.7153921928577 27.776292585170342 -922.2586966462759 27.71619238476954 -945.762104110242 27.656092184368738 -969.2255672676789 27.595991983967934 -992.649038836458 27.535891783567134 -1016.0324715696257 27.475791583166334 -1039.3758182556153 27.41569138276553 -1062.6790317184575 27.35559118236473 -1085.9420648180067 27.295490981963926 -1109.1648704501438 27.235390781563126 -1132.347401547001 27.175290581162326 -1155.4896110771726 27.115190380761522 -1178.5914520459237 27.05509018036072 -1201.6528774954127 26.99498997995992 -1224.6738405049007 26.934889779559118 -1247.6542941909606 26.874789579158318 -1270.5941917076982 26.814689378757514 -1293.4934862469545 26.754589178356714 -1316.352131038527 26.694488977955913 -1339.1700793503765 26.63438877755511 -1361.9472844888346 26.57428857715431 -1384.6836997988241 26.514188376753506 -1407.379278664058 26.454088176352705 -1430.0339745072583 26.393987975951905 -1452.6477407903628 26.3338877755511 -1475.2205310147292 26.2737875751503 -1497.7522987213526 26.213687374749497 -1520.2429974910635 26.153587174348697 -1542.692580944745 26.093486973947897 -1565.1010027435352 26.033386773547093 -1587.4682165890308 25.973286573146293 -1609.7941762235002 25.913186372745493 -1632.0788354300864 25.85308617234469 -1654.3221480330071 25.79298597194389 -1676.5240678977696 25.732885771543085 -1698.6845495783878 25.672785571142285 -1720.8035477179735 25.612685370741485 -1742.8810163470189 25.55258517034068 -1764.916909483235 25.49248496993988 -1786.9111811866721 25.432384769539077 -1808.8637855599109 25.372284569138277 -1830.7746767482724 25.312184368737476 -1852.643808940015 25.252084168336673 -1874.4711363665303 25.191983967935872 -1896.2566133025507 25.13188376753507 -1918.000194066339 25.07178356713427 -1939.7018330198944 25.011683366733468 -1961.3614845691468 24.951583166332664 -1982.9791031641491 24.891482965931864 -2004.5546432992812 24.831382765531064 -2026.0880595134413 24.77128256513026 -2047.5793063902374 24.71118236472946 -2069.0283385581897 24.651082164328656 -2090.4351106909144 24.590981963927856 -2111.799577507324 24.530881763527056 -2133.121693771817 24.470781563126252 -2154.4014142944634 24.41068136272545 -2175.638693931206 24.350581162324648 -2196.8334875840383 24.290480961923848 -2217.9857502012032 24.230380761523048 -2239.095436777377 24.170280561122244 -2260.1625023538522 24.110180360721444 -2281.186902018735 24.05008016032064 -2302.168590907118 23.98997995991984 -2323.107524201276 23.92987975951904 -2344.0036571308465 23.869779559118236 -2364.856944973006 23.809679358717435 -2385.6673430526644 23.749579158316635 -2406.4348071519757 23.68947895791583 -2427.15929334983 23.62937875751503 -2447.840757355954 23.569278557114227 -2468.479154671791 23.509178356713427 -2489.07444084746 23.449078156312627 -2509.6265714819287 23.388977955911823 -2530.1355022231855 23.328877755511023 -2550.6011887684244 23.26877755511022 -2571.023586864209 23.20867735470942 -2591.402652306654 23.14857715430862 -2611.7383409415943 23.088476953907815 -2632.0306086647515 23.028376753507015 -2652.279411421914 22.96827655310621 -2672.4847052090954 22.90817635270541 -2692.6464460727116 22.84807615230461 -2712.764590109743 22.787975951903807 -2732.8390934678987 22.727875751503007 -2752.8699123457864 22.667775551102206 -2772.8570029930743 22.607675350701403 -2792.8003217106484 22.547575150300602 -2812.6998248507834 22.4874749498998 -2832.5554688172924 22.427374749499 -2852.367210065695 22.367274549098198 -2872.135005103371 22.307174348697394 -2891.858810489714 22.247074148296594 -2911.538582836294 22.18697394789579 -2931.1742788070032 22.12687374749499 -2950.7658551182158 22.06677354709419 -2970.3132685389373 22.006673346693386 -2989.8164758909506 21.946573146292586 -3009.275434048973 21.886472945891782 -3028.6901005011246 21.826372745490982 -3048.0604328419804 21.76627254509018 -3067.3863881504512 21.706172344689378 -3086.6679234970575 21.646072144288578 -3105.9049960060365 21.585971943887778 -3125.0975628554816 21.525871743486974 -3144.2455812774765 21.465771543086174 -3163.349008558242 21.40567134268537 -3182.407802038264 21.34557114228457 -3201.4219191124353 21.28547094188377 -3220.3913172301873 21.225370741482966 -3239.315953895617 21.165270541082165 -3258.1957866676266 21.10517034068136 -3277.030773160043 21.04507014028056 -3295.820871041752 20.98496993987976 -3314.5660380368226 20.924869739478957 -3333.266231924626 20.864769539078157 -3351.921410539966 20.804669338677353 -3370.531531773191 20.744569138276553 -3389.096553570322 20.684468937875753 -3407.616433933165 20.62436873747495 -3426.0911309194225 20.56426853707415 -3444.520602642817 20.50416833667335 -3462.9048072731957 20.444068136272545 -3481.243703036642 20.383967935871745 -3499.5372482155863 20.32386773547094 -3517.785401148908 20.26376753507014 -3535.988120232046 20.20366733466934 -3554.145364250278 20.143567134268537 -3572.257092283677 20.083466933867737 -3590.323263126672 20.023366733466933 -3608.343835383311 19.963266533066133 -3626.3187677147735 19.903166332665332 -3644.2480188394566 19.84306613226453 -3662.131547533067 19.78296593186373 -3679.9693126287157 19.722865731462925 -3697.7612730169953 19.662765531062124 -3715.507387646074 19.602665330661324 -3733.2076155217756 19.54256513026052 -3750.8619157076546 19.48246492985972 -3768.470247325083 19.42236472945892 -3786.032569553323 19.362264529058116 -3803.5488416295952 19.302164328657316 -3821.019022849162 19.242064128256512 -3838.4430725653847 19.181963927855712 -3855.8209501897995 19.12186372745491 -3873.1526151921785 19.061763527054108 -3890.438027100589 19.001663326653308 -3907.67714550146 18.941563126252504 -3924.8699300396324 18.881462925851704 -3942.01634041842 18.821362725450903 -3959.1163363996584 18.7612625250501 -3976.169877803753 18.7011623246493 -3993.176924509733 18.641062124248496 -4010.1374366966274 18.580961923847696 -4027.0513748847006 18.520861723446895 -4043.918699401661 18.46076152304609 -4060.739370341558 18.40066132264529 -4077.513347857355 18.34056112224449 -4094.2405921609575 18.280460921843687 -4110.921063523239 18.220360721442887 -4127.554722274075 18.160260521042083 -4144.1415288023545 18.100160320641283 -4160.681443556011 18.040060120240483 -4177.174427042035 17.97995991983968 -4193.6204398264845 17.91985971943888 -4210.019442534505 17.859759519038075 -4226.37139585033 17.799659318637275 -4242.67626051729 17.739559118236475 -4258.933997337813 17.67945891783567 -4275.144567173424 17.61935871743487 -4291.307930944741 17.559258517034067 -4307.424049631467 17.499158316633267 -4323.492884272378 17.439058116232466 -4339.514395965316 17.378957915831663 -4355.488545867158 17.318857715430862 -4371.4152951938095 17.258757515030062 -4387.294605220173 17.19865731462926 -4403.126437455308 17.13855711422846 -4418.910753764427 17.078456913827655 -4434.64751588586 17.018356713426854 -4450.336685309066 16.958256513026054 -4465.978223582443 16.89815631262525 -4481.572092313288 16.83805611222445 -4497.118253167747 16.777955911823646 -4512.616667870762 16.717855711422846 -4528.06729820602 16.657755511022046 -4543.470106015885 16.597655310621242 -4558.825053201339 16.537555110220442 -4574.132101721917 16.477454909819638 -4589.39121359563 16.417354709418838 -4604.602350898893 16.357254509018038 -4619.765475766447 16.297154308617234 -4634.880550391271 16.237054108216434 -4649.947537024499 16.176953907815633 -4664.966397975328 16.11685370741483 -4679.937095610916 16.05675350701403 -4694.859592356293 15.996653306613226 -4709.733850694248 15.936553106212424 -4724.559833165223 15.876452905811622 -4739.337502431002 15.81635270541082 -4754.066821565072 15.75625250501002 -4768.747753623187 15.696152304609218 -4783.380261352828 15.636052104208416 -4797.964307558663 15.575951903807614 -4812.499855102415 15.515851703406813 -4826.986866902721 15.455751503006011 -4841.42530593499 15.39565130260521 -4855.815135231254 15.335551102204407 -4870.156317880013 15.275450901803605 -4884.448817026079 15.215350701402805 -4898.692595870414 15.155250501002003 -4912.8876176699605 15.095150300601201 -4927.033845737473 15.0350501002004 -4941.131243441335 14.974949899799599 -4955.179774205385 14.914849699398797 -4969.179401508723 14.854749498997995 -4983.130088885519 14.794649298597193 -4997.031799924823 14.734549098196391 -5010.884498270353 14.67444889779559 -5024.688147620298 14.614348697394789 -5038.442711966241 14.554248496993987 -5052.148155465099 14.494148296593185 -5065.804442076637 14.434048096192384 -5079.411535691185 14.373947895791582 -5092.969400252598 14.31384769539078 -5106.477999758021 14.253747494989979 -5119.93729825765 14.193647294589177 -5133.347259854479 14.133547094188376 -5146.707848704051 14.073446893787574 -5160.019029014195 14.013346693386772 -5173.280765044769 13.95324649298597 -5186.493021107384 13.89314629258517 -5199.6557615651345 13.833046092184368 -5212.768950832318 13.772945891783566 -5225.832553374151 13.712845691382764 -5238.846533706475 13.652745490981962 -5251.81085639547 13.592645290581162 -5264.725486057345 13.53254509018036 -5277.590387358037 13.472444889779558 -5290.40552523854 13.412344689378756 -5303.170864744896 13.352244488977956 -5315.886370733883 13.292144288577154 -5328.552008042477 13.232044088176352 -5341.167741555983 13.17194388777555 -5353.733536207708 13.111843687374748 -5366.249356978614 13.051743486973947 -5378.715168896975 12.991643286573145 -5391.13093703803 12.931543086172343 -5403.496626523626 12.871442885771541 -5415.81220252186 12.811342685370741 -5428.0776302467175 12.75124248496994 -5440.292874957704 12.691142284569137 -5452.457901959474 12.631042084168335 -5464.572676601456 12.570941883767533 -5476.637164277473 12.510841683366733 -5488.651330425362 12.450741482965931 -5500.615140603891 12.390641282565129 -5512.528560550931 12.330541082164327 -5524.391555956857 12.270440881763527 -5536.204092405714 12.210340681362725 -5547.966135523849 12.150240480961923 -5559.677650979513 12.090140280561121 -5571.338604482459 12.030040080160319 -5582.948961783542 11.969939879759519 -5594.508688674309 11.909839679358717 -5606.017750986603 11.849739478957915 -5617.476114592147 11.789639278557113 -5628.883745402148 11.729539078156312 -5640.240609366887 11.66943887775551 -5651.546672475316 11.609338677354708 -5662.8019007546545 11.549238476953906 -5674.006260269989 11.489138276553104 -5685.159717163723 11.429038076152304 -5696.262237708568 11.368937875751502 -5707.313788160478 11.3088376753507 -5718.3143347050245 11.248737474949898 -5729.263843563993 11.188637274549098 -5740.162280995007 11.128537074148296 -5751.009613291158 11.068436873747494 -5761.805806780648 11.008336673346692 -5772.550827826436 10.94823647294589 -5783.2446428259 10.88813627254509 -5793.887218210502 10.828036072144288 -5804.478520445476 10.767935871743486 -5815.018516029516 10.707835671342684 -5825.507171494494 10.647735470941884 -5835.944453405183 10.587635270541082 -5846.3303283829555 10.52753507014028 -5856.664763098911 10.467434869739478 -5866.947724218331 10.407334669338676 -5877.179178407316 10.347234468937875 -5887.359092364159 10.287134268537073 -5897.48743281921 10.227034068136271 -5907.564166534767 10.16693386773547 -5917.589260304997 10.10683366733467 -5927.56285315713 10.046733466933867 -5937.4852454223255 9.986633266533065 -5947.356568412419 9.926533066132263 -5957.176795229553 9.866432865731461 -5966.945898767266 9.806332665330661 -5976.663851707564 9.746232464929859 -5986.3306265179335 9.686132264529057 -5995.946195448294 9.626032064128255 -6005.510530527885 9.565931863727455 -6015.023603562092 9.505831663326653 -6024.4853861292 9.44573146292585 -6033.895849577083 9.385631262525049 -6043.254965019815 9.325531062124247 -6052.562703334221 9.265430861723447 -6061.819035156338 9.205330661322645 -6071.023930877812 9.145230460921843 -6080.177360642207 9.08513026052104 -6089.279294341233 9.02503006012024 -6098.3297016109 8.964929859719438 -6107.328551827566 8.904829659318636 -6116.275814103916 8.844729458917834 -6125.171457284835 8.784629258517032 -6134.015449943195 8.724529058116232 -6142.807760375537 8.66442885771543 -6151.54835659766 8.604328657314628 -6160.237206340097 8.544228456913826 -6168.874277043495 8.484128256513026 -6177.459535853872 8.424028056112224 -6185.992949617772 8.363927855711422 -6194.474484877295 8.30382765531062 -6202.904107865007 8.243727454909818 -6211.281784498724 8.183627254509018 -6219.607480376168 8.123527054108216 -6227.881160769489 8.063426853707414 -6236.102790619646 8.003326653306614 -6244.2723345306495 7.943226452905811 -6252.389756763648 7.88312625250501 -6260.455021230871 7.823026052104208 -6268.468091489409 7.7629258517034065 -6276.4289307348245 7.7028256513026045 -6284.337501794603 7.6427254509018026 -6292.193767121421 7.5826252505010014 -6299.997688786233 7.5225250501001995 -6307.7492284711725 7.462424849699398 -6315.448347462254 7.402324649298596 -6323.095006641871 7.342224448897795 -6330.689166481088 7.282124248496993 -6338.230787031712 7.222024048096192 -6345.719827918129 7.16192384769539 -6353.156248328922 7.101823647294588 -6360.540007008222 7.041723446893787 -6367.871062246828 6.981623246492985 -6375.149371873038 6.921523046092184 -6382.374893243227 6.861422845691382 -6389.547583232123 6.801322645290581 -6396.6673982227885 6.741222444889779 -6403.734294096297 6.681122244488978 -6410.748226221078 6.621022044088176 -6417.709149441928 6.560921843687374 -6424.617018068671 6.500821643286573 -6431.471785864448 6.440721442885771 -6438.273406033627 6.3806212424849695 -6445.021831209311 6.3205210420841675 -6451.717013440427 6.260420841683366 -6458.358904178378 6.200320641282564 -6464.947454263242 6.140220440881763 -6471.482613909486 6.080120240480961 -6477.964332691179 6.020020040080159 -6484.392559526692 5.959919839679358 -6490.76724266283 5.899819639278556 -6497.0883296584 5.839719438877755 -6503.355767367172 5.779619238476953 -6509.569501920198 5.719519038076152 -6515.729478707466 5.65941883767535 -6521.835642358858 5.599318637274549 -6527.88793672436 5.539218436873747 -6533.886304853496 5.479118236472945 -6539.830688973949 5.419018036072144 -6545.721030469311 5.358917835671342 -6551.557269855924 5.298817635270541 -6557.33934675876 5.238717434869739 -6563.067199886284 5.178617234468938 -6568.740767004238 5.118517034068136 -6574.359984908294 5.0584168336673345 -6579.924789395499 4.9983166332665325 -6585.43511523444 4.9382164328657305 -6590.890896134059 4.878116232464929 -6596.292064711029 4.818016032064127 -6601.638552455592 4.757915831663326 -6606.930289695783 4.697815631262524 -6612.1672055599165 4.637715430861723 -6617.349227937219 4.577615230460921 -6622.476283436504 4.51751503006012 -6627.548297342731 4.457414829659318 -6632.565193571321 4.397314629258516 -6637.526894620063 4.337214428857715 -6642.4333215184315 4.277114228456913 -6647.28439377414 4.217014028056112 -6652.080029316717 4.15691382765531 -6656.820144437878 4.096813627254509 -6661.504653728457 4.036713426853707 -6666.133470011607 3.9766132264529053 -6670.706504271996 3.9165130260521037 -6675.223665580661 3.856412825651302 -6679.684861015148 3.7963126252505006 -6684.089995574567 3.736212424849699 -6688.438972089094 3.6761122244488975 -6692.731691123452 3.616012024048096 -6696.968050873823 3.555911823647294 -6701.14794705759 3.4958116232464924 -6705.271272795238 3.435711422845691 -6709.33791848367 3.3756112224448893 -6713.3477716601 3.3155110220440878 -6717.3007168555805 3.255410821643286 -6721.196635437125 3.1953106212424847 -6725.035405437232 3.135210420841683 -6728.816901369468 3.0751102204408816 -6732.540994028623 3.0150100200400796 -6736.207550273697 2.954909819639278 -6739.816432791803 2.8948096192384765 -6743.367499840753 2.834709418837675 -6746.860604967815 2.7746092184368734 -6750.2955967017415 2.714509018036072 -6753.6723182147725 2.6544088176352703 -6756.990606950778 2.5943086172344687 -6760.250294215164 2.534208416833667 -6763.4512047214475 2.474108216432865 -6766.593156088611 2.4140080160320636 -6769.675958282377 2.353907815631262 -6772.69941299242 2.2938076152304605 -6775.663312936156 2.233707414829659 -6778.567441078166 2.1736072144288574 -6781.411569752352 2.113507014028056 -6784.195459671651 2.0534068136272543 -6786.918858807332 1.9933066132264528 -6789.581501116607 1.9332064128256512 -6792.1831050932815 1.8731062124248496 -6794.72337211138 1.813006012024048 -6797.201984525897 1.7529058116232463 -6799.618603487953 1.6928056112224448 -6801.9728664233335 1.6327054108216432 -6804.264384113659 1.5726052104208417 -6806.492737307899 1.51250501002004 -6808.65747277873 1.4524048096192383 -6810.75809872334 1.3923046092184368 -6812.794079392345 1.3322044088176352 -6814.764828814842 1.2721042084168337 -6816.669703475004 1.212004008016032 -6818.507993791558 1.1519038076152304 -6820.278914265781 1.0918036072144288 -6821.981592214507 1.0317034068136273 -6823.61505512411 0.9716032064128256 -6825.178216906149 0.911503006012024 -6826.669863803967 0.8514028056112224 -6828.088641562318 0.7913026052104208 -6829.433047019324 0.7312024048096192 -6830.701429997525 0.6711022044088176 -6831.892016050943 0.611002004008016 -6833.002968511503 0.5509018036072144 -6834.032521223913 0.4908016032064128 -6834.979233978481 0.4307014028056112 -6835.8424547277145 0.3706012024048096 -6836.62312377363 0.310501002004008 -6837.325151655915 0.2504008016032064 -6837.957867224005 0.1903006012024048 -6838.541120302824 0.1302004008016032 -6839.121418258175 0.0701002004008016 -6839.917552345092 0.01 +-0.0 20.0 +12.004960341817172 19.95993987975952 +23.98964201736537 19.919879759519038 +35.95403279928156 19.87981963927856 +47.8981204715152 19.839759519038076 +59.82189282933158 19.799699398797596 +71.72533767933199 19.759639278557113 +83.60844283945664 19.719579158316634 +95.47119613900456 19.67951903807615 +107.31358541863614 19.63945891783567 +119.1355985303925 19.59939879759519 +130.93722333769784 19.55933867735471 +142.7184477153773 19.51927855711423 +154.47925954966414 19.479218436873747 +166.21964673820682 19.439158316633268 +177.93959719008618 19.399098196392785 +189.63909882581686 19.359038076152306 +201.31813957736523 19.318977955911823 +212.97670738815043 19.278917835671344 +224.61479021306178 19.23885771543086 +236.23237601845952 19.19879759519038 +247.82945278219168 19.1587374749499 +259.4060084935945 19.11867735470942 +270.96203115350795 19.07861723446894 +282.4975087742806 19.038557114228457 +294.01242937977463 18.998496993987978 +305.5067810053806 18.958436873747495 +316.9805516980169 18.918376753507015 +328.43372951614475 18.878316633266532 +339.8663025297676 18.838256513026053 +351.2782588204458 18.79819639278557 +362.669586481295 18.75813627254509 +374.0402736170009 18.718076152304608 +385.39030834381686 18.67801603206413 +396.7196787895775 18.63795591182365 +408.0283731549779 18.597895791583166 +419.31637982576467 18.557835671342687 +430.58368713504734 18.517775551102204 +441.8302832511163 18.477715430861725 +453.05615635388847 18.437655310621242 +464.2612946349039 18.397595190380763 +475.44568629733817 18.35753507014028 +486.6093195559983 18.3174749498998 +497.75218263733467 18.277414829659318 +508.87426377943666 18.237354709418838 +519.9755512320438 18.197294589178355 +531.0560332565411 18.157234468937876 +542.1156981259685 18.117174348697397 +553.1545341250206 18.077114228456914 +564.1725295500464 18.037054108216434 +575.1696727090575 17.99699398797595 +586.1459519217227 17.956933867735472 +597.1013555193769 17.91687374749499 +608.0358718450148 17.87681362725451 +618.9494892532997 17.836753507014027 +629.8421961105564 17.796693386773548 +640.7139807947792 17.756633266533065 +651.5648316956248 17.716573146292586 +662.3947372144183 17.676513026052106 +673.2036857641508 17.636452905811623 +683.9916657694749 17.596392785571144 +694.7586656667115 17.55633266533066 +705.50467390384 17.51627254509018 +716.2296789405049 17.4762124248497 +726.9336692480065 17.43615230460922 +737.6166333093062 17.396092184368737 +748.2785596190165 17.356032064128257 +758.919436683406 17.315971943887774 +769.5392530203891 17.275911823647295 +780.1379971595287 17.235851703406816 +790.7156576420305 17.195791583166333 +801.2722230462253 17.155731462925853 +811.8076821486147 17.11567134268537 +822.3220237086892 17.07561122244489 +832.8152363078991 17.03555110220441 +843.2873085393342 16.99549098196393 +853.7382290077255 16.955430861723446 +864.1679863294327 16.915370741482967 +874.5765691324449 16.875310621242484 +884.9639660563674 16.835250501002005 +895.3301657524224 16.79519038076152 +905.6751568834343 16.755130260521042 +915.9989281238289 16.715070140280563 +926.3014681596235 16.67501002004008 +936.5827656884155 16.6349498997996 +946.8428094193811 16.594889779559118 +957.0815880732588 16.55482965931864 +967.2990903823483 16.514769539078156 +977.4953050904932 16.474709418837676 +987.6702209530791 16.434649298597193 +997.8238267370164 16.394589178356714 +1007.9561112207365 16.35452905811623 +1018.0670631941748 16.314468937875752 +1028.156671458765 16.274408817635273 +1038.2249248274256 16.23434869739479 +1048.2718121245452 16.19428857715431 +1058.2973221859763 16.154228456913827 +1068.3014438590164 16.114168336673348 +1078.2841660024014 16.074108216432865 +1088.2454774862856 16.034048096192386 +1098.1853671922354 15.993987975951903 +1108.103824013208 15.953927855711422 +1118.0008368535425 15.91386773547094 +1127.8763946289428 15.87380761523046 +1137.7304862664625 15.833747494989979 +1147.5631008529945 15.793687374749497 +1157.3742275229429 15.753627254509016 +1167.1638552701836 15.713567134268535 +1176.9319730603706 15.673507014028054 +1186.6785698704548 15.633446893787573 +1196.4036346886658 15.593386773547094 +1206.1071565144957 15.553326653306613 +1215.7891243586785 15.513266533066131 +1225.449527243173 15.47320641282565 +1235.0883542011434 15.43314629258517 +1244.70559427694 15.393086172344688 +1254.3012365260793 15.353026052104207 +1263.8752700152234 15.312965931863726 +1273.4276838221597 15.272905811623245 +1282.9584670357797 15.232845691382764 +1292.4676087560574 15.192785571142283 +1301.955098094027 15.152725450901803 +1311.4209241717626 15.112665330661322 +1320.8650761223519 15.072605210420841 +1330.2875430898753 15.03254509018036 +1339.6883142293823 14.992484969939879 +1349.0673787068665 14.952424849699398 +1358.424725699242 14.912364729458917 +1367.7603443943174 14.872304609218435 +1377.0742239907715 14.832244488977954 +1386.3663536981269 14.792184368737473 +1395.6367227367234 14.752124248496992 +1404.8853203376923 14.712064128256511 +1414.1121357429279 14.672004008016032 +1423.317158205062 14.63194388777555 +1432.5003769965256 14.59188376753507 +1441.6617815512257 14.551823647294588 +1450.8013613011033 14.511763527054107 +1459.9191055344168 14.471703406813626 +1469.01500355005 14.431643286573145 +1478.0890446574824 14.391583166332664 +1487.1412181767578 14.351523046092183 +1496.1715134384535 14.311462925851702 +1505.1799197836492 14.27140280561122 +1514.1664265638938 14.23134268537074 +1523.1310231411737 14.19128256513026 +1532.0736988878805 14.151222444889779 +1540.9944431867757 14.111162324649298 +1549.8932454309581 14.071102204408817 +1558.7700950238293 14.031042084168336 +1567.6249813790587 13.990981963927855 +1576.457893920548 13.950921843687373 +1585.2688220823961 13.910861723446892 +1594.0577553088622 13.870801603206411 +1602.8246830543294 13.83074148296593 +1611.5695947832678 13.790681362725449 +1620.292479970196 13.75062124248497 +1628.9933280996452 13.710561122244489 +1637.6721286661177 13.670501002004007 +1646.3288711740504 13.630440881763526 +1654.9635451377737 13.590380761523045 +1663.576140081473 13.550320641282564 +1672.1666455391476 13.510260521042083 +1680.7350510545693 13.470200400801602 +1689.2813462744693 13.43014028056112 +1697.8055208897172 13.39008016032064 +1706.30756450391 13.350020040080159 +1714.787466692128 13.309959919839677 +1723.2452170390538 13.269899799599198 +1731.6808051389326 13.229839679358717 +1740.0942205955243 13.189779559118236 +1748.485453022062 13.149719438877755 +1756.8544920412062 13.109659318637274 +1765.201327285 13.069599198396793 +1773.5259483948237 13.029539078156311 +1781.8283450213487 12.98947895791583 +1790.1085068244913 12.94941883767535 +1798.366423473366 12.909358717434868 +1806.6020846462386 12.869298597194387 +1814.815480030478 12.829238476953906 +1823.006599322509 12.789178356713427 +1831.1754322277643 12.749118236472945 +1839.3219684606352 12.709058116232464 +1847.4461977444223 12.668997995991983 +1855.5481098112878 12.628937875751502 +1863.627694402204 12.588877755511021 +1871.684941266905 12.54881763527054 +1879.719840163835 12.508757515030059 +1887.7323808600984 12.468697394789578 +1895.722553131409 12.428637274549097 +1903.6903468185924 12.388577154308615 +1911.6357518099082 12.348517034068136 +1919.5587579416467 12.308456913827655 +1927.4593550157244 12.268396793587174 +1935.3375328424584 12.228336673346693 +1943.193281240514 12.188276553106212 +1951.0265900368515 12.14821643286573 +1958.8374490666745 12.10815631262525 +1966.6258481733762 12.068096192384768 +1974.391777208487 12.028036072144287 +1982.1352260316207 11.987975951903806 +1989.8561845104227 11.947915831663325 +1997.554642520515 11.907855711422844 +2005.2305899454436 11.867795591182364 +2012.8840166766263 11.827735470941883 +2020.5149126132972 11.787675350701402 +2028.123267662455 11.747615230460921 +2035.7090717388087 11.70755511022044 +2043.2723147647253 11.667494989979959 +2050.812986670176 11.627434869739478 +2058.3310773926833 11.587374749498997 +2065.826576877268 11.547314629258516 +2073.299475076398 11.507254509018034 +2080.749761949933 11.467194388777553 +2088.1774274945883 11.427134268537074 +2095.5824617448034 11.387074148296593 +2102.9648547087063 11.347014028056112 +2110.324596367168 11.30695390781563 +2117.661676708255 11.26689378757515 +2124.9760857271804 11.226833667334668 +2132.267813426253 11.186773547094187 +2139.536849814829 11.146713426853706 +2146.783184909265 11.106653306613225 +2154.0068087328677 11.066593186372744 +2161.2077113158493 11.026533066132263 +2168.385882695281 10.986472945891782 +2175.541312915047 10.946412825651302 +2182.6739920258024 10.906352705410821 +2189.783910084928 10.86629258517034 +2196.8710571564884 10.82623246492986 +2203.935423311192 10.786172344689378 +2210.9769986263514 10.746112224448897 +2217.9957731858435 10.706052104208416 +2224.9917370800736 10.665991983967935 +2231.96488040594 10.625931863727454 +2238.9151932668 10.585871743486972 +2245.842665778164 10.545811623246491 +2252.7472880775113 10.50575150300601 +2259.629050298767 10.465691382765531 +2266.4879425624626 10.42563126252505 +2273.323954995514 10.385571142284569 +2280.1370777312027 10.345511022044088 +2286.9273009091526 10.305450901803606 +2293.6946146753153 10.265390781563125 +2300.4390091819537 10.225330661322644 +2307.1604745876293 10.185270541082163 +2313.859001057194 10.145210420841682 +2320.534578761782 10.105150300601201 +2327.1872451995137 10.06509018036072 +2333.817138037164 10.02503006012024 +2340.424348582387 9.98496993987976 +2347.00886891868 9.944909819639278 +2353.5706910889135 9.904849699398797 +2360.1098070949556 9.864789579158316 +2366.626208897291 9.824729458917835 +2373.119888414632 9.784669338677354 +2379.59083752353 9.744609218436873 +2386.0390480579763 9.704549098196392 +2392.464511809 9.66448897795591 +2398.8672205242597 9.62442885771543 +2405.2471659076296 9.584368737474948 +2411.6043396187792 9.544308617234469 +2417.93873327275 9.504248496993988 +2424.250338439522 9.464188376753507 +2430.539146643575 9.424128256513026 +2436.805149363448 9.384068136272544 +2443.048338031286 9.344008016032063 +2449.268704032386 9.303947895791582 +2455.46623870473 9.263887775551101 +2461.64093333852 9.22382765531062 +2467.792779175697 9.183767535070139 +2473.9217674094593 9.143707414829658 +2480.0278891837715 9.103647294589177 +2486.1111355928656 9.063587174348697 +2492.171497680737 9.023527054108216 +2498.20896644063 8.983466933867735 +2504.223532814517 8.943406813627254 +2510.2151876925723 8.903346693386773 +2516.1839219126327 8.863286573146292 +2522.129726259655 8.82322645290581 +2528.0525914651616 8.78316633266533 +2533.9525082066802 8.743106212424848 +2539.829467107172 8.703046092184367 +2545.6834587344556 8.662985971943886 +2551.5144736006155 8.622925851703407 +2557.3225021614085 8.582865731462926 +2563.107534815654 8.542805611222445 +2568.8695619046202 8.502745490981964 +2574.6085737113963 8.462685370741482 +2580.3245604602585 8.422625250501001 +2586.0175123160216 8.38256513026052 +2591.687419383384 8.342505010020039 +2597.3342717062606 8.302444889779558 +2602.9580592671027 8.262384769539077 +2608.558771986211 8.222324649298596 +2614.1363997210337 8.182264529058115 +2619.6909322654533 8.142204408817635 +2625.2223593490653 8.102144288577154 +2630.7306706364384 8.062084168336673 +2636.2158557263683 8.022024048096192 +2641.677904151115 7.981963927855711 +2647.1168053756282 7.94190380761523 +2652.5325487967607 7.901843687374749 +2657.925123742466 7.8617835671342675 +2663.2945194709832 7.821723446893786 +2668.640725170008 7.781663326653306 +2673.9637299558485 7.741603206412825 +2679.2635228725658 7.701543086172344 +2684.5400928911 7.661482965931863 +2689.7934289083805 7.621422845691382 +2695.023519746421 7.5813627254509015 +2700.2303541513957 7.54130260521042 +2705.4139207927014 7.501242484969939 +2710.5742082620013 7.461182364729458 +2715.711205072251 7.421122244488977 +2720.824899656706 7.381062124248496 +2725.9152803679126 7.341002004008016 +2730.982335476679 7.300941883767535 +2736.026053171025 7.2608817635270535 +2741.046421555114 7.220821643286572 +2746.0434286481654 7.180761523046091 +2751.017062383342 7.14070140280561 +2755.9673106066207 7.10064128256513 +2760.8941610756383 7.060581162324649 +2765.7976014585147 7.020521042084168 +2770.6776193326546 6.980460921843687 +2775.5342021835236 6.9404008016032055 +2780.3673374034 6.900340681362724 +2785.1770122901034 6.860280561122244 +2789.9632140456947 6.820220440881763 +2794.7259297751502 6.780160320641282 +2799.4651464850117 6.740100200400801 +2804.1808510820033 6.70004008016032 +2808.8730303716234 6.659979959919839 +2813.5416710567056 6.619919839679358 +2818.186759735949 6.579859719438877 +2822.8082829024183 6.539799599198396 +2827.4062269420097 6.499739478957915 +2831.9805781318855 6.459679358717434 +2836.531322638874 6.419619238476953 +2841.0584465178335 6.379559118236473 +2845.5619357099827 6.3394989979959915 +2850.0417760411897 6.29943887775551 +2854.4979532202265 6.259378757515029 +2858.930452836981 6.219318637274548 +2863.339260360632 6.179258517034068 +2867.7243611377776 6.139198396793587 +2872.085740390524 6.099138276553106 +2876.4233832145273 6.059078156312625 +2880.737274576992 6.0190180360721435 +2885.0273993146184 5.978957915831662 +2889.293742131504 5.938897795591182 +2893.5362875969927 5.898837675350701 +2897.7550201434724 5.85877755511022 +2901.9499240641176 5.818717434869739 +2906.1209835105788 5.778657314629258 +2910.26818249061 5.738597194388777 +2914.3915048656413 5.698537074148296 +2918.490934348287 5.658476953907815 +2922.566454499789 5.618416833667334 +2926.618048727399 5.578356713426853 +2930.6457002816874 5.538296593186372 +2934.6493922537834 5.498236472945891 +2938.6291075725435 5.458176352705411 +2942.5848290016415 5.4181162324649295 +2946.5165391365817 5.378056112224448 +2950.4242204016314 5.337995991983967 +2954.3078550466657 5.297935871743486 +2958.167425143929 5.257875751503005 +2962.0029125847027 5.217815631262525 +2965.8142990758797 5.177755511022044 +2969.6015661364413 5.137695390781563 +2973.364695093831 5.0976352705410815 +2977.103667080224 5.0575751503006 +2980.8184630286873 5.01751503006012 +2984.5090636692235 4.977454909819639 +2988.1754495246973 4.937394789579158 +2991.817600906638 4.897334669338677 +2995.435497910913 4.857274549098196 +2999.0291204132686 4.817214428857715 +3002.598448064728 4.777154308617234 +3006.1434602868467 4.737094188376753 +3009.6641362668147 4.697034068136272 +3013.1604549523995 4.656973947895791 +3016.6323950467254 4.61691382765531 +3020.079935002878 4.576853707414829 +3023.50305301833 4.5367935871743486 +3026.901727029177 4.496733466933867 +3030.2759347041765 4.456673346693386 +3033.6256534385807 4.416613226452905 +3036.950860347752 4.376553106212424 +3040.2515322605536 4.336492985971943 +3043.527645712502 4.296432865731463 +3046.7791769386704 4.256372745490982 +3050.0061018663323 4.2163126252505005 +3053.208396107331 4.176252505010019 +3056.3860349501592 4.136192384769538 +3059.538993351741 4.096132264529057 +3062.6672459288893 4.056072144288577 +3065.770766949438 4.016012024048096 +3068.8495303230115 3.9759519038076148 +3071.9035095914332 3.9358917835671337 +3074.9326779187368 3.895831663326653 +3077.9370080807676 3.855771543086172 +3080.9164724543493 3.8157114228456908 +3083.8710430059905 3.77565130260521 +3086.800691280106 3.735591182364729 +3089.705388386725 3.695531062124248 +3092.5851049886537 3.655470941883767 +3095.4398112880654 3.615410821643286 +3098.269477012478 3.575350701402805 +3101.074071400087 3.5352905811623243 +3103.853563184408 3.495230460921843 +3106.6079205781925 3.455170340681362 +3109.3371112565665 3.4151102204408814 +3112.0411023393444 3.3750501002004003 +3114.719860372463 3.334989979959919 +3117.3733513084767 3.2949298597194385 +3120.001540486058 3.2548697394789574 +3122.604392608425 3.2148096192384763 +3125.181871720631 3.1747494989979956 +3127.733941185635 3.1346893787575145 +3130.2605636590615 3.094629258517034 +3132.761701062565 3.0545691382765527 +3135.2373145556885 3.0145090180360716 +3137.6873645061128 2.974448897795591 +3140.1118104581683 2.93438877755511 +3142.5106110994843 2.8943286573146287 +3144.883724225627 2.854268537074148 +3147.2311067025703 2.814208416833667 +3149.552714426832 2.774148296593186 +3151.848502283076 2.734088176352705 +3154.1184240989833 2.694028056112224 +3156.3624325971628 2.653967935871743 +3158.5804793438456 2.6139078156312623 +3160.772514694097 2.573847695390781 +3162.938487733234 2.5337875751503 +3165.078346214121 2.4937274549098194 +3167.192036489969 2.4536673346693383 +3169.2795034422275 2.413607214428857 +3171.3406904031267 2.3735470941883765 +3173.3755390723504 2.3334869739478954 +3175.3839894272974 2.2934268537074143 +3177.3659796262973 2.2533667334669336 +3179.321445904103 2.2133066132264525 +3181.2503224588754 2.1732464929859714 +3183.1525413298145 2.1331863727454907 +3185.0280322644658 2.0931262525050096 +3186.8767225746346 2.0530661322645285 +3188.698536979705 2.013006012024048 +3190.493397436011 1.972945891783567 +3192.2612229507567 1.932885771543086 +3194.0019293787764 1.8928256513026052 +3195.715429200238 1.852765531062124 +3197.4016312771373 1.8127054108216432 +3199.0604405861745 1.7726452905811623 +3200.691757925294 1.7325851703406812 +3202.2954795908404 1.6925250501002003 +3203.8714970218916 1.6524649298597194 +3205.4196964079156 1.6124048096192383 +3206.939958255419 1.5723446893787574 +3208.4321569087438 1.5322845691382765 +3209.8961600196076 1.4922244488977956 +3211.331827959366 1.4521643286573145 +3212.739013167362 1.4121042084168336 +3214.1175594280726 1.3720440881763527 +3215.4673010691545 1.3319839679358716 +3216.7880620719543 1.2919238476953907 +3218.0796550856808 1.2518637274549098 +3219.341880336359 1.2118036072144287 +3220.5745244220984 1.1717434869739478 +3221.777358987393 1.131683366733467 +3222.950139271537 1.0916232464929858 +3224.0926025304434 1.051563126252505 +3225.204466338055 1.011503006012024 +3226.285426784458 0.971442885771543 +3227.335156604663 0.931382765531062 +3228.353303297527 0.8913226452905811 +3229.339487332344 0.8512625250501001 +3230.2933005968616 0.8112024048096191 +3231.214305322723 0.7711422845691382 +3232.1020338436997 0.7310821643286572 +3232.9559897137706 0.6910220440881764 +3233.7756509569062 0.6509619238476954 +3234.5604765658722 0.6109018036072144 +3235.30991784901 0.5708416833667335 +3236.0234368864194 0.5307815631262525 +3236.7005352545007 0.4907214428857715 +3237.340797377451 0.4506613226452906 +3237.9439544585052 0.4106012024048096 +3238.509977099474 0.37054108216432863 +3239.039207832505 0.3304809619238477 +3239.532549955435 0.29042084168336674 +3239.9917393995006 0.25036072144288574 +3240.419750968563 0.2103006012024048 +3240.821457352705 0.17024048096192385 +3241.204868151086 0.13018036072144287 +3241.5840701519737 0.09012024048096191 +3241.989400353421 0.05006012024048096 +3242.5361575547254 0.01 diff --git a/ELoss/PCEnergyAnalysis.py b/ELoss/PCEnergyAnalysis.py index 8d3f632..277e077 100644 --- a/ELoss/PCEnergyAnalysis.py +++ b/ELoss/PCEnergyAnalysis.py @@ -15,15 +15,29 @@ import numpy as np import pandas as pd from scipy.interpolate import interp1d from scipy.integrate import cumulative_trapezoid +import matplotlib +matplotlib.use("TkAgg") import matplotlib.pyplot as plt import threading import time import sys import cmd import shlex +import textwrap +import readline +import atexit +import os #Run program from terminal or IDE, and prompts will provide user steps +histfile = os.path.expanduser("~/.uproot_shell_history") + +try: + readline.read_history_file(histfile) +except FileNotFoundError: + pass + +atexit.register(readline.write_history_file, histfile) #data = [z, mass_u, maximum MeV, name] alpha_data = [2, 4.0026, 40, "alpha"] @@ -215,8 +229,33 @@ def energy_reconstruction(particle, Ef, dl): Ei = float(E_of_x(xi)) return max(Ei, 0.0) - +def energy_distance(particle, Ei, Ef): + filename = f"E_vs_x_{particle}.dat" + data = pd.read_csv( + filename, + sep='\s+', + comment="#", + header=None, + skiprows=1 + ) + + x = data.iloc[:, 0].values + E = data.iloc[:, 1].values + + x_of_E = interp1d( + E[::-1], # reverse so energy increases + x[::-1], + bounds_error=False, + fill_value="extrapolate" + ) + + xi = float(x_of_E(Ei)) + xf = float(x_of_E(Ef)) + + return abs(xf - xi) + + class MyInteractiveApp(cmd.Cmd): def __init__(self): @@ -226,6 +265,10 @@ class MyInteractiveApp(cmd.Cmd): self.T = 293.15 self.P = 400 self.temp_particle = [0, 0.0, 0.0, ""] + self.rootFile = "SimAnasen1.root" + self.file = None + self.initialize_file() + self.tree = None print("-" * 30) print("INTERACTIVE SHELL STARTED") self.print_params() @@ -236,8 +279,15 @@ class MyInteractiveApp(cmd.Cmd): def print_params(self): """Helper method to display current state""" print(f"Current Parameters: T={self.T}, P={self.P}") + + def initialize_file(self): + """Load in default root file for anasen""" + self.file = uproot.open(f"../Armory/{self.rootFile}") + + #intro = "Interactive Shell Started. Type 'help' to see commands." prompt = ">> " + def default(self, line): # Check if the command starts with our multi-word phrase @@ -260,6 +310,9 @@ class MyInteractiveApp(cmd.Cmd): elif line.startswith("energy reconstruction") or line.startswith("Energy Reconstruction") or line.startswith("Energy reconstruction"): args = line[len("energy reconstruction "):].strip() self.do_energy_reconstruction(args) + elif line.startswith("energy distance") or line.startswith("Energy Distance") or line.startswith("Energy distance"): + args = line[len("energy distance "):].strip() + self.do_energy_distance(args) else: print(f"*** Unknown syntax: {line}") @@ -395,7 +448,7 @@ class MyInteractiveApp(cmd.Cmd): try: self.do_make_table(table_specs) Ef = energy_loss(particle, Ei, dl) - print(f"\nFinal energy: {Ef:.6f} MeV") + print(f"\nFinal energy: {Ef:.6f} MeV\n") except: return except IndexError: @@ -412,15 +465,135 @@ class MyInteractiveApp(cmd.Cmd): try: Ei = energy_reconstruction(particle, Ef, dl) if Ei > 0: - print(f"\nInitial energy: {Ei:.6f} MeV") + print(f"\nInitial energy: {Ei:.6f} MeV\n") else: print("Error: remake table with larger value, fallen off map") except: print("Particle energy table not made yet, please do so using 'make table'") except IndexError: print("Please input particle, final energy from detector, and distance travelled") + + def do_energy_distance(self, arg): + """Find a distance travelled given an initial and final energy + Ex: >> energy distance """ + args = shlex.split(arg) + try: + particle = args[0] + Ei = float(args[1]) + Ef = float(args[2]) + dE = Ei - Ef + try: + dl = energy_distance(particle, Ei, Ef) + if dl > 0: + print(f"\nChange in energy: {dE:.6f} MeV") + print(f"Distance travelled: {dl:.6f} cm\n") + else: + print("Error: remake table with larger value, fallen off map") + except: + print("Particle energy table not made yet, please do so using 'make table'") + except IndexError: + print("Please input particle, final energy from detector, and distance travelled") + + def do_uproot_file(self, arg): + args = shlex.split(arg) + if len(args) > 0: + filename = args[0] + else: + filename = self.rootFile + try: + print(f"Opening {filename}") + with uproot.open(f"../Armory/{filename}") as tempfile: + self.file = tempfile + except FileNotFoundError: + print("Error: file not found") + + def do_print_file(self, arg): + args = shlex.split(arg) + file = self.file + if "keys" in args or len(args) == 0: + print("Keys in file: ", file.keys()) + if "class_names" in args or len(args) == 0: + print("Class names: ", file.classnames()) + + def do_set_tree(self, arg): + file = self.file + if len(arg) > 0: + treeName = f"tree{arg}" + else: + treeName = "tree" + try: + self.tree = file[treeName] + tree = self.tree + print(f"Tree: {tree}") + print("Branches: ", tree.keys()) + except: + print("\nError, trees include ", file.keys()) + + def run_command_line(self): + import readline + import atexit + import os + import awkward as ak + + histfile = os.path.expanduser("~/.uproot_shell_history") + + try: + readline.read_history_file(histfile) + except FileNotFoundError: + pass + + readline.set_history_length(1000) + readline.parse_and_bind("tab: complete") + + atexit.register(readline.write_history_file, histfile) + + print("Custom Python CMD (type 'exit' to stop)") + + local_vars = { + "file": self.file, + "uproot": uproot, + "np": np, + #"ak": ak, + "plt": plt, + "self": self + } + + startup_script = textwrap.dedent(""" + tree = file["tree"] + """) + + exec(startup_script, globals(), local_vars) + while True: + try: + entry = input(">>> ").strip() + + if entry.lower() in ["exit", "quit"]: + break + + if not entry: + continue + + # Try eval first so expressions print naturally + try: + result = eval(entry, globals(), local_vars) + + if result is not None: + print(result) + + except SyntaxError: + exec(entry, globals(), local_vars) + + if "tree" in local_vars: + self.tree = local_vars["tree"] + except OverflowError(): + print("Arrays too large, causing crash") + except Exception as e: + print(f"Error: {e}") + self.shell_vars = local_vars + + def do_uproot(self, arg): + + self.run_command_line() if __name__ == "__main__": - MyInteractiveApp().cmdloop() -