Notebook owner: Yao-Yuan Mao @yymao. Last run: Nov 30, 2018
In this notebook we demostrate how to plot the halo mass-stellar mass relation and also the BH mass-bulge mass relation for the protoDC2/cosmoDC2 galaxy catalog.
GCRCatalogs
to access the protoDC2 or cosmoDC2 catalogs.GCRCatalogs
.import GCRCatalogs
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
gc = GCRCatalogs.load_catalog('cosmoDC2_v1.1.4_small')
# let's see what masses are availble
sorted(c for c in gc.list_all_quantities(True) if 'mass' in c.lower())
['baseDC2/target_halo_mass', 'blackHoleMass', 'diskMassStellar', 'halo_mass', 'hostHaloMass', 'spheroidMassStellar', 'stellar_mass', 'stellar_mass_bulge', 'stellar_mass_disk', 'totalMassStellar']
data = gc.get_quantities(['stellar_mass', 'halo_mass'], filters=['redshift < 0.2', 'is_central'])
cs = plt.hexbin(np.log10(data['halo_mass']), np.log10(data['stellar_mass']), cmap='Blues', bins='log');
plt.colorbar(cs, label='log population');
plt.xlabel(r'$\log \, {\rm M}_h \, / \, {\rm M}_\odot$');
plt.ylabel(r'$\log \, {\rm M}_* \, / \, {\rm M}_\odot$');
plt.title(r'$z < 0.2$');
let's see if the relation changes with redshift
data = gc.get_quantities(['stellar_mass', 'halo_mass'], filters=['redshift > 0.9', 'redshift < 1', 'is_central'])
cs = plt.hexbin(np.log10(data['halo_mass']), np.log10(data['stellar_mass']), cmap='Blues', bins='log');
plt.colorbar(cs, label='log population');
plt.xlabel(r'$\log \, {\rm M}_h \, / \, {\rm M}_\odot$');
plt.ylabel(r'$\log \, {\rm M}_* \, / \, {\rm M}_\odot$');
plt.title(r'$0.9 < z < 1.0$');
data = gc.get_quantities(['stellar_mass_bulge', 'blackHoleMass'], filters=['redshift < 0.2', 'is_central'])
cs = plt.hexbin(np.log10(data['stellar_mass_bulge']), np.log10(data['blackHoleMass']), cmap='Blues', bins='log');
plt.colorbar(cs, label='log population');
plt.xlabel(r'$\log \, {\rm M}_{\rm bulge} \, / \, {\rm M}_\odot$');
plt.ylabel(r'$\log \, {\rm M}_{\rm BH} \, / \, {\rm M}_\odot$');
/global/common/software/lsst/common/miniconda/py3.7-4.7.12.1-v2/envs/desc/lib/python3.7/site-packages/ipykernel/__main__.py:2: RuntimeWarning: divide by zero encountered in log10 from ipykernel import kernelapp as app