Loading src/scripts/examine-stellar-mass-function.py +29 −6 Original line number Diff line number Diff line Loading @@ -10,26 +10,49 @@ import fitsio import matplotlib.pyplot as plt from astro.src import wpd_tools smf1 = fitsio.read("data/egg/share/mass_func_candels.fits") smf2 = fitsio.read("data/egg/share/mass_func_cosmos2020_agn_zou24_loglambda32.fits") smf3 = fitsio.read("data/egg/share/mass_func_cosmos2020.fits") zbin = 0 plt.plot(smf1["MB"][0, 0, :] - 0.24, smf1["ACTIVE"][0, 0, :], color="blue", ls="solid", label="CANDELS") plt.plot(smf1["MB"][0, 0, :] - 0.24, smf1["PASSIVE"][0, 0, :], color="red", ls="solid") # plt.plot(smf1["MB"][0, 0, :] - 0.24, smf1["ACTIVE"][0, 0, :], color="blue", ls="solid") # plt.plot(smf1["MB"][0, 0, :] - 0.24, smf1["PASSIVE"][0, 0, :], color="red", ls="solid") plt.plot( smf1["MB"][0, 0, :] - 0.24, smf1["ACTIVE"][0, 0, :] + smf1["PASSIVE"][0, 0, :], color="black", ls="solid" smf1["MB"][0, 0, :] - 0.24, smf1["ACTIVE"][0, 0, :] + smf1["PASSIVE"][0, 0, :], color="black", ls="solid", label="CANDELS", ) plt.plot(smf2["MB"][0, 0, :], smf2["ACTIVE"][0, 0, :], color="blue", ls="dotted", label="COSMOS2020") plt.plot(smf2["MB"][0, 0, :], smf2["PASSIVE"][0, 0, :], color="red", ls="dotted") plt.plot(smf2["MB"][0, 0, :], smf2["ACTIVE"][0, 0, :] + smf2["PASSIVE"][0, 0, :], color="black", ls="dotted") # plt.plot(smf2["MB"][0, 0, :], smf2["ACTIVE"][0, 0, :], color="blue", ls="dotted") # plt.plot(smf2["MB"][0, 0, :], smf2["PASSIVE"][0, 0, :], color="red", ls="dotted") plt.plot( smf2["MB"][0, 0, :], smf2["ACTIVE"][0, 0, :] + smf2["PASSIVE"][0, 0, :], color="black", ls="dotted", label="COSMOS2020", ) # plt.plot(smf3["MB"][0, 0, :], smf3["ACTIVE"][0, 0, :], color="blue", ls='dashed') # plt.plot(smf3["MB"][0, 0, :], smf3["PASSIVE"][0, 0, :], color="red", ls='dashed') d = wpd_tools.read_datasets("opt/astro/peng2010/fig12/wpd_datasets.csv") plt.plot( *d["black-line-left-panel"].T, lw=2.5, label="Peng+2010", color="violet", ) # plt.plot(*d["black-line-right-panel"].T, lw=2.5, label="Peng+2010", color='orange') plt.semilogy() plt.xlim(9.5, 12.5) plt.ylim(1e-6, 1e1) plt.legend() plt.xlabel(r"$\log M_\mathrm{star} / M_\odot$") plt.ylabel(r"$\Phi / \mathrm{Mpc}^{-3}\,\mathrm{dex}^{-1}$") plt.show() Loading
src/scripts/examine-stellar-mass-function.py +29 −6 Original line number Diff line number Diff line Loading @@ -10,26 +10,49 @@ import fitsio import matplotlib.pyplot as plt from astro.src import wpd_tools smf1 = fitsio.read("data/egg/share/mass_func_candels.fits") smf2 = fitsio.read("data/egg/share/mass_func_cosmos2020_agn_zou24_loglambda32.fits") smf3 = fitsio.read("data/egg/share/mass_func_cosmos2020.fits") zbin = 0 plt.plot(smf1["MB"][0, 0, :] - 0.24, smf1["ACTIVE"][0, 0, :], color="blue", ls="solid", label="CANDELS") plt.plot(smf1["MB"][0, 0, :] - 0.24, smf1["PASSIVE"][0, 0, :], color="red", ls="solid") # plt.plot(smf1["MB"][0, 0, :] - 0.24, smf1["ACTIVE"][0, 0, :], color="blue", ls="solid") # plt.plot(smf1["MB"][0, 0, :] - 0.24, smf1["PASSIVE"][0, 0, :], color="red", ls="solid") plt.plot( smf1["MB"][0, 0, :] - 0.24, smf1["ACTIVE"][0, 0, :] + smf1["PASSIVE"][0, 0, :], color="black", ls="solid" smf1["MB"][0, 0, :] - 0.24, smf1["ACTIVE"][0, 0, :] + smf1["PASSIVE"][0, 0, :], color="black", ls="solid", label="CANDELS", ) plt.plot(smf2["MB"][0, 0, :], smf2["ACTIVE"][0, 0, :], color="blue", ls="dotted", label="COSMOS2020") plt.plot(smf2["MB"][0, 0, :], smf2["PASSIVE"][0, 0, :], color="red", ls="dotted") plt.plot(smf2["MB"][0, 0, :], smf2["ACTIVE"][0, 0, :] + smf2["PASSIVE"][0, 0, :], color="black", ls="dotted") # plt.plot(smf2["MB"][0, 0, :], smf2["ACTIVE"][0, 0, :], color="blue", ls="dotted") # plt.plot(smf2["MB"][0, 0, :], smf2["PASSIVE"][0, 0, :], color="red", ls="dotted") plt.plot( smf2["MB"][0, 0, :], smf2["ACTIVE"][0, 0, :] + smf2["PASSIVE"][0, 0, :], color="black", ls="dotted", label="COSMOS2020", ) # plt.plot(smf3["MB"][0, 0, :], smf3["ACTIVE"][0, 0, :], color="blue", ls='dashed') # plt.plot(smf3["MB"][0, 0, :], smf3["PASSIVE"][0, 0, :], color="red", ls='dashed') d = wpd_tools.read_datasets("opt/astro/peng2010/fig12/wpd_datasets.csv") plt.plot( *d["black-line-left-panel"].T, lw=2.5, label="Peng+2010", color="violet", ) # plt.plot(*d["black-line-right-panel"].T, lw=2.5, label="Peng+2010", color='orange') plt.semilogy() plt.xlim(9.5, 12.5) plt.ylim(1e-6, 1e1) plt.legend() plt.xlabel(r"$\log M_\mathrm{star} / M_\odot$") plt.ylabel(r"$\Phi / \mathrm{Mpc}^{-3}\,\mathrm{dex}^{-1}$") plt.show()