diff --git a/data/SizeMass/GAMA_H-band_dlogM_0.25_reff.txt b/data/SizeMass/GAMA_H-band_dlogM_0.25_reff.txt new file mode 100644 index 00000000..871dd9f1 --- /dev/null +++ b/data/SizeMass/GAMA_H-band_dlogM_0.25_reff.txt @@ -0,0 +1,16 @@ +#log_{10}(Mstar/Msun) log_{10}(med(R50)/kpc) Ngal log_{10}(sigma_R50) +7.875 0.023928107799314667 113.0 0.030234402629256727 +8.125 0.020639404292328755 246.0 0.03925351809565998 +8.375 0.1391785277131195 480.0 0.03388209509256983 +8.625 0.25541533919419696 819.0 0.03300145548004641 +8.875 0.32253715413970485 1498.0 0.03460546952611725 +9.125 0.386884904783267 2088.0 0.030471976174258977 +9.375 0.41726934551944767 2321.0 0.03221575403428964 +9.625 0.4273724851753237 2173.0 0.03392487641182378 +9.875 0.4317402296584704 1767.0 0.034638027078690105 +10.125 0.44294555914654027 1574.0 0.035634566669008334 +10.375 0.4673033434723316 1439.0 0.03928813983352966 +10.625 0.5166444480123363 1425.0 0.030793006622088104 +10.875 0.612771071960958 1064.0 0.030248286221782775 +11.125 0.7344988861455367 595.0 0.030766205552970063 +11.375 0.8439311722392832 175.0 0.02761251960045475 diff --git a/data/SizeMass/GAMA_r-band_dlogM_0.25_lim_medianerror.txt b/data/SizeMass/GAMA_r-band_dlogM_0.25_lim_medianerror.txt new file mode 100644 index 00000000..35efdccb --- /dev/null +++ b/data/SizeMass/GAMA_r-band_dlogM_0.25_lim_medianerror.txt @@ -0,0 +1,16 @@ +#log_{10}(Mstar/Msun) log_{10}(med(R50)/kpc) Ngal log_{10}(sigma_R50) +7.875 -0.119904799089 113.0 0.02522485797756163 +8.125 -0.13148373095100002 246.0 0.03277517247036486 +8.375 -0.0215441399991 480.0 0.025524156814811353 +8.625 0.110616219286 819.0 0.030217802337565488 +8.875 0.18180447067400002 1498.0 0.03210325448056965 +9.125 0.245269534076 2088.0 0.028540977888777574 +9.375 0.275213259391 2321.0 0.029255838234251815 +9.625 0.311473797717 2173.0 0.02912518997146147 +9.875 0.320229889225 1767.0 0.033634289766577584 +10.125 0.33405851163199995 1574.0 0.032181701083545365 +10.375 0.3728846024 1439.0 0.03322321541098842 +10.625 0.421590281039 1425.0 0.026337319707922975 +10.875 0.5216345644575 1064.0 0.02348796950226911 +11.125 0.671255386508 595.0 0.02378553958105896 +11.375 0.821208933603 175.0 0.02399213603590454 diff --git a/data/SizeMass/Trujillo_2020_RawData.txt b/data/SizeMass/Trujillo_2020_RawData.txt new file mode 100644 index 00000000..6beff421 --- /dev/null +++ b/data/SizeMass/Trujillo_2020_RawData.txt @@ -0,0 +1,1006 @@ +# log_{10}(Mstar/Msun) log_{10}(med(R50)/kpc) +9.83 0.371346858231 +11.82 1.30943852464 +11.72 1.1154709387 +10.8 0.93018194188 +10.7 0.75019360819 +10.59 0.623959285628 +9.78 0.516331899723 +10.56 0.767762971778 +10.77 0.493954294517 +11.75 1.15608298914 +10.98 0.772314221835 +11.07 0.80283000476 +9.99 0.330066788997 +10.9 0.777887038665 +10.94 0.596026942541 +9.7 0.347939682067 +7.5 0.0968644246741 +10.33 0.706723230206 +10.34 0.64085385262 +10.98 0.834420703682 +11.44 0.913513859992 +11.44 0.970627347841 +9.63 0.508979701469 +11.1 0.809094968051 +9.4 0.514399456482 +8.19 0.231380652725 +8.28 0.121469385015 +9.7 0.307742138074 +9.64 0.319698216777 +10.62 0.656383721743 +10.26 0.478067183885 +11.62 1.029870564 +8.82 0.285154692718 +8.21 0.0948529317035 +9.92 0.119350157671 +11.12 0.781571184885 +11.68 1.14877433626 +11.5 0.975891136402 +8.11 0.155738653755 +10.59 0.910390505077 +8.05 0.125648731839 +8.02 0.181072279363 +10.89 0.67851837904 +8.65 0.254999223642 +9.31 0.35425837865 +9.3 0.353457331687 +11.33 0.754396871805 +9.35 0.556726127584 +7.84 0.243801064852 +10.88 0.667952942767 +10.66 0.703943478808 +9.08 0.477041981508 +8.41 0.120502135126 +10.83 0.702879657827 +11.53 0.933016191813 +11.1 0.929709137955 +10.84 0.676238213176 +11.4 1.05083960507 +7.08 -0.116692462918 +8.38 0.422349090493 +11.71 1.13914524382 +10.9 0.747644819328 +11.42 1.01403094511 +9.22 0.437399956605 +9.19 0.432720692278 +8.07 0.184879007887 +10.75 0.833042315278 +10.7 0.799130166539 +10.47 0.343320279285 +9.08 0.507496398825 +10.76 0.74292017222 +8.71 0.235087598328 +8.66 0.239534444968 +8.44 0.281802118347 +11.09 0.859881411281 +9.54 0.563665415972 +10.55 0.729295509113 +7.88 0.0989687156499 +10.59 0.461963139183 +7.95 -0.00598821903567 +7.89 0.00571839698169 +7.78 0.145971988134 +11.02 0.766288625034 +7.63 -0.0342873385948 +8.21 0.058032766822 +10.77 0.816865082692 +10.5 0.744449457447 +8.39 0.248513227262 +10.58 0.852908943335 +10.99 0.708304412158 +11.7 1.05854457276 +10.37 0.812119899532 +7.86 0.145850885365 +8.06 0.150321216054 +10.23 0.659376772055 +10.86 0.722162170793 +10.62 0.745074791582 +8.95 0.375720043256 +8.32 0.256698571193 +9.07 0.625252157785 +8.62 0.247160799122 +9.84 0.595875027434 +11.18 0.916206435957 +8.65 0.205819279324 +10.53 0.475729474411 +10.01 0.322005686204 +11.44 0.997771838019 +9.53 0.490137502447 +10.96 0.924085009967 +8.6 0.241678233833 +10.88 0.698549861214 +10.51 0.646680923731 +10.37 0.444981112088 +7.25 0.129687980162 +9.45 0.194387166822 +11.03 0.890009129514 +11.66 1.05538676473 +8.53 0.362131379313 +8.78 -0.000264211718298 +10.58 0.5921122205 +10.72 0.636183844921 +11.39 0.965835801934 +7.59 0.114911543308 +11.0 0.905795880368 +10.42 0.653947146849 +7.32 0.065108005236 +11.36 1.03272078497 +10.3 0.343376032843 +7.85 0.0783844843154 +7.52 -0.0384039047897 +10.58 0.525984114774 +11.29 0.886850249406 +10.61 0.574123280057 +10.98 0.553521910115 +11.0 0.694267275607 +11.09 1.02842073129 +10.82 0.567322156325 +10.39 0.641660464922 +11.11 0.793863663251 +10.74 0.933769833925 +11.01 0.756400111877 +11.85 1.12544623616 +10.88 0.58763109088 +10.91 0.687408693924 +11.21 0.844755297446 +11.0 0.59664580129 +10.74 0.772906693401 +10.81 0.664558709848 +7.21 0.0420435095157 +10.77 0.910778222399 +11.03 0.641443139652 +7.54 -0.06953168965 +10.97 0.770727214374 +8.23 0.169477126189 +11.12 0.746764379628 +10.21 0.507702010504 +8.43 0.4995533468 +11.4 0.929950548142 +8.76 0.152997941385 +10.37 0.872029082939 +7.53 0.099403295229 +9.59 0.603613753535 +9.56 0.583652108542 +7.99 0.223529376343 +9.83 0.342765717718 +10.8 0.824068231294 +10.91 0.754654069255 +7.84 0.326335087886 +8.61 0.236423915819 +10.38 0.536907400327 +10.85 0.690926863979 +8.79 0.269889217473 +9.74 0.341185371258 +8.14 0.0635575847262 +8.95 0.476030661195 +9.04 0.453276336667 +9.3 0.483493574873 +9.16 0.245478735907 +7.96 0.115887661988 +8.46 0.203503036597 +11.56 1.0604334067 +10.96 0.669837515246 +10.12 0.227118668656 +8.48 0.361904314433 +9.86 0.403623377852 +10.77 0.319307018146 +11.49 0.998776727571 +8.57 0.0925230508543 +9.06 0.321948898775 +11.17 0.947444980115 +10.99 0.614048996362 +8.82 0.174350597479 +9.16 0.4746543027 +8.4 0.284124336142 +9.1 0.67897736633 +10.64 0.593637016782 +10.87 0.882067475475 +10.64 0.830973397323 +8.56 0.285729971766 +10.88 0.754149643255 +11.08 0.862144428635 +11.01 0.64404288206 +10.88 0.513712724883 +11.19 0.762585911419 +9.46 0.272074842019 +11.05 0.766126931202 +8.56 0.202089951097 +10.43 0.889564090972 +7.55 0.0379369182736 +8.15 0.246540377514 +10.92 0.629001619287 +10.42 0.651576809903 +10.98 0.753583058893 +7.33 0.0669073627483 +9.65 0.412767549837 +9.58 0.401400540782 +10.9 0.83103748564 +8.9 0.373781096122 +11.12 0.74112570566 +11.18 1.08576411488 +8.56 0.0557710465804 +10.42 0.407911026625 +9.43 0.587441859897 +9.05 0.246536609859 +10.34 0.574303872082 +8.41 0.114820702619 +11.06 0.654122899935 +10.35 0.289133431731 +7.94 0.176639514577 +8.56 0.107137858006 +10.69 0.734215672486 +10.31 0.417266173443 +10.74 0.70757809878 +9.39 0.447951273143 +10.65 0.834579820611 +11.15 0.822274593765 +10.93 0.831869774281 +10.92 0.817798992709 +8.63 0.398871740018 +10.98 0.877372568121 +9.99 0.40112725932 +10.48 0.57664373919 +9.76 0.229637802297 +10.63 0.700092649629 +10.84 0.559178665212 +11.15 0.703832029311 +10.63 0.638552363642 +10.36 0.489449817667 +10.89 0.594363698409 +10.81 0.524178517024 +10.47 0.56597298091 +9.16 0.10732921944 +9.48 0.520843005612 +11.07 0.803558553594 +10.75 0.805781151255 +10.98 0.794618498676 +10.64 0.663199394049 +11.19 0.846622298351 +10.29 0.568350266044 +10.16 0.675542389823 +8.81 0.472756646256 +9.06 0.327823687796 +10.49 0.595382160057 +7.78 0.242882001142 +11.03 0.659068485433 +10.62 0.938044549122 +10.98 0.747797253728 +10.9 0.772413685341 +10.14 0.329067540692 +10.98 0.787967636817 +11.8 1.18754038278 +10.3 0.659710380947 +11.25 0.74910340353 +10.13 0.123634987197 +10.63 0.698100545623 +8.45 0.31909826685 +8.43 0.31787111797 +8.08 0.143510096263 +9.78 0.298191322073 +10.6 0.848804701052 +12.0 1.26029596585 +7.88 0.394451680826 +11.49 0.941657248429 +8.96 0.357187012672 +9.01 0.319307018146 +10.23 0.806517318515 +10.58 0.66016455423 +10.78 0.867769310595 +8.12 0.180441202653 +7.3 -0.237210701872 +10.96 0.806253651587 +8.52 0.265078005168 +10.77 0.485886109843 +11.11 0.769516446565 +11.07 0.644337898219 +10.33 0.70415051684 +10.06 0.30528494429 +9.48 0.177864605607 +8.99 0.222196046302 +8.65 0.331214199128 +10.02 0.364529965284 +9.35 0.370142847051 +8.22 -0.022166705919 +7.84 0.0986402790628 +10.08 0.542784275957 +8.41 0.144356507728 +8.53 0.377372568121 +8.96 0.183288797283 +8.9 0.1789674235 +9.49 0.318029403055 +8.31 0.0701301714269 +7.13 0.0741782218476 +10.74 0.706290957259 +8.73 0.295761134042 +9.84 0.52703613132 +10.83 0.782652187335 +8.62 0.204418778561 +8.46 0.127561082469 +8.91 0.197646330923 +10.01 0.324544945197 +11.06 0.890806968363 +9.76 0.350441856535 +7.69 0.10391947324 +10.7 0.734785305928 +7.4 0.00335942178632 +9.53 0.323867479049 +10.35 0.549852420394 +8.96 0.172277576349 +7.94 -0.00556451696768 +8.63 0.0764690382392 +9.02 0.304048973163 +9.59 0.460963324663 +8.38 0.107283647251 +7.91 0.13735307315 +9.31 0.236983929109 +10.36 0.511865022184 +8.51 0.118081632323 +8.85 0.352026502104 +10.32 0.480204467462 +10.15 0.592731766394 +9.97 0.129062318642 +10.92 0.760321326596 +11.02 0.592509847901 +8.16 0.292699003044 +8.75 0.232108734642 +7.45 0.134268393416 +10.65 0.878163505151 +9.6 0.154047326021 +11.87 1.24737363641 +9.04 0.140924105964 +8.01 0.107955133271 +10.24 0.785472203306 +9.03 0.179077112292 +7.81 0.0581045629017 +9.9 0.248936778921 +8.49 0.161060008039 +9.95 0.554210557239 +11.38 1.05280822309 +8.82 0.200088294471 +10.88 0.579814542405 +11.93 1.27298853239 +8.34 0.102356330731 +9.89 0.591696497492 +9.88 0.584259112725 +10.43 0.54752857646 +7.92 0.201787588269 +10.7 0.657247129884 +7.94 0.0744054035854 +11.46 1.05002027277 +11.03 0.773116590052 +10.8 0.724198551729 +8.94 0.33805787542 +8.95 0.320976677343 +10.54 0.538573733807 +11.49 1.03149547295 +11.32 0.912195043568 +8.41 0.182918482495 +10.68 0.686473151759 +10.63 0.758019660375 +8.89 0.065386815372 +10.72 0.479409182707 +10.67 0.806858029519 +10.93 0.79300123498 +9.47 0.24428889428 +11.58 1.02092542653 +8.35 0.0387987650093 +10.22 0.364330098256 +9.41 0.655870310084 +7.4 0.0670970035533 +11.13 0.774894208158 +11.31 0.934805235297 +10.62 0.854408702933 +11.42 1.00995685818 +10.86 0.647901382229 +11.73 1.10140332741 +11.23 0.935314067657 +11.44 1.01311815739 +10.68 0.607488011468 +10.6 0.783132270691 +10.91 0.790801195514 +11.61 1.29420160069 +9.29 0.468130064466 +9.88 0.614224241321 +8.76 0.172210678343 +10.89 0.634177107577 +8.17 0.31425249945 +8.1 0.187928701602 +8.33 0.352370095181 +10.49 0.406685631214 +11.06 0.757167627489 +7.96 0.199787023623 +10.11 0.167979553074 +10.67 0.523577890182 +8.66 0.500421897834 +8.63 0.231047092516 +7.35 -0.0826412248669 +11.17 0.742396096244 +8.17 0.367895907261 +8.04 0.210112909393 +10.7 0.65223690528 +10.36 0.365288432771 +10.56 0.640474705346 +10.68 0.514702319777 +10.06 0.381656482586 +10.21 0.486420030636 +10.12 0.626057026743 +10.43 0.632659560052 +9.9 0.337881840849 +10.5 0.503785732365 +10.37 0.572954967036 +11.13 0.721660288283 +10.85 0.667533560336 +10.86 0.542599570972 +10.53 0.530332133102 +10.92 0.727629649571 +10.86 0.74689214183 +11.11 0.883661435154 +11.64 1.12100707556 +10.77 0.610551538825 +10.67 0.561889065611 +9.82 0.542201262694 +10.93 0.636878779752 +11.26 0.815428237934 +10.22 0.559732697862 +11.11 0.823917562372 +11.04 0.877140889785 +10.38 0.752816431188 +10.77 0.76159886299 +10.71 0.797371496998 +8.92 0.270052567837 +8.92 0.276701183988 +10.58 0.615400291521 +10.15 0.661812685537 +11.24 0.745547014965 +10.76 0.508073571578 +10.68 0.575456900448 +9.98 0.337329915595 +9.83 0.644133557905 +10.84 0.720550198496 +11.32 0.836853634486 +9.74 0.486145446075 +8.05 0.0762762554042 +9.58 0.351215268223 +10.28 0.564844092329 +11.22 0.749105637566 +7.48 -0.152464147406 +10.58 0.776730911847 +10.83 0.700610911428 +10.24 0.47816551013 +10.66 0.773094383365 +9.1 0.18953885137 +9.11 0.186636269262 +7.7 0.081878761991 +10.98 0.647474948732 +10.4 0.606953506583 +10.29 0.744546228476 +10.54 0.652388602682 +10.92 0.791443415862 +10.43 0.625843159318 +10.44 0.599656751134 +10.55 0.774191637655 +7.77 0.116936224849 +9.82 0.47492179152 +10.43 0.663323933628 +10.03 0.495544337546 +9.37 0.622230410959 +9.93 0.198445786658 +10.23 0.629103254755 +9.95 0.479735541748 +10.9 0.586649322893 +10.49 0.575791511054 +10.38 0.347161473713 +7.55 -0.0426306721233 +10.55 0.314313224858 +9.48 0.606128356504 +10.94 0.592390673007 +11.14 0.816599302094 +11.08 0.734415066657 +9.16 0.584655210173 +11.06 0.650962110243 +10.96 0.658640533915 +9.81 0.38402661134 +10.4 0.762828553189 +10.07 0.129173149469 +9.89 0.210421622868 +10.01 0.508600171762 +10.98 0.568952445897 +10.94 0.767823498008 +7.97 -0.144951899926 +10.35 0.534321761402 +10.57 0.535547279177 +10.64 0.655501364912 +8.68 0.454089165441 +8.66 0.459041392321 +10.41 0.438479285006 +10.57 0.462098381135 +9.91 0.379940845753 +10.04 0.567444689172 +11.33 0.912611599184 +11.1 0.706505460454 +10.26 0.816281033504 +10.66 0.503896327811 +7.34 0.0481420891224 +10.3 0.641549787126 +11.5 1.20018574616 +10.93 0.826371089418 +11.07 0.879850171903 +10.02 0.499209188098 +10.67 0.511093060782 +10.4 0.553518940149 +9.83 0.309630167426 +7.63 -0.129376914128 +10.36 0.557905902303 +10.43 0.688084373715 +10.74 0.714850121135 +10.36 0.463411958597 +10.48 0.489390312498 +10.78 0.689841409138 +10.94 0.657010420341 +9.41 0.665501317222 +10.86 0.644713365325 +9.16 0.320091496511 +10.46 0.473403879747 +11.18 0.816679807913 +10.16 0.680769485635 +10.47 0.530254487803 +10.47 0.486288760961 +10.59 0.616760936239 +9.74 0.532383787875 +10.04 0.640854056943 +10.56 0.58763109088 +8.7 0.517520430282 +10.4 0.59934778352 +10.02 0.477677379887 +10.92 0.684742258603 +7.5 -0.19820698817 +11.45 0.905140836254 +7.52 0.0886926320465 +9.98 0.291956733729 +10.25 0.475486390888 +7.61 0.0926951405235 +7.53 0.0924734115259 +11.27 1.020500091 +7.94 0.0343303638124 +11.61 1.01746085444 +9.75 0.834745337588 +8.34 0.175966146209 +8.37 0.201943063402 +10.27 0.699120218259 +7.51 -0.0716041477433 +9.99 0.484406140191 +8.17 0.151782903261 +10.12 0.442910189677 +10.41 0.629351438413 +7.31 -0.117100178629 +10.25 1.01306313146 +7.62 0.165049956321 +10.82 0.499575279204 +9.77 0.509008160306 +10.2 0.589330099749 +9.49 0.675171194789 +9.47 0.67123377451 +9.65 0.611286656208 +10.63 0.442377013783 +8.49 0.307923703612 +10.89 0.661812685537 +7.87 -0.0527932267888 +10.98 0.862614054736 +10.6 0.540526390393 +7.59 0.081561596782 +8.03 0.214631893672 +10.66 0.547399716585 +9.28 0.638850438144 +9.29 0.63475614522 +10.15 0.536675851193 +11.59 1.08141115103 +10.05 0.72658313224 +10.87 0.769898741266 +7.95 0.0132715348721 +10.27 0.348766926286 +9.6 0.588900546832 +10.15 0.562893070372 +7.88 0.17851837904 +10.53 0.491650729762 +8.01 0.074412802659 +10.61 0.790140255418 +10.11 0.434839435731 +10.94 0.770200979812 +10.17 0.540458344555 +9.81 0.414342706099 +9.84 0.607236621034 +11.25 0.723112485872 +10.45 0.685654862329 +10.22 0.372189994903 +7.16 -0.130926955644 +11.15 0.825769900541 +10.76 0.563344924482 +10.74 0.414089600195 +11.55 0.97159053883 +9.85 0.333061970842 +10.04 0.527306527278 +10.8 0.702334634561 +9.37 0.509862063258 +10.7 0.454585598982 +10.34 0.7259518933 +9.6 0.653263314925 +10.59 0.671442104489 +11.15 0.8313380836 +10.51 0.59472394641 +10.57 0.608887214767 +10.77 0.688790657136 +10.37 0.52478048993 +9.51 0.491357626522 +9.92 0.641443139652 +10.72 0.719017490052 +10.57 0.471291711059 +10.23 0.421069655476 +10.89 0.605963501415 +9.73 0.49214733361 +9.56 0.596408237033 +7.85 0.350688651301 +9.78 0.485972898521 +9.62 0.340480694601 +10.44 0.673200196062 +10.07 0.540151711697 +10.18 0.442738508227 +10.72 0.66955503648 +10.11 0.3089679491 +10.21 0.425595896289 +10.68 0.559102013233 +9.95 0.290691767707 +9.73 0.747910876693 +10.81 0.680444475643 +9.98 0.589590437004 +10.59 0.515343893088 +10.89 0.688985332458 +10.37 0.592653137144 +9.68 0.645525469901 +11.33 1.02196987071 +10.1 0.74518925092 +10.0 0.597727032295 +10.58 0.582290682719 +10.92 0.755995726722 +10.66 0.804815557314 +10.66 0.660761933536 +10.39 0.371231413099 +10.27 0.597462648997 +10.74 0.624217300109 +10.58 0.681993914874 +11.22 0.936240461018 +9.87 0.378157358961 +9.71 0.588160947516 +10.58 0.730664593978 +11.44 1.1388649634 +10.95 0.811019119029 +10.71 0.71231747468 +11.08 0.796208531727 +10.19 0.497504679917 +10.19 0.564199634359 +10.57 0.601852516628 +10.83 0.586975719375 +10.7 0.54752857646 +9.77 0.518867149821 +10.65 0.380950093479 +9.65 0.385793299532 +10.46 0.666892211067 +10.87 0.666899440214 +10.24 0.699332285736 +11.58 0.977553090406 +11.35 0.832078851158 +11.0 0.725933789046 +10.25 0.520149331458 +11.03 0.716019789667 +9.8 1.17542034857 +10.4 0.437938485247 +10.37 0.578607945021 +11.21 0.763678478523 +10.83 0.89014510105 +10.83 0.649963144923 +10.04 0.610331187659 +10.8 0.513871981902 +10.57 0.667989891742 +7.74 0.106161999705 +10.63 0.525848865578 +10.36 0.539368150324 +10.55 0.386677283961 +11.17 0.707825568332 +10.74 0.706640994752 +10.41 0.493430635145 +7.76 0.0696996046049 +8.32 0.0983356457283 +11.64 1.20241959401 +9.61 0.296692606112 +10.18 0.457582948493 +10.44 0.357020458286 +10.54 0.795041776628 +10.38 0.494154594018 +10.02 0.224136677604 +8.54 0.163367573152 +10.19 0.392820460242 +9.67 0.334781951236 +8.28 0.189867714349 +10.27 0.225309281726 +8.2 -0.051305230641 +10.31 0.394107950222 +8.03 0.202028039127 +8.33 0.1746329342 +10.75 0.618045360684 +11.1 0.844664180986 +8.86 0.397077003209 +11.41 1.04372322097 +9.11 0.487666264926 +8.16 0.219450513774 +11.41 0.90969014707 +9.7 0.618381810026 +11.39 1.14088498027 +11.21 0.836906213527 +10.39 0.621184359834 +11.15 0.919913011149 +10.53 0.711914971527 +9.66 0.278896414007 +10.98 0.850526060154 +10.27 0.669922157482 +10.13 0.406526354702 +10.54 0.574704248836 +11.13 0.77275008378 +9.73 0.237705993395 +9.98 0.534330363812 +10.91 0.828606582618 +10.44 0.787055724229 +10.87 0.561452479087 +11.19 0.788136620059 +10.97 0.740993931585 +7.67 0.144642486907 +10.93 0.79544979416 +10.77 0.670433430143 +9.78 0.687112816057 +11.2 0.739108882882 +10.99 0.601203804082 +10.44 0.565386815372 +11.53 1.07423182917 +8.5 0.368185500834 +10.72 0.620223139167 +8.98 0.169183218945 +9.84 0.494463440583 +10.35 0.549003262026 +10.58 0.695079095328 +10.86 0.82859487781 +10.34 0.506173920365 +11.11 0.854532320224 +9.15 0.274339630283 +11.1 0.636244772759 +9.95 0.472064832227 +10.53 0.675953167417 +10.6 0.668857425368 +10.07 0.239581998394 +10.43 0.635585743337 +10.18 0.650633875116 +10.83 0.520002119788 +10.45 0.60943573385 +7.72 0.0414501049354 +11.08 0.730677219185 +10.73 0.573920986836 +10.8 0.72819139859 +10.71 0.784965163956 +10.21 0.454799915436 +11.07 0.778385835666 +9.58 0.597242421078 +10.61 0.689932458336 +10.29 0.381700705466 +10.52 0.521099940107 +9.11 0.206492120514 +10.43 0.646415720226 +10.88 0.778134909439 +10.98 0.908520760339 +9.76 0.537616914024 +10.61 0.245074791582 +10.53 0.719961529611 +10.73 0.69828970322 +10.49 0.52556305827 +10.02 0.553204250057 +10.97 0.88512169454 +10.67 0.7118759586 +11.47 1.00250811958 +10.29 0.697042904386 +10.75 0.759407183862 +8.18 0.473005557112 +10.78 0.72058431853 +10.21 0.67760695272 +8.18 0.243534101832 +10.59 0.664650215934 +8.4 0.468427807394 +10.82 0.629744999447 +8.14 0.123071954952 +8.46 0.275423711759 +8.57 0.130119196105 +10.36 0.459994838328 +9.63 0.60059336367 +7.57 0.0949976699822 +9.45 0.640821873579 +8.47 0.222667568776 +7.49 0.0920184707528 +10.88 0.681783766468 +8.6 0.326540668517 +11.28 0.754434471072 +8.8 0.17842387568 +8.16 0.272653558233 +9.42 0.551969541735 +9.41 0.572637059144 +11.5 1.02817893752 +11.21 0.786401983881 +10.16 0.553551963888 +11.24 0.92324401863 +9.7 0.3017332812 +10.12 0.652238090154 +9.92 0.569216751878 +10.87 0.739619889578 +9.2 0.470116353151 +9.15 0.471556737752 +10.45 0.654189000202 +9.96 0.703119346236 +10.17 0.242773836968 +10.42 0.596899561894 +10.85 0.728552490143 +7.5 0.0910646070265 +11.37 0.866233132432 +10.34 0.725282098151 +7.82 0.0713364270219 +11.01 0.771951335377 +11.43 0.865611757103 +7.23 -0.155355784148 +11.01 0.785614524947 +10.68 0.715334168249 +11.71 1.11492554986 +7.62 0.165039090838 +10.65 0.716790751422 +11.32 0.810009697133 +10.44 0.827835702947 +11.34 0.842953235312 +10.24 0.545004064703 +10.78 0.686823846332 +7.66 0.325669541183 +10.87 0.81843370108 +7.75 0.198833158463 +11.52 0.968160541053 +7.46 -0.0382873156642 +11.83 1.10088565836 +9.29 0.651504148955 +11.42 1.07967548933 +10.52 0.768481932062 +11.15 0.934700401715 +10.67 0.751131438226 +11.37 1.10925705253 +10.18 0.90991167352 +11.17 0.7507506731 +8.07 0.178108280257 +9.06 0.591605373567 +10.5 0.822369522434 +11.14 0.685331150324 +10.55 0.700126969364 +7.96 0.00720839145276 +11.39 1.05852295398 +11.09 0.679174643067 +10.83 0.596589969768 +8.36 0.154047326021 +11.43 0.967633536429 +11.19 0.803512939217 +10.54 0.581815351101 +8.84 0.459718105734 +8.04 0.24371060568 +8.44 0.127121728321 +10.53 0.538544843002 +8.53 0.340711077861 +10.28 0.349589207836 +10.37 0.350681049836 +9.6 0.593366544003 +10.57 0.686823295196 +11.32 0.957177476632 +11.25 0.970898529371 +7.73 0.0671542300987 +7.04 -0.342040005223 +11.6 0.993318608232 +8.72 0.396073227016 +10.92 0.512684396217 +10.43 0.579554960401 +10.44 0.733860747824 +10.07 0.336354198877 +9.18 0.226920583282 +11.08 0.8280968969 +11.12 0.762433815304 +10.13 0.768519364397 +11.13 0.938752785252 +11.5 0.962913905803 +9.75 0.513109710697 +9.65 0.410228812119 +7.92 0.058032766822 +11.03 0.770139304022 +9.16 0.572799806121 +7.76 0.101923145455 +10.11 0.23398893764 +9.83 0.398219583753 +10.9 0.615004442975 +10.81 0.911690158754 +10.16 0.317967950722 +10.4 0.66585889092 +9.68 0.540199842796 +10.83 0.818082888577 +10.85 0.764866203689 +11.34 0.790285164033 +10.61 0.510682731406 +10.28 0.443462401326 +10.23 0.408579125409 +10.23 0.400327751527 +8.35 0.167838649689 +10.22 0.836917478809 +11.23 0.859850616405 +8.51 0.321363201475 +11.01 0.666988969069 +10.66 0.601185736157 +10.0 0.557905902303 +10.2 0.717090689416 +10.97 0.725545027439 +11.23 1.09860266452 +9.19 0.522444233506 +9.93 0.549266764539 +9.89 0.354300562345 +10.77 0.826670021257 +8.02 0.0838349725209 +7.99 0.062060312154 +10.04 0.764237878775 +10.98 0.41774632648 +10.6 0.708526096521 +8.83 0.303982148346 +8.37 0.194426994638 +7.37 -0.0501991704269 +9.1 0.522388651551 +9.11 0.517723594834 +8.54 0.376863325526 +8.33 0.216246373948 +10.18 0.29228382346 +11.01 0.880489283532 +11.76 1.19836962899 +7.28 -0.0883098412461 +10.95 0.786841881318 +10.71 0.665270550189 +11.8 1.13618974015 +10.69 0.725717986753 +9.42 0.541238150559 +8.73 0.652990964224 +11.2 0.803646530077 +8.65 0.343826182678 +11.03 0.822082448861 +10.78 0.854558978378 +10.08 0.747973266362 +8.2 0.522216664763 +10.99 0.961895473668 +10.32 0.330906342769 +10.55 0.553604984824 +7.92 0.167979553074 +10.22 0.791302980066 +10.02 0.575369625947 +9.79 0.718836088344 +10.67 0.493581703814 +10.39 0.378056254861 +9.86 0.491048740247 +9.87 0.372239747033 +11.68 0.99831659378 +10.35 0.336465083032 +10.78 0.655299037835 +11.39 1.00198862092 +11.02 0.868767553565 +11.24 0.792648544053 +10.42 0.754348335711 +7.61 0.157260139531 +10.49 0.690258926965 +10.38 0.327796622479 +10.24 0.790985473064 +10.84 0.981325010414 +9.7 0.63144547599 +11.15 0.631492886643 +9.48 0.476451747953 +10.33 0.349919383046 +10.5 0.472241336075 +11.65 1.06901554143 +8.14 0.0615172648768 diff --git a/data/SizeMass/Trujillo_2020_dlogM_0.25.txt b/data/SizeMass/Trujillo_2020_dlogM_0.25.txt new file mode 100644 index 00000000..ca4b6711 --- /dev/null +++ b/data/SizeMass/Trujillo_2020_dlogM_0.25.txt @@ -0,0 +1,25 @@ +# log_{10}(Mstar/Msun) log_{10}(med(R50)/kpc) Ngal +7.125 -0.123809709281 6 +7.375 -0.0174639469389 14 +7.625 0.0905830217862 24 +7.875 0.100445930553 34 +8.125 0.179274741455 36 +8.375 0.192147354494 36 +8.625 0.265078005168 35 +8.875 0.269970892655 28 +9.125 0.435060324441 32 +9.375 0.520843005612 31 +9.625 0.490747564484 40 +9.875 0.47492179152 55 +10.125 0.51795334952 78 +10.375 0.57065261654 104 +10.625 0.660761933536 125 +10.875 0.720550198496 131 +11.125 0.788136620059 87 +11.375 0.967633536429 43 +11.625 1.0604334067 23 +11.875 1.19295500589 8 +12.125 0.0 0 +12.375 0.0 0 +12.625 0.0 0 +12.875 0.0 0 diff --git a/data/SizeMass/xGASS_RawData.txt b/data/SizeMass/xGASS_RawData.txt new file mode 100644 index 00000000..d7d8f72f --- /dev/null +++ b/data/SizeMass/xGASS_RawData.txt @@ -0,0 +1,1074 @@ +# log_{10}(Mstar/Msun) log_{10}(med(R50)/kpc) +10.4924038358 0.394320773258 +10.6047683429 0.442531689428 +10.7417268496 0.254498883324 +10.38213549 0.533210323189 +9.31653274426 0.673834450737 +9.57383393029 0.170244103643 +9.78642395718 0.454987520143 +10.2512615778 0.303137454838 +9.92294688938 0.519203177933 +10.6674491783 0.247525752209 +10.8051232736 0.341021923998 +9.87206525254 0.315386095929 +10.0512481273 0.874844609687 +9.38549005632 0.923193659833 +9.30219386497 0.519695317645 +9.96128710528 0.637205620767 +9.98346155647 -0.0193068135246 +10.5243222281 0.194117806102 +9.23385286254 0.307142853816 +9.04295259916 0.356711637473 +10.0640039801 0.233163007182 +10.7739017606 0.304357259479 +10.047236845 0.470534962716 +10.6430064426 0.659313780411 +9.29967342784 0.540752781391 +10.6207176451 0.379226936501 +10.0845603763 0.141123586719 +10.0967618778 0.821237962357 +10.0275301203 0.492173869156 +9.8613528155 0.696213040621 +10.2463240809 0.426115925002 +10.1305047563 0.697177918051 +9.24150236254 0.196621404763 +10.2342504736 0.339958291953 +9.85573089232 0.747496636666 +10.4837585948 0.238430133111 +10.0928026704 0.358281515421 +10.4352203006 0.397889140215 +10.9820754612 0.76102595831 +10.6267087214 0.698340913639 +10.8085624644 0.934523597621 +10.8999474129 0.608752793902 +10.2518331045 0.28590745731 +9.95033419059 -0.136052321272 +10.9958563002 0.533100240119 +9.85865430902 0.639070070016 +10.3094544007 0.270060359316 +9.24740381964 0.228707818942 +10.6212727467 0.297930533146 +9.68616539308 -0.282682442665 +10.2802369627 0.445555553579 +10.1959065508 0.791245486043 +10.339707533 0.396421201903 +9.40299779864 0.544431297081 +9.44709867219 0.444278991163 +9.75661448406 0.168165796074 +10.7384532176 0.575223763903 +10.5773853916 -0.03325342637 +10.2497025043 0.327124732619 +9.19004020815 0.490308906004 +11.1796186733 0.967443364342 +10.828683752 0.570611531399 +10.2237372977 0.476686571846 +10.8581262565 0.451823993336 +9.28829685765 0.417019065368 +10.6387262798 0.378170726104 +10.9569065298 0.563621567188 +10.2611641769 0.255247598045 +10.8241376618 0.398083288138 +10.5882648459 0.47560353871 +9.94770031091 0.614984492127 +10.5753063034 0.336650349803 +10.738633496 0.701712530912 +11.2576825132 0.697595001396 +9.30118566846 0.669945263405 +9.17454423937 0.352895888978 +9.43634649431 0.138379889598 +9.90584121394 0.299774442774 +10.689589235 0.780067600667 +11.1853640196 0.478742109384 +9.253835224 0.130983417364 +9.38600922 0.68156522021 +10.0346675933 0.544498718143 +10.0950470569 0.479073347031 +9.42913140699 -0.0301944214693 +9.41919386849 0.262678853287 +10.1232624546 0.623408453325 +9.11477793307 0.570697498413 +9.46002005115 0.423722827312 +10.8465718021 0.132909895141 +10.1818301101 0.239630803197 +9.25152967976 0.664686431873 +10.2626211322 0.396038596781 +10.6977809785 0.49536451709 +10.7131680005 0.576191524938 +11.0218739226 0.525396268963 +10.8893230753 0.676207687704 +10.9573420727 0.475204494576 +11.0299871881 0.793793500631 +9.9132929284 -0.458733370423 +10.4558702359 0.265882522669 +10.8457470117 0.471402421946 +10.7522916963 0.713080885598 +10.979111135 0.59339246512 +10.831537823 0.486037723394 +9.73642362525 0.782766583816 +10.2392476209 0.744782591181 +8.95884247709 0.460468764699 +10.3015009439 0.480008042109 +10.7195609199 0.506749782077 +10.7362211836 0.827492497742 +10.7694466865 0.703180083342 +10.3055611414 0.719716885809 +10.6785117127 0.347012621441 +11.2823209676 0.821180482955 +10.3486564602 0.418012296284 +11.0787940903 0.630973809216 +10.1971636365 0.568759367737 +10.3770934271 0.185009864411 +11.3007492351 0.923535114255 +10.6858528045 0.687279375379 +10.2795978557 0.113226673994 +10.2789335051 0.752954839698 +10.4065466031 0.15641678218 +10.5740558968 0.449142525442 +10.9642557471 0.489653135085 +10.5873456426 0.353130839119 +10.631735562 0.555302172705 +10.444701416 0.172353014905 +11.0749817721 0.581117024661 +10.9478904287 0.637699001168 +11.2348843332 0.561295018024 +10.9505093228 0.490770587411 +11.1425614087 0.790371401006 +10.5571130217 0.49365627191 +10.7148343743 0.300440150118 +10.9353079895 0.930142175318 +10.0040703577 0.450946084499 +9.86288117884 0.414090466527 +10.3257094458 0.607180564416 +9.3121398986 0.539552447547 +10.971832404 0.577502028191 +11.605860543 1.25558753254 +11.2278090003 0.642673537462 +10.9739538587 0.870171969033 +10.9034808245 0.809126557731 +10.9450156968 1.0674943436 +10.4847050489 0.123415983545 +9.31884407426 0.545549689669 +9.5104140172 0.157908528857 +9.47630255732 0.358405763327 +10.1482646471 0.566059135204 +9.18851070173 0.381168402803 +10.0390578614 0.170698772144 +9.59548336046 0.197429919017 +8.90940900329 0.0670778330012 +10.1323497656 0.174253486607 +9.02115265237 0.153774979152 +10.0673997959 0.512690126076 +9.45595774307 0.424230267551 +10.2453699841 0.337688192889 +9.27879865699 0.663507751482 +9.70929883782 0.43683593038 +10.1008744669 0.0543136393336 +9.20009488452 0.84523328025 +10.0549292385 0.364273962175 +11.1375354227 0.777562502986 +10.8957293453 0.921515103433 +9.00734935208 -0.101087298981 +9.84379957522 0.248477138921 +9.92372881016 0.565403661888 +10.1881993 0.449385817307 +9.54276180484 0.6106852703 +9.47779968893 0.336035585945 +9.35462874551 0.183286975468 +9.46687826011 0.435092630559 +9.69153811593 0.722266407522 +11.2988965075 0.851613401371 +9.61679508675 0.404387115508 +8.91552394338 -0.126184600074 +9.81874166124 0.280802706871 +9.50713167261 0.542033382322 +9.51592133397 0.434600337229 +9.47262078692 0.123887606891 +9.48006623602 -0.0290255646311 +9.96065728546 0.61545312178 +9.34920166288 0.226132682168 +10.0699667585 0.209367212711 +9.44256982162 0.15024689896 +9.27654587717 -0.128228349024 +9.54456477577 0.17521956046 +10.1894712446 0.308176206147 +9.55116157537 0.19235029552 +10.0155890004 0.257027740613 +10.006935193 0.351950203447 +10.1723396587 0.65161896976 +9.43751227872 -0.0385210077812 +9.42838680922 0.389199542782 +9.93293308548 0.381987316837 +11.0708836665 0.855904955558 +10.161688822 0.4793508262 +10.737771307 0.301683297061 +10.0572773701 0.668019404739 +8.97166359225 0.362498915531 +9.50716652636 0.631753649569 +9.80192838689 0.458278146897 +10.2528772925 0.354239454498 +10.5255142094 0.175543641563 +10.5228337248 0.304947559975 +9.60950281909 -0.0971834005789 +9.24492328326 0.509427119177 +9.87377289064 0.131682470702 +10.4479045262 0.283651144489 +10.6916156321 0.526732840801 +9.98279867147 0.51411375114 +10.4424486956 0.443195423186 +9.22790621973 0.522202231995 +10.0982561998 0.537938913633 +9.42086418078 0.590877232781 +10.1997817881 0.605269642902 +10.2939894496 0.232438023605 +10.2718740334 0.0540693091249 +9.04264039815 0.399716695748 +11.0058427221 0.53554785226 +9.82022333948 -0.116860152837 +10.545717025 0.295651563996 +10.5818243908 0.211802106206 +9.76378583889 0.00111955479743 +9.98642872829 0.1931355458 +9.65523337551 -0.349175272973 +9.36527488652 0.0237576874685 +9.96674909362 0.412066014556 +10.0468159014 0.606834801803 +9.80133193532 0.731850903157 +9.67745691052 0.403774394779 +9.46139397385 -0.282422117923 +10.4554170371 0.279402881151 +10.2556359981 0.50151146105 +10.6374954492 0.0633777564832 +10.5406459958 0.746015247101 +10.2475804854 0.557195748229 +9.18182947212 0.298448802438 +10.4864423984 0.630033539103 +10.5698495653 0.388978183224 +10.398438111 0.666289193031 +10.2846307337 -0.242668927426 +9.95668384391 0.299794738223 +9.82471699686 0.483620060053 +8.90407470291 0.241478326645 +9.30964994211 0.294158967813 +9.52744790109 0.562818018658 +10.0583692155 0.104736065027 +9.60439537942 0.519362682017 +9.88376723572 0.453146618533 +9.51046022001 0.402709026307 +9.43453756634 0.426919807221 +11.1673512141 0.858254582366 +9.56143562153 0.324607385289 +10.3815936887 0.549417008606 +9.98318675019 0.434642174433 +9.32000461801 1.09087679753 +9.50863854668 -0.116753829979 +10.4458240375 0.588023111796 +9.92380304795 0.397989956558 +10.9824055434 0.50680259253 +9.91802195253 0.361845238511 +9.0345319201 0.594175095084 +10.9720826815 0.397383906609 +10.6693073546 0.636931812914 +9.75603891748 0.385136302634 +9.19407257551 0.223769350371 +10.0156141059 0.531286511418 +10.3875898359 0.500267445175 +9.36190793411 0.339029172208 +10.8268578758 0.72609447244 +9.75083800823 0.509241057105 +9.62791253971 0.575488213781 +10.6738255275 0.260939926512 +10.9688599082 0.426951467621 +10.7936258691 0.894540803382 +10.263985376 0.269521053757 +9.38101405435 -0.0972800939867 +9.97743346851 0.210755134015 +9.58279650825 -0.408287283122 +9.69038497202 0.635423450704 +9.43601438483 0.414861840618 +9.26910652672 0.464639297756 +9.41147088984 0.69327666049 +9.76936721769 0.254253812448 +9.99896952171 0.734099585081 +10.1077761611 0.754008059962 +10.6175070395 0.449079631761 +10.1183235289 0.496711910369 +9.46454192008 0.470961243731 +9.06123096619 0.250769848177 +10.3326494095 0.277689286389 +10.5149159134 0.25724807831 +9.83469292614 0.438650924307 +9.09316322323 0.501665962218 +10.25650224 0.477125137533 +10.3148598773 0.215314352045 +10.4950605448 0.616961981012 +10.6853891994 0.567154166189 +9.90163704535 0.50463441559 +10.586820977 0.376613304694 +9.76691752442 0.753734881016 +11.3862559031 1.01020127808 +10.528495342 0.291640506865 +10.7701169883 0.355582778731 +10.247033583 0.321563505479 +9.20172658478 0.324257714164 +9.32075324336 0.65683067598 +10.581959704 0.67972361014 +9.69719746579 0.667030408664 +9.19904277976 -0.135245806324 +9.92251236261 -0.0665208295416 +10.1794969173 0.359431776087 +9.21687750437 -0.55482120374 +9.17763106676 0.62918664831 +9.44991450118 0.472506387727 +9.52183574432 0.576519777532 +8.83292373197 0.42933345456 +10.3175214584 0.870059438422 +11.3465809427 0.863701932964 +9.67166706628 0.245184642156 +11.2982419701 0.72975337902 +10.7454036354 0.253450970435 +9.95796165892 0.115503091979 +9.89157116708 0.0118066799688 +9.15309220982 0.560592695778 +10.909639406 0.622378723737 +10.1571292622 -0.244321532724 +11.4188587763 0.998129733631 +8.98989539163 0.387137552822 +11.5556518042 1.03170397963 +10.8940927282 0.81124603157 +9.70737971549 0.552162222265 +9.1030295034 0.254917301729 +9.11242903342 0.517952401706 +9.83388378331 0.315563993984 +9.05759047511 0.166159256215 +9.67305573489 0.6441070151 +10.0775029851 0.448052916697 +10.9647033426 0.536612800077 +9.11038854198 -0.154319990631 +11.3435695995 1.09902399795 +10.8822834177 0.662755759303 +11.3416252637 1.03704930083 +10.1748680386 0.392668051316 +10.5611659682 0.521029992143 +10.9486029029 0.84228747005 +10.8088599473 0.536452106253 +9.21677951819 0.482290702699 +11.1196698035 0.859889767069 +10.2777492048 0.392862764481 +10.7806833026 0.221896188565 +10.7677688702 0.451967635097 +10.5447158906 0.591616358466 +11.0704902249 0.510215789459 +11.1720838491 0.88697714351 +11.0812873782 0.718618442615 +10.5622525336 0.662458087636 +10.3094563569 0.39004249449 +9.93837677012 0.0858725474394 +9.87198968197 0.232879330147 +10.8636986184 0.545664006338 +11.1392826703 0.91288509525 +9.99997048217 0.553477221408 +10.2488732074 0.497391664135 +10.3578402025 0.234170168749 +10.7939478407 0.386828874471 +10.938524072 0.743355674115 +9.02309066627 0.140413465925 +9.42709066446 0.545016081678 +10.2613193086 0.663871992856 +11.0260213018 0.434195651478 +10.1421572731 0.103568577962 +10.4552397411 0.444527939259 +10.4617238281 0.477905491401 +10.1158240533 0.601896288512 +10.0589187316 0.597720658737 +10.4873578432 0.690724257784 +10.6756042681 0.318881315862 +10.9106217048 0.729198741984 +10.4149548085 0.671023661024 +9.80300137892 0.612653082238 +9.98336692718 -0.0262242365577 +9.14910380461 0.549854993235 +10.9903352778 0.63890948289 +10.0195099537 -0.0541705599749 +10.1678959916 0.452583185818 +11.4948813164 1.21151865581 +10.2713876984 0.396432795891 +10.034982846 0.518815823009 +9.46116348762 0.626577062563 +11.2533086654 0.776124526817 +11.096301894 0.468685783158 +10.9153881671 0.78928670121 +10.2077913835 0.247613523523 +11.0322250576 0.697239396749 +10.2909406626 0.556724317886 +10.9443418695 0.722400822713 +9.98024934268 0.80224812748 +10.4200313245 0.363366347634 +10.4063735969 0.0519001102502 +10.4654171635 0.539801282256 +10.8998485372 0.625477331271 +10.0235800854 0.193003921637 +9.69449217315 0.385330214987 +10.0400193 0.641276672289 +10.3361847456 0.478764652785 +9.6183901517 0.423859688301 +10.5632086431 0.32037725559 +9.84558789186 0.180195168767 +9.34227573929 0.416809971048 +10.7362894077 0.518390734563 +10.1148930925 0.163251841964 +9.64910246006 -0.119215846958 +11.1117769786 0.596943956075 +10.2434432272 0.617528889089 +10.7214125568 0.621576077605 +10.7137585825 0.442520838319 +10.6237381467 0.709471197339 +10.2557530215 0.513347303851 +10.6523726467 0.51413086769 +11.0301342293 0.693499687144 +10.9871893554 0.657231621371 +10.6807937287 0.253917272998 +10.4370753069 0.399112876421 +11.2293915088 1.09494746567 +9.24481021704 0.291698238553 +11.1073580655 1.04094043281 +10.5799832433 0.510110980755 +10.8648652306 0.318497094631 +10.0951237861 0.783773073229 +11.1757095478 0.743922606709 +9.97911297062 0.599235551879 +11.2032172084 0.646213180837 +9.485030703 0.525003008574 +10.5116146553 0.787362881198 +11.0037527236 0.746466119435 +10.5065862109 0.572484049829 +10.3626824862 0.472033680076 +10.7190101203 0.218709579271 +10.0753760786 0.667666140454 +10.8667984636 0.784409410272 +11.1741051595 0.683970016491 +10.1284795926 0.589078679197 +10.2332177959 0.620178856577 +10.4567535274 0.535566979297 +11.105613364 0.75824389716 +10.2062925152 0.301810012099 +11.210266705 0.761601343774 +10.9774968865 0.630697245667 +9.27140378657 0.5994849791 +9.79620462399 0.716589759128 +11.0938006917 0.589692034315 +11.0167813768 0.391198315334 +11.2150228536 0.6512548168 +10.983139593 0.446174661301 +9.42579420556 -0.0716072348089 +10.2492963685 0.257244621625 +10.7527031208 0.417103866507 +10.5822927691 0.125564765291 +9.05149608814 0.0629407279903 +10.1195516853 0.502567167263 +10.1248001639 0.312004783588 +10.7526424962 0.42102511656 +11.3339690382 0.758973264578 +10.1610698481 0.35207355854 +10.1711013044 -0.127269131739 +10.4106428577 0.811272600083 +9.80716050213 0.881659610548 +9.09484452379 0.449794903177 +10.1035055145 0.635795575647 +10.3478779231 0.0473790492903 +10.4041002911 0.511730097735 +10.8598604222 0.732480615026 +11.7195899954 1.09336258163 +11.3022480858 0.891027486356 +11.090787501 0.641885015222 +10.8838269504 0.796640383019 +11.0939101548 0.57163740052 +10.8009044154 0.69217149255 +9.24910443577 -0.0128413152781 +10.2676720963 0.624864322121 +9.18346988004 0.444867973363 +10.2179484031 0.674531605521 +10.6115866923 0.317159013938 +10.396954541 0.543462029822 +10.668871155 0.376599886702 +9.32574333298 0.625414701449 +10.4320494883 0.0345115587753 +10.2004518273 0.673657675197 +9.18644801699 0.250956459328 +10.9592344819 0.449870777355 +10.0434241457 0.410196926703 +10.0771577202 0.694894521721 +10.4918958572 0.580950540053 +9.84291940895 0.494064409672 +10.894021111 0.865888998982 +11.2262634545 0.958735494321 +10.9012177201 0.349951237192 +9.02522382562 0.269575672391 +9.65602736341 0.2468854584 +9.05994917752 0.582593267055 +10.0155355876 0.460164691725 +10.4861001423 0.423375886123 +10.6611879866 0.0753232903288 +10.0070791614 0.508983231404 +10.329274153 0.694080565615 +9.13729663158 0.13582821723 +10.3668925399 0.143795530371 +9.46293075848 0.443502404081 +9.68092864132 0.0893593885197 +9.33152413965 0.519647453456 +10.0052056693 0.184747699627 +9.21666579266 0.488123858892 +9.74422826744 0.737940735164 +10.4128171595 0.242498540021 +9.35904439613 0.669657799399 +10.1748468242 0.102181103892 +10.3576654551 0.660234342562 +11.2238058414 0.765846929904 +9.15214194848 0.234081079235 +9.41904484744 0.56669555145 +9.22519060214 0.428645151058 +9.39774929273 0.490480836804 +9.82177519143 0.633880529176 +9.33201871651 0.345331601974 +9.64712759556 0.32266089108 +10.2108348001 0.46338038457 +9.84155555007 0.267981113741 +10.0336338718 0.123115606433 +9.67055165053 0.0536830939268 +9.85310815934 -0.609538260836 +10.6475299506 0.588680268557 +10.9443392164 0.62147108754 +10.0143323578 0.109524450016 +9.42745731433 0.442816709057 +9.72503608182 0.801078113214 +9.57672366602 0.242348502855 +10.3407629897 0.224741021501 +10.4163878271 0.301731834766 +9.86728227758 -0.10688451791 +10.1153185128 0.271354489443 +10.4918645709 0.592039283178 +10.2874239138 0.221773457927 +9.81192918117 0.644627136056 +10.1689883857 0.214145550631 +9.24322764427 0.687924439223 +10.1371129224 0.26026602392 +10.5646112468 0.427459931464 +9.67212012284 0.493081983453 +10.6882337522 0.493849730687 +10.5655214244 0.570728438188 +10.1725298232 0.550865269737 +10.130394934 0.592856215125 +10.4812216153 0.461634691916 +10.6134583997 0.355547321048 +9.21975163482 0.710033970322 +9.2755498541 0.751172803376 +10.8711406823 0.358489361722 +10.67129808 0.53275653079 +10.5326109231 0.289696862604 +11.1233750085 0.754973253375 +9.95891341828 0.725411738165 +10.6287432986 0.272674132792 +10.2145728896 0.708549958621 +9.85035614 0.573005370255 +10.8083287541 0.528402140286 +10.6531854488 0.454992366822 +10.0190647018 0.672993064157 +10.4392542716 -0.00123450654538 +9.34104889764 0.31886449677 +10.020547281 0.537759918234 +10.5752047019 0.286352763763 +10.8460692997 1.02018495539 +10.5283576506 0.462938240623 +10.6817424111 0.672406974679 +11.0372751415 1.01556840334 +10.0136702473 0.549608976787 +10.2106324015 0.453246299039 +11.1319943664 0.707945077988 +10.3263441158 0.624238035628 +10.3425620218 0.116752073055 +10.0606857862 0.115907506444 +9.18168285744 0.291025757344 +10.8327046237 0.556183172333 +9.78799476454 0.629091262827 +10.9940170482 0.59097932721 +10.8507622729 0.686635490182 +10.6120536215 0.470164270056 +11.0633579117 0.809323051146 +9.53214131153 0.269057046248 +10.2613216063 0.473708695702 +9.95049153859 0.37859589752 +10.0557987478 0.483658644451 +10.7242347977 0.786438716877 +11.1168074969 0.643505726909 +9.89335681262 0.360705895131 +9.70390013646 -0.20036355563 +10.210965539 0.225403368551 +11.5085358424 0.924892946718 +10.2809072435 0.679501966561 +10.9186481689 0.439458397656 +9.10051467631 0.116426679251 +11.3241720693 0.792379997858 +10.7539986531 0.805049588632 +10.5958588358 0.519756888253 +9.40366060122 0.369997467596 +11.7778471977 1.31945998276 +10.3016669929 0.379708343827 +9.09259087367 0.189836116389 +10.5335474048 0.621329233755 +10.9147125217 0.517625365292 +10.3710590621 0.60910406281 +11.1806486222 0.685191008624 +11.0828288355 0.563539908869 +9.3920881246 -0.0251547503193 +10.1509662437 0.423420230723 +9.69984257214 0.507892565687 +9.28126471489 0.297900403886 +9.44568200815 -0.00209206992471 +9.76835661929 0.314171090837 +10.032157129 0.503671713297 +10.1852875068 0.608594315103 +9.6575458646 0.545855779926 +9.86520468703 -0.145588518887 +11.0839772824 0.824477044278 +11.5385718578 1.66269110951 +10.3023793234 0.297554513329 +10.8413387212 0.658784203083 +9.39984636007 0.063491290262 +11.1877871375 0.823598347444 +9.39340625622 0.223324132322 +9.71480757437 0.26596468134 +9.89136758025 -0.272352356124 +9.58402023444 0.288153970796 +9.63667415133 0.370915435896 +10.1678702792 0.184045069235 +9.85610665627 0.382915731234 +10.3088510616 0.771862225319 +9.74531870905 0.018353229664 +10.2521706284 0.780575860224 +11.0930410815 0.683395750639 +9.96976763697 0.548201513513 +9.23535243162 0.177732939095 +10.4065802183 0.46870397604 +9.79482913314 0.14869486632 +10.1538313534 0.465002930617 +10.0134384083 0.493504804684 +9.8781417835 0.254411955024 +10.8510887518 0.893369370364 +11.0787040299 0.824333578345 +11.1346430484 0.704242333059 +10.2943926355 0.064178686906 +9.18528060087 0.624297596483 +10.6949214049 0.680254653032 +9.36942174034 0.843090099866 +11.0643532792 0.808883910731 +9.06737569278 0.182542372872 +10.5717626251 0.542391627498 +9.58699806727 0.500119820004 +11.213070735 0.76613353851 +9.52506404458 0.557256208805 +10.0752635846 0.418092021503 +11.3625200021 1.01491915086 +9.90689050207 0.343239522307 +10.332251977 0.499263226567 +10.5129575048 0.425161095426 +10.7564969219 0.399504601289 +11.3678625122 1.05606332233 +11.0553907921 0.619436507996 +10.0332431764 0.359043165756 +10.9826788393 0.534528062788 +10.0852406482 0.368745112605 +11.2955007499 0.872479561334 +9.42645597488 0.509831336208 +9.72180004229 0.171659001534 +10.4570899645 0.0657002437172 +9.58818415852 0.543671431943 +9.80727315824 0.0254296559658 +9.3998838969 0.594028126668 +10.814384198 0.716018813021 +9.83606307823 0.492266811026 +9.98544575646 0.502054156263 +10.2012898614 0.847975692377 +11.3499853228 0.909752670354 +10.4544800054 0.655048670093 +11.3538514653 1.09996993935 +11.2523895506 0.726539422798 +10.0280571777 0.206068486605 +10.6222633205 0.577003079596 +10.8397471711 0.354467063967 +9.20757011494 0.311372214126 +10.960553968 0.620654473175 +11.0585997552 0.760068625051 +11.1148231968 0.731185783639 +10.1880951034 0.474536139015 +11.0332339217 0.867410809685 +10.2166907585 0.597863314315 +10.8577516018 0.622412973903 +9.17211409771 0.503892203598 +10.4949947608 0.210039795305 +9.83920703726 0.819735748989 +10.4055189566 0.344205521285 +9.9414383435 0.508398724455 +9.95963420757 0.470853827534 +10.8118506556 0.803583295961 +10.5509113835 0.397343031819 +9.14759881405 0.32436926998 +9.30857587789 0.493080767174 +10.230226324 0.61079709695 +9.97247644628 0.175176297285 +10.2387699273 0.81263669162 +9.0834056991 0.650863629126 +9.74323111534 0.694173045047 +10.1131357832 0.0338066674423 +11.0740656594 0.879879994587 +11.1271099234 0.491473532089 +9.18474081795 0.546485890563 +10.7462281973 0.591269078013 +10.1871815514 0.245652948367 +9.40495362208 0.538546780049 +9.15046469247 0.024655804692 +10.527137773 0.747804375871 +9.7518303258 0.264786906488 +9.39431780032 0.689411164714 +9.85499483824 0.588865612589 +9.98862092632 0.507066051785 +10.7752999705 0.52449894368 +9.05072604606 0.329297402765 +9.80057733193 0.46559241367 +11.3232274656 0.956004150294 +9.84561918574 0.134261431372 +11.1970920167 0.701577712179 +11.540732213 0.981103605898 +11.0667768869 0.845399959773 +9.40627192481 0.493773889561 +9.04459370826 0.16443010594 +10.1353314723 0.301775777995 +9.26971147504 0.333341014436 +8.96024329986 0.26476846088 +9.37044167667 -0.311859991437 +10.5095317308 0.338092581038 +8.91377697044 0.130854923548 +9.86393189709 0.577204343784 +9.12596285046 0.158421100496 +9.49177082471 0.376673330153 +10.2123036776 0.0366676227739 +10.0370285165 0.456110228832 +9.64905137193 0.733637038289 +9.09165958894 0.152143989094 +9.28726985768 0.245285058723 +9.17511971417 -0.153966958929 +10.6812968032 0.837971088026 +11.1703822141 0.605847266957 +10.5163465738 0.504782394815 +10.2011095756 0.19598617254 +10.8159189349 0.695699293719 +9.96156846695 0.233259995716 +10.0224027288 0.693356333905 +9.6239008231 0.64422305192 +9.47003858091 0.703122200056 +10.8304152774 0.308965439474 +10.2112765852 0.366187282451 +10.3565135942 0.297749431967 +11.303093078 0.701967465624 +10.2752379147 0.586829362827 +10.9197927201 0.728846782553 +9.98099789446 0.509082661304 +10.1041861634 0.264126311689 +9.31850008373 -0.265966403192 +10.6902417147 0.564940518374 +10.2384067164 0.407111495084 +10.64342541 0.590831667021 +10.7443117947 0.0416980927781 +10.2147268462 0.393387087109 +9.69248678422 0.419348048952 +10.7063454704 0.28024209529 +10.4552666492 0.14207889157 +9.20854185556 0.484966166618 +10.8972350543 0.566449481688 +9.54071766389 0.338228723211 +11.3366741477 1.17202510266 +11.0896382922 0.530463842238 +10.2212916774 0.686096392328 +10.2941710692 0.414116760278 +10.454194839 0.415583296164 +9.10513999834 0.0633999054701 +10.6018979868 0.858652613462 +10.8340474294 0.695649599047 +9.7510622749 0.441040528897 +10.4939188002 0.356222457625 +9.44560051085 0.391621714016 +9.46634264146 0.20399633557 +10.31791296 0.320339014699 +9.99000693637 0.555892802663 +10.0159796847 0.311653643616 +9.31655127826 0.122892762827 +9.76501673363 0.572896968308 +8.92298036052 -0.0420351470409 +9.37705969661 0.36041499908 +9.22514236507 0.580604503428 +9.17587323188 -1.24423895546 +9.00604126924 -0.130190411984 +10.6162025035 0.476550403718 +10.8200028534 0.499820688185 +9.80065273542 0.315886170195 +9.21174858952 0.208814789345 +10.2345057093 0.747233925632 +9.45442044887 0.584171033157 +10.7792355799 0.439689593107 +9.40367217243 0.283168253206 +10.5496799413 0.507943781871 +10.2017936113 0.450113880417 +10.1405437665 0.711132793246 +9.46751015903 0.220347996376 +9.2563098722 0.57816252052 +9.14700857115 0.34061689445 +9.07790934652 0.2555603881 +11.0506860056 0.849172237023 +9.37452519755 0.0487256164236 +10.1791747142 0.564782536834 +9.66940678985 0.11846419079 +9.200267317 0.186209910581 +8.70023804826 0.0135363753038 +9.91875361191 0.379752564901 +9.70854065529 0.547568967813 +9.088084874 0.15072465711 +10.1264335126 -0.200011433255 +10.4576667702 0.367070518428 +10.3077791817 0.249314527622 +10.5660822719 0.44912068935 +10.7308971443 0.607981713431 +10.5290032784 0.817638407604 +10.5566809844 0.474926813322 +10.7398748555 0.538483976245 +10.8866518151 0.564760507187 +10.9978262241 0.506848475063 +10.7397360502 0.627050354761 +10.5786815846 0.494202364633 +11.2207191768 0.590945588694 +9.97027621994 0.538443557521 +11.2540182258 0.929796608672 +10.9445621256 0.919307514455 +10.4013553133 0.116165176453 +10.7413503755 0.178873293651 +10.8068498709 0.272935484494 +10.9595738891 0.683013502873 +10.1221487926 0.607601946824 +10.7763845885 0.657284766149 +10.3011092952 0.675664808578 +10.9921010398 0.649738849164 +10.5681904734 0.365970542071 +11.1089094969 0.973774513243 +10.5188077194 0.333268060281 +10.3326815514 0.099878498166 +10.7879220988 0.642154082158 +9.93590298497 0.570681633777 +10.4375502628 0.324210490003 +10.5385658262 0.228325037822 +10.1549076818 0.814049539429 +10.8612927005 0.345128454522 +10.2661539087 0.782165777295 +11.4994751694 1.06324380911 +10.9740115856 0.527925710447 +10.9537954273 0.894093733114 +10.8856376374 0.867583142873 +10.3924055088 0.62663591299 +9.9520159052 0.413569005533 +9.98329480671 0.369466862053 +10.8346916108 0.163304431712 +10.8715007363 0.635295192147 +10.1778799107 0.242847271509 +11.1413482255 0.547142677762 +10.1389492698 -0.107975659095 +10.7987892113 0.454416944732 +10.902226979 0.63162519692 +10.4994077824 0.682586697099 +11.0026001466 0.537576643575 +10.8911671822 0.556970877187 +10.2352829916 0.173969566056 +10.0707054473 0.0468730154891 +11.1866420988 0.872687126044 +10.8860367804 0.387796120015 +11.0222948632 0.71508208626 +11.0784462978 0.707116007626 +11.1800109143 0.63999868405 +11.2971782699 0.912916965438 +10.4888766283 0.491128644081 +10.8592152424 0.679891519557 +10.4941176549 0.632887736061 +11.1193123869 0.788616818964 +11.1188251762 0.804508297834 +10.1010486026 0.590982886899 +10.0172393343 0.287453555287 +10.1306391378 0.309717395109 +11.1072358384 0.59874308828 +11.2701242032 0.907471204983 +10.5453021703 0.479312462406 +10.207732787 0.759280411084 +11.1017417903 0.927635550424 +10.1238776242 0.752024955831 +10.8043990215 0.415842787269 +11.30665622 0.622920993763 +11.0311499021 0.841378981574 +10.436315117 0.414214317654 +11.0358080164 0.497031675551 +10.8271026374 0.614677017291 +10.5790687614 0.64453192276 +10.6157467986 0.323861701262 +10.424046553 0.537535944675 +11.0022774263 0.769764339949 +11.000475402 0.650218537252 +10.6548259535 0.476805555692 +10.8048060337 0.501741838887 +10.7255896289 0.88288323816 +10.4412118953 0.55392094079 +11.1552165859 0.752310875554 +11.1109295073 0.517295320399 +10.5485771148 0.464342999229 +10.5963858783 0.449320432962 +10.6907327746 0.210250542683 +10.3805348 0.286384896992 +10.9155711412 0.602963362015 +10.7015855842 0.543616098996 +10.5483843412 0.627359724652 +11.1259962441 0.545935528631 +10.9093966317 0.57543068167 +10.9562878377 0.648939146439 +10.5736682017 0.341036842582 +10.1555887987 0.268594214406 +10.0482699476 0.203601370862 +10.5441586983 0.35914549696 +11.1599150327 0.64323305239 +10.2890788097 0.408349730936 +10.276799379 0.440058489822 +10.3043272946 0.226096082098 +11.0019097564 0.537612316061 +10.7089567428 0.451627599989 +10.4297788922 0.249232608438 +11.4035247369 1.00601695525 +10.0881383781 0.64853099837 +10.2702577019 0.255218283195 +10.3891737926 0.713420114226 +11.2215685641 0.595302071062 +11.2345399591 0.775334678166 +10.7107247062 0.447954837819 +10.3583738018 0.510800734637 +11.0320419445 0.808529340206 +10.0130849117 0.116027679561 +10.3279512156 -0.34181115879 +10.7314693161 0.469441487011 +11.2493777882 0.545155530936 +10.9557043561 0.796786802156 +10.4098939643 0.550062833088 +10.7995281744 0.51331985714 +9.99353659282 0.0871249547838 +10.4675980409 0.462328458918 +10.9051591031 0.501175671132 +10.8762893981 0.648740888389 +10.8108181787 0.430289643861 +10.3684819771 0.521044415005 +10.4003156162 0.234848369142 +10.2657494336 0.174452534889 +10.0413084387 0.516187725997 +10.5421340358 0.329517885299 +10.4228987682 0.582855188298 +10.1770774454 0.0902543702622 +10.5648202471 0.621600412428 +10.0567944569 0.281785704627 +10.7878731909 0.398992399999 +10.4756071455 0.364432685206 +10.1799447722 0.216822325457 +10.3147147523 0.454280662204 +10.1553983805 0.118148517445 +10.2685428063 -0.00732491175608 +10.4012427076 0.365300063976 +10.0605546375 0.268122406262 +10.2475551541 0.311990087454 +10.5095846476 0.446535629618 +10.1775865661 -0.230545604315 +10.4568934881 0.290097129575 +9.17648445431 0.401932617587 +10.3932740033 0.553363502597 +10.5686429239 0.639401109214 +10.3075450329 0.399518785497 +10.2145707554 0.313118289452 +10.7649456608 0.506213276125 +10.2727592656 0.39360099905 +10.0091107859 0.629993564752 +9.1945965451 0.524167306507 +9.4726544918 0.55312076957 +10.0613937931 0.29105702672 +10.4324029438 0.423534811886 +9.75427222749 0.584129819638 +9.5293104417 0.085847497932 +10.4054482077 0.350838241137 +10.761386139 0.432973546529 +10.395392347 0.513327036892 +10.7531428017 0.538765859283 +10.7742140618 0.309236160543 +10.099580035 0.739906845971 +10.5029914633 0.429167113031 +10.8791644877 0.660911745153 +10.498920845 0.638652716134 +10.0476871388 0.00809127899312 +10.4712826499 0.429415773907 +10.6815914288 0.365080765873 +11.1359157702 0.709823063129 +10.614048587 0.379667347816 +10.5504439409 0.377318576022 +10.8974344245 0.678384753201 +9.95222037778 0.498336854133 +10.5351600369 0.288337479435 +10.1172922491 0.601621532991 +10.545395458 0.337689157931 +11.1525931785 0.769943009489 +10.2649654717 0.390368867613 +9.7868456688 0.354593769006 +10.1751639476 0.4104915666 +11.5070423394 1.66274569349 +10.2720999518 0.309656008543 +10.5790968967 0.491619013608 +10.2363984508 0.122605134229 +10.0550014836 0.46288795314 +10.8722299003 0.402648733588 +9.86687168975 -0.243677643893 +10.1102734475 0.615024368472 +9.71991069588 -0.0777086207871 +10.502616778 0.45665398931 +10.6837350852 0.410683220584 +10.549734512 0.582167530203 +10.9504710207 0.840134754715 +10.2686265842 0.0598444509873 +10.3054533084 0.479389300294 +10.8301797393 0.238627241361 +10.4573807229 0.646492985018 +10.4124646845 0.330181268035 +10.8070343829 0.886476225153 +10.222577317 0.373263121007 +11.2077239804 0.665271887406 +11.3222446431 0.91373110946 +10.2384652008 0.408599234369 +10.6173487017 0.311701163973 +10.9516851733 0.59675831785 +10.8598584285 0.557684001619 +9.3608783353 0.634132533681 +10.4117141255 0.469890156416 +10.5166994166 0.530268762958 +10.965190107 0.697400126214 +11.0535873054 0.805903147004 +11.0237810641 0.437988287951 +10.351578586 0.641643406082 +10.4097630344 0.718763587573 +11.3456496736 0.775584381249 +11.4462069598 0.958191568133 +10.0540903245 0.106622353727 +10.2336309479 0.723590943171 +10.6540125666 0.54546114315 +9.29671290254 0.43707106176 +10.2076052051 0.257530461211 +11.3266569803 0.729731260583 +9.48014230648 0.425249631255 +10.8314523237 0.510882565829 +10.9611433886 0.564791846289 +10.3755257646 0.119074656155 +10.8986512861 0.636876783437 +11.255570854 0.629510290471 +10.5680947928 0.694197310352 +10.2593889539 0.832171119601 diff --git a/optim/constraints.py b/optim/constraints.py index dc34b902..d8262878 100644 --- a/optim/constraints.py +++ b/optim/constraints.py @@ -30,6 +30,9 @@ import common import numpy as np import smf +import sizes +import sizes_with_icl +import global_quantities logger = logging.getLogger(__name__) @@ -85,6 +88,7 @@ def _load_model_data(self, modeldir, subvols): hist_HImf = zeros3() hist_smf_err = zeros3() hist_HImf_err = zeros3() + hist_smf_comp = np.zeros(shape = (1, 4, len(mbins))) fields = { 'galaxies': ( @@ -93,7 +97,7 @@ def _load_model_data(self, modeldir, subvols): 'matom_bulge', 'mmol_bulge', 'mgas_bulge', 'mgas_metals_disk', 'mgas_metals_bulge', 'mstars_metals_disk', 'mstars_metals_bulge', 'type', - 'mvir_hosthalo', 'rstar_bulge', 'mstars_burst_mergers', + 'mvir_hosthalo', 'rstar_bulge', 'mstars_burst_mergers', 'mstars_burst_diskinstabilities') } @@ -107,7 +111,7 @@ def _load_model_data(self, modeldir, subvols): zeros1(), zeros1(), zeros1(), zeros1(), zeros1(), zeros1(), zeros4(), zeros4(), zeros2(), zeros5(), zeros1(), zeros1(), zeros1(), zeros1(), zeros1(), - zeros1(), hist_smf_err, hist_HImf_err, zeros3()) + zeros1(), hist_smf_err, hist_HImf_err, hist_smf_comp) ######################### # take logs @@ -119,7 +123,68 @@ def _load_model_data(self, modeldir, subvols): hist_HImf_err[ind] = abs(np.log10(hist_HImf[ind]) - np.log10(hist_HImf_err[ind])) hist_HImf[ind] = np.log10(hist_HImf[ind]) - return h0, hist_smf, hist_HImf, hist_smf_err, hist_HImf_err + #### Read CSFR model data #### + fields = {'global': ('redshifts', 'm_hi', 'm_h2', 'mcold', 'mcold_metals', + 'mhot_halo', 'mejected_halo', 'mstars', 'mstars_bursts_mergers', 'mstars_bursts_diskinstabilities', + 'm_bh', 'sfr_quiescent', 'sfr_burst', 'm_dm', 'mcold_halo', 'number_major_mergers', + 'number_minor_mergers', 'number_disk_instabilities', 'smbh_maximum')} + + # Read data from each subvolume at a time and add it up + # rather than appending it all together + for idx, subvol in enumerate(subvols): + subvol_data = common.read_data(modeldir, self.redshift_table[0], fields, [subvol]) + max_bhs_subvol = subvol_data[20].copy() + if idx == 0: + hdf5_data_sfr = subvol_data + max_smbh = max_bhs_subvol + else: + max_smbh = np.maximum(max_smbh, max_bhs_subvol) + for subvol_datum, hdf5_datum in zip(subvol_data[3:], hdf5_data_sfr[3:]): + hdf5_datum += subvol_datum + #select the most massive black hole from the last list item + + # Also make sure that the total volume takes into account the number of subvolumes read + hdf5_data_sfr[1] = hdf5_data_sfr[1] * len(subvols) + + h0_sfr, redshifts = hdf5_data_sfr[0], hdf5_data_sfr[2] + + (mstar_plot, mcold_plot, mhot_plot, meje_plot, + mstar_dm_plot, mcold_dm_plot, mhot_dm_plot, meje_dm_plot, mbar_dm_plot, + sfr, sfrd, sfrb, mstarden, mstarbden_mergers, mstarbden_diskins, sfre, sfreH2, mhrat, + mHI_plot, mH2_plot, mH2den, mdustden, omegaHI, mdustden_mol, mcoldden, mhotden, + mejeden, history_interactions, mDMden) = global_quantities.prepare_data(hdf5_data_sfr, redshifts) + + #### Size-mass relation #### + mlow3 = 6.5 + mupp3 = 12.5 + dm3 = 0.2 + mbins3 = np.arange(mlow3,mupp3,dm3) + xmf_rm = mbins3 + dm3/2.0 + + dmobs = 0.4 + mbins_obs = np.arange(mlow,mupp,dmobs) + xmf_obs = mbins_obs + dmobs/2.0 + + vlow = 1.0 + vupp = 3.0 + dv = 0.1 + vbins = np.arange(vlow, vupp, dv) + xv_rm = vbins + dv/2.0 + + fields_icl = {'galaxies': ('mstars_disk', 'mstars_bulge', 'rstar_disk', 'rstar_bulge', 'type', + 'mstellar_halo', 'cnfw_subhalo', 'vvir_hosthalo', 'mvir_hosthalo')} + + # Loop over redshift and subvolumes + rcomb = np.zeros(shape = (len(self.z), 3, len(xmf_rm))) + rcomb_icl = np.zeros(shape = (len(self.z), 3, len(xmf_rm))) + bs_error = np.zeros(shape = (len(self.z), len(xmf_rm))) + + for index, z in enumerate(self.z): + hdf5_data = common.read_data(modeldir, self.redshift_table[z], fields_icl, subvols) + # constrain to sizes without icl component (rcomb) + sizes_with_icl.prepare_data(hdf5_data, index, rcomb, rcomb_icl, bs_error) + # change rcomb to rcomb_icl below to constrain to sizes+icl component (10*r50) + return h0, hist_smf, hist_HImf, hist_smf_err, hist_HImf_err, redshifts, sfr, xmf_rm, rcomb, bs_error def load_observation(self, *args, **kwargs): obsdir = os.path.normpath(os.path.abspath(os.path.join(__file__, '..', '..', 'data'))) @@ -129,9 +194,9 @@ def _get_raw_data(self, modeldir, subvols): """Gets the model and observational data for further analysis. The model data is interpolated to match the observation's X values.""" - h0, hist_smf, hist_HImf, hist_smf_err, hist_HImf_err = self._load_model_data(modeldir, subvols) + h0, hist_smf, hist_HImf, hist_smf_err, hist_HImf_err, redshifts, sfr, xmf_rm, rcomb, bs_error = self._load_model_data(modeldir, subvols) x_obs, y_obs, y_dn, y_up = self.get_obs_x_y_err(h0) - x_mod, y_mod, y_mod_err = self.get_model_x_y(hist_smf, hist_smf_err, hist_HImf, hist_HImf_err) + x_mod, y_mod, y_mod_err = self.get_model_x_y(h0, hist_smf, hist_smf_err, hist_HImf, hist_HImf_err, redshifts, sfr, xmf_rm, rcomb, bs_error) return x_obs, y_obs, y_dn, y_up, x_mod, y_mod, y_mod_err def get_data(self, modeldir, subvols, plot_outputdir=None): @@ -231,7 +296,7 @@ def get_obs_x_y_err(self, h0): return x_obs, y_obs, y_dn, y_up - def get_model_x_y(self, _, __, hist_HImf, hist_HImf_err): + def get_model_x_y(self, _, __, ___, hist_HImf, hist_HImf_err, ____, _____, ______, _______, ________): y = hist_HImf[0] yerr = hist_HImf_err[0] ind = np.where(y < 0.) @@ -242,34 +307,56 @@ class SMF(Constraint): domain = (8, 13) - def get_model_x_y(self, hist_smf, hist_smf_err, _, __): + def get_model_x_y(self, _, hist_smf, hist_smf_err, __, ___, ____, _____, ______, _______, ________): y = hist_smf[0,:] yerr = hist_smf_err[0,:] ind = np.where(y < 0.) return xmf[ind], y[ind], yerr[ind] class SMF_z0(SMF): - """The SMF constraint at z=0""" + """The Bernardi SMF constraint at z=0""" z = [0] - def get_obs_x_y_err(self, _): + def get_obs_x_y_err(self, h0): - hobs = 0.7 - h0 = 0.6751 lm, p, dpdn, dpup = self.load_observation('mf/SMF/SMF_Bernardi2013_SerExp.data', cols=[0,1,2,3]) + hobs = 0.7 + + x_obs = lm + 2.0 * np.log10(hobs/h0) indx = np.where(p > 0) - x_obs = lm[indx] + 2.0 * np.log10(hobs/h0) + + x_obs = x_obs[indx] y_obs = np.log10(p[indx]) - 3.0 * np.log10(hobs/h0) - ytemp = p[indx] - dpdn[indx] - temp = np.less(ytemp, 0) + y_dn = y_obs - np.log10(p[indx] - dpdn[indx]) + y_up = np.log10(p[indx]+dpup[indx]) - y_obs + + return x_obs, y_obs, y_dn, y_up - # fixing a problem where there were undefined values due to log of - # negative values; negative values were given a minimum of 0.0001 - fixed = 0.0001 * temp + ytemp * np.invert(temp) +class SMF_z0p5(SMF): + """The SMF constraint at z=0.5""" - y_dn = y_obs - np.log10(fixed) - y_up = np.log10(p[indx]+dpup[indx]) - y_obs + z = [0.5] + + def get_obs_x_y_err(self, h0): + + # Wright et al. (2018, several reshifts). Assumes Chabrier IMF. + zD17, lmD17, pD17, dp_dn_D17, dp_up_D17, dp_cv = self.load_observation('mf/SMF/Wright18_CombinedSMF.dat', cols=[0,1,2,3,4,5]) + hobs = 0.7 + binobs = 0.25 + pD17 = pD17 + 2.0 * np.log10(hobs/h0) - np.log10(binobs) + lmD17 = lmD17 - 3.0 * np.log10(hobs/h0) - np.log10(binobs) + in_redshift = np.where(zD17 == 0.5) + + x_obs = lmD17[in_redshift] + y_obs = pD17[in_redshift] + y_dn = dp_dn_D17[in_redshift] + y_up = dp_up_D17[in_redshift] + cv = np.log10(1 + dp_cv[in_redshift]) + + # combine cosmic variance and model variance in quadrature + y_dn = np.sqrt(y_dn**2 + cv**2) + y_up = np.sqrt(y_up**2 + cv**2) return x_obs, y_obs, y_dn, y_up @@ -278,21 +365,88 @@ class SMF_z1(SMF): z = [1] - def get_obs_x_y_err(self, _): + def get_obs_x_y_err(self, h0): # Wright et al. (2018, several reshifts). Assumes Chabrier IMF. - zD17, lmD17, pD17, dp_dn_D17, dp_up_D17 = self.load_observation('mf/SMF/Wright18_CombinedSMF.dat', cols=[0,1,2,3,4]) + zD17, lmD17, pD17, dp_dn_D17, dp_up_D17, dp_cv = self.load_observation('mf/SMF/Wright18_CombinedSMF.dat', cols=[0,1,2,3,4,5]) hobs = 0.7 - pD17 = pD17 - 3.0 * np.log10(hobs) - lmD17 = lmD17 - np.log10(hobs) + binobs = 0.25 + pD17 = pD17 + 2.0 * np.log10(hobs/h0) - np.log10(binobs) + lmD17 = lmD17 - 3.0 * np.log10(hobs/h0) - np.log10(binobs) in_redshift = np.where(zD17 == 1) x_obs = lmD17[in_redshift] y_obs = pD17[in_redshift] y_dn = dp_dn_D17[in_redshift] y_up = dp_up_D17[in_redshift] + cv = np.log10(1 + dp_cv[in_redshift]) + + # combine cosmic variance and model variance in quadrature + y_dn = np.sqrt(y_dn**2 + cv**2) + y_up = np.sqrt(y_up**2 + cv**2) + + # take first set of values + ind = np.arange(0,12) + x_obs = x_obs[ind] + y_obs = y_obs[ind] + y_dn = y_dn[ind] + y_up = y_up[ind] + + return x_obs, y_obs, y_dn, y_up + + +class CSFR(Constraint): + """The Cosmic Star Formation Rate constraint""" + + domain = (0, 5) + z = [0] + + def get_obs_x_y_err(self, h0): + #Driver (Chabrier IMF), ['Baldry+2012, z<0.06'] + redD17d, redD17u, sfrD17, err1, err2, err3, err4 = self.load_observation('Global/Driver18_sfr.dat', [0,1,2,3,4,5,6]) + + hobs = 0.7 + xobsD17 = (redD17d+redD17u)/2.0 + yobsD17 = sfrD17 + np.log10(hobs/h0) + errD17 = yobsD17*0. - 999. + errD17 = np.sqrt(pow(err1,2.0)+pow(err2,2.0)+pow(err3,2.0)+pow(err4,2.0)) + y_dn, y_up = errD17, errD17 # symmetric error + x_obs = xobsD17 + y_obs = yobsD17 + + return x_obs, y_obs, y_dn, y_up + + def get_model_x_y(self, h0,_, __, ___, ____, redshifts, sfr, _____, ______, _______): + #note that only h^2 is needed because the volume provides h^3, and the SFR h^-1. + ind = np.where(sfr > 0) + y = np.log10(sfr[ind]*pow(h0,2.0)) + xz = redshifts[ind] + + # y error - zero for now to avoid breaking things + yerr = y*0.0 + + return xz, y, yerr + +class RM(Constraint): + """The combined size-mass relation""" + domain = (7,12) + z = [0] + + def get_obs_x_y_err(self, h0): + # use the semi-major axis sizes + x_obs, y_obs, count, y_err = self.load_observation('SizeMass/GAMA_H-band_dlogM_0.25_reff.txt', [0,1,2,3]) + y_dn = y_err + y_up = y_err return x_obs, y_obs, y_dn, y_up + def get_model_x_y(self, _, __, ___, ____, _____, ______, _______, xmf_rm, rcomb,bs_error): + + ind = np.where(rcomb[0,0,:] != 0) + x_mod = xmf_rm[ind] + y_mod = rcomb[0,0,ind][0] + y_err = bs_error[0][ind] + + return x_mod, y_mod, y_err def _evaluate(constraint, stat_test, modeldir, subvols, plot_outputdir): try: @@ -310,6 +464,33 @@ def evaluate(constraints, stat_test, modeldir, subvols, plot_outputdir=None): return [_evaluate(c, stat_test, modeldir, subvols, plot_outputdir) for c in constraints] +def _get_y_mod(constraint, modeldir, subvols, plot_outputdir): + try: + y_obs, y_mod, err = constraint.get_data(modeldir, subvols, + plot_outputdir=plot_outputdir) + return y_mod + except: + logger.exception('Error') + return [1e20] + +def get_y_mod(constraints, modeldir, subvols, plot_outputdir=None): + return[_get_y_mod(c, modeldir, subvols, plot_outputdir) + for c in constraints] + + +def _get_y_err(constraint, modeldir, subvols, plot_outputdir): + try: + y_obs, y_mod, err = constraint.get_data(modeldir, subvols, + plot_outputdir=plot_outputdir) + return err + except: + logger.exception('Error') + return [1e20] + +def get_y_err(constraints, modeldir, subvols, plot_outputdir=None): + return[_get_y_err(c, modeldir, subvols, plot_outputdir) + for c in constraints] + def log_results(constraints, results): """Emits a log message showing the function evaluation for `constraints`""" @@ -344,7 +525,10 @@ def parse(spec): _constraints = { 'HIMF': HIMF, 'SMF_z0': SMF_z0, + 'SMF_z0p5': SMF_z0p5, 'SMF_z1': SMF_z1, + 'CSFR': CSFR, + 'RM': RM } def _parse(s): diff --git a/optim/execution.py b/optim/execution.py index bb65b568..3786eeae 100644 --- a/optim/execution.py +++ b/optim/execution.py @@ -125,6 +125,8 @@ def run_shark_hpc(particles, *args): # Submit the execution of multiple shark instances, one for each particle job_name = 'PSOSMF_%d' % count shark_output_base = os.path.join(opts.outdir, job_name) + os.makedirs(shark_output_base) + np.save(os.path.join(shark_output_base, 'particles.npy'), particles) cmdline = ['./shark-submit', '-S', opts.shark_binary, '-w', opts.walltime, '-n', job_name, '-O', shark_output_base, '-E', positions_fname, '-V', ' '.join(map(str, subvols))] @@ -159,15 +161,26 @@ def run_shark_hpc(particles, *args): ss = len(particles) results = np.zeros([ss, len(opts.constraints)]) + + # create arrays to save each constraint evaluation + ymodarr = [] + yerrarr = [] for i in range(ss): _, simu, model, _ = common.read_configuration(opts.config) particle_outdir = os.path.join(shark_output_base, str(i)) modeldir = common.get_shark_output_dir(particle_outdir, simu, model) results[i] = constraints.evaluate(opts.constraints, statTest, modeldir, subvols) + + ymodarr.append(constraints.get_y_mod(opts.constraints, modeldir, subvols)) + yerrarr.append(constraints.get_y_err(opts.constraints, modeldir, subvols)) + if not opts.keep: shutil.rmtree(particle_outdir, ignore_errors=True) - + constraints.log_results(opts.constraints, results) + np.save(os.path.join(shark_output_base, 'modelvals.npy'), ymodarr) + np.save(os.path.join(shark_output_base, 'modelerrorvals.npy'), yerrarr) + results = np.sum(results, axis=1) logger.info('Particles %r evaluated to %r', particles, results) @@ -200,6 +213,7 @@ def run_shark(particle, *args): constraints.log_results(constraints, [results]) total = sum(results) logger.info('Particle %r evaluated to %f', particle, total) + logger.info('test statement') if not opts.keep: shutil.rmtree(shark_output_base, ignore_errors=True) diff --git a/standard_plots/sizes.py b/standard_plots/sizes.py index 212e3e77..869e10fc 100644 --- a/standard_plots/sizes.py +++ b/standard_plots/sizes.py @@ -22,6 +22,7 @@ import numpy as np +import os import common import utilities_statistics as us @@ -53,7 +54,7 @@ def prepare_data(hdf5_data, index, rcomb, disk_size, bulge_size, bulge_size_mergers, bulge_size_diskins, BH, disk_size_sat, disk_size_cen, BT_fractions, BT_fractions_nodiskins, bulge_vel, - disk_vel, BT_fractions_centrals, BT_fractions_satellites, baryonic_TF, BHSM): + disk_vel, BT_fractions_centrals, BT_fractions_satellites, baryonic_TF, BHSM, xmf, xv, bs_error): (h0, _, mdisk, mbulge, mburst_mergers, mburst_diskins, mstars_bulge_mergers_assembly, mstars_bulge_diskins_assembly, mBH, rdisk, rbulge, typeg, specific_angular_momentum_disk_star, specific_angular_momentum_bulge_star, @@ -84,6 +85,10 @@ def prepare_data(hdf5_data, index, rcomb, disk_size, bulge_size, bulge_size_merg ind = np.where(mdisk+mbulge > 0) rcomb[index,:] = bin_it(x=np.log10(mdisk[ind]+mbulge[ind]) - np.log10(float(h0)), y=np.log10((mdisk[ind]*rdisk[ind] + mbulge[ind]*rbulge[ind])*MpcToKpc / (mdisk[ind]+mbulge[ind]))- np.log10(float(h0))) + + bs_error[index] = us.bootstrap_error(x=np.log10(mdisk[ind]+mbulge[ind]) - np.log10(float(h0)), + y=np.log10((mdisk[ind]*rdisk[ind] + mbulge[ind]*rbulge[ind])*MpcToKpc / (mdisk[ind]+mbulge[ind])) - np.log10(float(h0)), xbins=xmf) + BT_fractions[index] = us.fractional_contribution(x=np.log10(mdisk[ind]+mbulge[ind]) - np.log10(float(h0)),y=mbulge[ind]/(mdisk[ind]+mbulge[ind]), xbins=xmf) BT_fractions_nodiskins[index] = us.fractional_contribution(x=np.log10(mdisk[ind]+mbulge[ind]) - np.log10(float(h0)), @@ -336,14 +341,16 @@ def plot_velocities(plt, outdir, disk_vel, bulge_vel, baryonic_TF): common.savefig(outdir, fig, 'baryon-TF.pdf') -def plot_sizes_combined(plt, outdir, rcomb): +def plot_sizes_combined(plt, outdir, obsdir, rcomb): + + lm, lr, count, bs_err = common.load_observation(obsdir, 'SizeMass/GAMA_H-band_dlogM_0.25_reff.txt', [0,1,2,3]) fig = plt.figure(figsize=(5,4.5)) # Total ################################## xtit="$\\rm log_{10} (\\rm M_{\\rm stars, total}/M_{\odot})$" - ytit="$\\rm log_{10} (\\rm r_{\\rm 50, comb}/kpc)$" - xmin, xmax, ymin, ymax = 8, 12, -0.5, 2 + ytit="$\\rm log_{10} (\\rm med(r_{50})/kpc)$" + xmin, xmax, ymin, ymax = 8, 11.5, -0.1, 1 ax = fig.add_subplot(111) plt.subplots_adjust(bottom=0.15, left=0.15) @@ -356,7 +363,14 @@ def plot_sizes_combined(plt, outdir, rcomb): yplot = rcomb[0,0,ind] errdn = rcomb[0,1,ind] errup = rcomb[0,2,ind] - ax.errorbar(xplot,yplot[0],yerr=[errdn[0],errup[0]], ls='None', mfc='None', ecolor = 'k', mec='k',marker='o',label="Shark disk+bulge combined") + #np.save(os.path.join(outdir,'sizemass.npy'), np.array([xplot, yplot[0]])) + ax.plot(xplot,yplot[0], color = '#2A9D8F', + linewidth=2,label="Shark galaxies") + + # Add GAMA H-band observations with bootstrapped error + ax.errorbar(lm, lr,yerr = [bs_err, bs_err], marker ='v', + ls = 'none', mfc = 'None', markersize=5, + color = 'gray', label = 'Lange+2015') common.prepare_legend(ax, ['k','k','k'], loc=2) common.savefig(outdir, fig, 'sizes_combined.pdf') @@ -549,16 +563,18 @@ def main(modeldir, outdir, redshift_table, subvols, obsdir): disk_vel = np.zeros(shape = (len(zlist), 3, len(xmf))) bulge_vel = np.zeros(shape = (len(zlist), 3, len(xmf))) baryonic_TF = np.zeros(shape = (len(zlist), 3, len(xv))) - + + bs_error = np.zeros(shape = (len(zlist), len(xmf))) + for index, snapshot in enumerate(redshift_table[zlist]): hdf5_data = common.read_data(modeldir, snapshot, fields, subvols) prepare_data(hdf5_data, index, rcomb, disk_size, bulge_size, bulge_size_mergers, bulge_size_diskins, BH, disk_size_sat, disk_size_cen, BT_fractions, BT_fractions_nodiskins, bulge_vel, disk_vel, - BT_fractions_centrals, BT_fractions_satellites, baryonic_TF, BHSM) + BT_fractions_centrals, BT_fractions_satellites, baryonic_TF, BHSM, xmf, xv, bs_error) plot_sizes(plt, outdir, obsdir, disk_size_cen, disk_size_sat, bulge_size, bulge_size_mergers, bulge_size_diskins) plot_velocities(plt, outdir, disk_vel, bulge_vel, baryonic_TF) - plot_sizes_combined(plt, outdir, rcomb) + plot_sizes_combined(plt, outdir, obsdir, rcomb) plot_bulge_BH(plt, outdir, obsdir, BH, BHSM) plot_bt_fractions(plt, outdir, obsdir, BT_fractions, BT_fractions_nodiskins, BT_fractions_centrals, BT_fractions_satellites) diff --git a/standard_plots/sizes_with_icl.py b/standard_plots/sizes_with_icl.py index 3120243f..a08ff7cf 100644 --- a/standard_plots/sizes_with_icl.py +++ b/standard_plots/sizes_with_icl.py @@ -62,7 +62,7 @@ use_r50_aperture = True r50_aperture = 10.0 -def prepare_data(hdf5_data, index, rcomb, rcomb_icl): +def prepare_data(hdf5_data, index, rcomb, rcomb_icl, bs_error): (h0, _, mdisk, mbulge, rdisk, rbulge, typeg, mstellar_halo, cnfw, vvir, mvir) = hdf5_data @@ -86,7 +86,6 @@ def correct_h(x,h0): rcomb[index,:] = bin_it(x=np.log10(mstars_tot[ind]), y=np.log10(rcombined[ind]*MpcToKpc)) - #model inclusion of ICL in sizes rnew = np.zeros(shape = len(rcombined)) def enclosed_mass_icl(x, rho_icl, c, rvir): @@ -112,7 +111,7 @@ def enclosed_mass_icl(x, rho_icl, c, rvir): for i in range(0, len(rho_icl)): micl_apperture[i] = enclosed_mass_icl(x[i], rho_icl[i], cnfw_in[i], rvir_in[i]) micl_apperture_50 = micl_apperture * 0.5 - + #use a linear interpolation to find r50, between log10(mass) and r/rvir. def find_r50_icl(xrf, yrf, mass): find_nearest = np.argsort(abs(yrf-mass)) @@ -122,29 +121,33 @@ def find_r50_icl(xrf, yrf, mass): #compute r50_icl for each galaxy r50_icl = np.zeros(shape = len(rho_icl)) + for i in range(0, len(rho_icl)): r50_icl[i] = find_r50_icl(xrf, np.log10(enclosed_mass_icl(xrf, rho_icl[i], cnfw_in[i], rvir_in[i])), np.log10(micl_apperture_50[i])) - + + #compute a new size doing a stellar mass weighted size rnew[ind] = (rcombined[ind] * mstars_tot[ind] + r50_icl * micl_apperture) / (mstars_tot[ind] + micl_apperture) - + #for galaxies that have not been assigned an rnew, we use rcombined (those include satellites and centrals without stellar halos) - ind = np.where(rnew == 0) + ind = np.where(rnew == 0) rnew[ind] = rcombined[ind] - + #compute the size-mass relation now including the icl. ind = np.where(mdisk+mbulge > 0) rcomb_icl[index,:] = bin_it(x=np.log10(mstars_tot[ind]), y=np.log10(rnew[ind]*MpcToKpc)) + # compute bootstrapped error on updated median sizes + bs_error[index] = us.bootstrap_error(x=np.log10(mstars_tot[ind]), + y=np.log10(rnew[ind]*MpcToKpc), xbins=xmf) + - -def plot_sizes_combined(plt, outdir, rcomb, rcomb_icl): - +def plot_sizes_combined(plt, outdir, rcomb, rcomb_icl, bs_error, obsdir): fig = plt.figure(figsize=(5,4.5)) - + # Total ################################## xtit="$\\rm log_{10} (\\rm M_{\\rm stars, total}/M_{\odot})$" - ytit="$\\rm log_{10} (\\rm r_{\\rm 50, comb}/kpc)$" + ytit="$\\rm log_{10} (\\rm r_{\\rm eff, comb}/kpc)$" xmin, xmax, ymin, ymax = 8, 12, -0.5, 2 ax = fig.add_subplot(111) @@ -155,20 +158,29 @@ def plot_sizes_combined(plt, outdir, rcomb, rcomb_icl): #Predicted size-mass for disks ind = np.where(rcomb[0,0,:] != 0) xplot = xmf[ind] - yplot = rcomb[0,0,ind] + yplot = rcomb[0,0,ind] # z=0 and median only errdn = rcomb[0,1,ind] errup = rcomb[0,2,ind] - ax.errorbar(xplot,yplot[0],yerr=[errdn[0],errup[0]], ls='None', mfc='None', ecolor = 'k', mec='k',marker='o',label="Shark galaxies") + #ax.errorbar(xplot,yplot[0],yerr=bs_error[:,0,ind][0], ls='None', mfc='None', ecolor = 'k', mec='k',marker='o',label="Shark galaxies") + ax.plot(xplot, yplot[0], ls='None', mfc='None', mec='k',marker='o',label="Shark galaxies") ind = np.where(rcomb_icl[0,0,:] != 0) xplot = xmf[ind] - yplot = rcomb_icl[0,0,ind] - errdn = rcomb_icl[0,1,ind] - errup = rcomb_icl[0,2,ind] - ax.errorbar(xplot,yplot[0],yerr=[errdn[0],errup[0]], ls='None', mfc='None', ecolor = 'r', mec='r',marker='s',label="Shark galaxies+icl") - + yplot = rcomb_icl[0,0,ind] # z=0 and median only + #errdn = rcomb_icl[0,1,ind] + #errup = rcomb_icl[0,2,ind] + ax.errorbar(xplot,yplot[0],yerr=bs_error[0,ind], ls='None', mfc='None', ecolor = 'r', mec='r',marker='s',label="Shark galaxies+icl") + + # load semi-major sizes + obs = common.load_observation(obsdir,'SizeMass/GAMA_H-band_dlogM_0.25_reff.txt', [0,1,2,3]) + xobs = obs[0] + yobs = obs[1] + errobs = obs[3] + ax.plot(xobs, yobs, color = 'teal', label = 'GAMA H-band') + ax.fill_between(xobs, yobs-errobs, yobs+errobs, color = 'teal', alpha=0.4) + common.prepare_legend(ax, ['k','k','k'], loc=2) - common.savefig(outdir, fig, 'sizes_combined.pdf') + common.savefig(outdir, fig, 'sizes_combined_ICL.pdf') def main(modeldir, outdir, redshift_table, subvols, obsdir): @@ -178,12 +190,12 @@ def main(modeldir, outdir, redshift_table, subvols, obsdir): # Loop over redshift and subvolumes rcomb = np.zeros(shape = (len(zlist), 3, len(xmf))) rcomb_icl = np.zeros(shape = (len(zlist), 3, len(xmf))) - + bs_error = np.zeros(shape = (len(zlist), len(xmf))) + for index, snapshot in enumerate(redshift_table[zlist]): hdf5_data = common.read_data(modeldir, snapshot, fields, subvols) - prepare_data(hdf5_data, index, rcomb, rcomb_icl) - - plot_sizes_combined(plt, outdir, rcomb, rcomb_icl) - + prepare_data(hdf5_data, index, rcomb, rcomb_icl, bs_error) + + plot_sizes_combined(plt, outdir, rcomb, rcomb_icl, bs_error, obsdir) if __name__ == '__main__': main(*common.parse_args()) diff --git a/standard_plots/utilities_statistics.py b/standard_plots/utilities_statistics.py index 36cae355..95462db4 100644 --- a/standard_plots/utilities_statistics.py +++ b/standard_plots/utilities_statistics.py @@ -276,3 +276,32 @@ def redshift(lbt, h=0.6751, omegam=0.3121, omegal=0.6879): z[i] = round(z[i], 2) return z + + +def bootstrap_error(x=None, y=None, xbins = None, iterations=50): + + nbins = len(xbins) + len_subsample = 100 # same as used in observational data + + # initialise array, one row per mass bin + medians = np.zeros(shape = [nbins,iterations]) + + #define size of bins, assuming bins are all equally spaced. + dx = xbins[1] - xbins[0] + + for i in range (0,nbins): + xlow = xbins[i]-dx/2.0 + xup = xbins[i]+dx/2.0 + ind = np.where((x > xlow) & (x< xup)) + #if(len(x[ind]) > 9): + # ybin = y[ind] + ybin = y[ind] + if len(ybin) < 2: + ybin = [0,0] # sample function behaves weirdly when len(ybin) =1, allocate sd = 0 for low number cases + for j in range(iterations): + # calculate median size 30 times + subsample = np.random.choice(ybin, size=len_subsample) + medians[i,j] = np.median(subsample) + + # return stddev of sample medians for each mass bin + return np.std(medians, axis=1)