def plot_DGR_Mstar_user(files, z, axs, snapnum, i, on): add = sims[i] Mstar, Mratio, Type, Age = get_vals(files, z, axs, snapnum, i, on) x, y, xx, yy, yy_up, yy_low, den = create_out.out_user( Mstar, Mratio, Type, z) x = np.log10(x) y = np.log10(y) xx = np.log10(xx) yy = np.log10(yy) yy_up = np.log10(yy_up) yy_low = np.log10(yy_low) make_fig.fig_user(axs, z, x, y, xx, yy, yy_up, yy_low, den) xlim = [7.5, 11.5] ylim = [-7, -0.3] xticks = [8, 9, 10, 11] axs.set_xlim(xlim) axs.set_ylim(ylim) axs.set_xticks(xticks) return add
def plot_tacc_Met_user(files, z, axs, snapnum, i, on): add, met, tacc, Type, Age = get_vals(files, z, axs, snapnum, i, on) x, y, xx, yy, yy_up, yy_low, den = create_out.out_user(met, tacc, Type, z) x = 12. + np.log10(x) y = np.log10(y) xx = 12. + np.log10(xx) yy = np.log10(yy) yy_up = np.log10(yy_up) yy_low = np.log10(yy_low) make_fig.fig_user(axs, z, x, y, xx, yy, yy_up, yy_low, den) xlim = [7.5,10.5] ylim = [5,10.5] xticks = [8, 9, 10] yticks = [5, 6, 7, 8, 9, 10] axs.set_xlim(xlim) axs.set_ylim(ylim) axs.set_xticks(xticks) axs.set_yticks(yticks) return add
def plot_tacc_Mstar_user(files, z, axs, snapnum, i, on): add = sims[i] Mstar, tacc, Type, Age, Z = get_vals(files, z, axs, snapnum, i, on) x, y, xx, yy, yy_up, yy_low, den = create_out.out_age( Mstar, tacc, Type, Z, z) x = np.log10(x) y = np.log10(y) xx = np.log10(xx) yy = np.log10(yy) yy_up = np.log10(yy_up) yy_low = np.log10(yy_low) den = np.log10(den) #p = make_fig.fig_age(axs, z, x, y, xx, yy, yy_up, yy_low, den, bins = None) #Colour by metallicity p = make_fig.fig_user(axs, z, x, y, xx, yy, yy_up, yy_low, den) xlim = [7.5, 11.7] ylim = [5, 11.5] xticks = [8, 9, 10, 11] yticks = [5, 6, 7, 8, 9, 10, 11] axs.set_xlim(xlim) axs.set_ylim(ylim) axs.set_xticks(xticks) axs.set_yticks(yticks) return add, p, den
def plot_Mstar_DTM_user(files, z, axs, snapnum, i, on): add = sims[i] Mstar, Mratio, Type, Age, Mcg, Mmet = get_vals(files, z, snapnum, i, on) fracs = np.array([0.7, 0., 0.2, 0., 1., 1., 0., 1., 1.]) bins = 10**(np.arange( np.log10(min(Mstar)) - 0.1, np.log10(max(Mstar)) + 0.1, 0.15)) saturation = np.zeros(len(bins) - 1) for j, k in enumerate(fracs): for l in range(len(bins) - 1): M_ok = np.logical_and(Mstar > bins[l], Mstar <= bins[l + 1]) saturation[l] += np.nanmedian(Mcg[M_ok][:, 2 + j] / Mmet[M_ok]) * k xx_interp = 10**np.linspace(7.5, 11.5, 10) yy_interp = np.interp(xx_interp, (bins[1:] + bins[:-1]) / 2., saturation) axs.plot(np.log10(xx_interp), np.log10(yy_interp), ls='dotted', lw=4, color='crimson') x, y, xx, yy, yy_up, yy_low, den = create_out.out_user( Mstar, Mratio, Type, z) x = np.log10(x) y = np.log10(y) xx = np.log10(xx) yy = np.log10(yy) yy_up = np.log10(yy_up) yy_low = np.log10(yy_low) make_fig.fig_user(axs, z, x, y, xx, yy, yy_up, yy_low, den) xlim = [7.5, 11.5] ylim = [-2.9, 0.] xticks = [8, 9, 10, 11] axs.set_xlim(xlim) axs.set_ylim(ylim) axs.set_xticks(xticks) return add
def plot_O_H_vs_DGR_user(files, z, axs, snapnum, i, on): add, met, Mratio, Type, Age = get_vals(files, z, axs, snapnum, i, on) print (met, Mratio, Type, Age) x, y, xx, yy, yy_up, yy_low, den = create_out.out_user(met, Mratio, Type, z) x = 12 + np.log10(x) y = np.log10(y) xx = 12 + np.log10(xx) yy = np.log10(yy) yy_up = np.log10(yy_up) yy_low = np.log10(yy_low) make_fig.fig_user(axs, z, x, y, xx, yy, yy_up, yy_low, den) xlim = [6.5,10.5] ylim = [-7,-0.1] xticks = [7, 8, 9, 10] axs.set_xlim(xlim) axs.set_ylim(ylim) axs.set_xticks(xticks) return add
def plot_O_H_vs_DTM_user(files, z, axs, snapnum, i, on): add, Mstar, met, Mratio, Type, Age = get_vals(files, z, snapnum, i, on) x, y, xx, yy, yy_up, yy_low, den = create_out.out_user( met, Mratio, Type, z) x = 12. + np.log10(x) y = np.log10(y) xx = 12. + np.log10(xx) yy = np.log10(yy) yy_up = np.log10(yy_up) yy_low = np.log10(yy_low) make_fig.fig_user(axs, z, x, y, xx, yy, yy_up, yy_low, den) xlim = [6.5, 9.8] ylim = [-2.6, 0.15] xticks = [7, 8, 9] axs.set_xlim(xlim) axs.set_ylim(ylim) axs.set_xticks(xticks) return add