def plot_halos(ax, line, quench, r200_scaled=False): z = 0.2 cos_rho, cos_M, cos_r200, cos_ssfr = get_cos_halos() if r200_scaled: cos_rho = cos_rho.astype(float) * h * (1 + z) dist = cos_rho / cos_r200 else: dist = cos_rho.copy() EW, EWerr = read_halos_data(line) EW_upper_lim = (EW < 0.) EW, EWerr = convert_to_log(np.abs(EW), EWerr) mask = np.invert(EW_upper_lim) * (cos_ssfr > quench) c1 = ax.errorbar(dist[mask], EW[mask], yerr=EWerr[mask], c=cos_colors[0], ls='', marker='x', markersize=6, capsize=4, label='COS-Halos SF') mask = np.invert(EW_upper_lim) * (cos_ssfr < quench) c2 = ax.errorbar(dist[mask], EW[mask], yerr=EWerr[mask], c=cos_colors[1], ls='', marker='x', markersize=6, capsize=4, label='COS-Halos Q') mask = EW_upper_lim * (cos_ssfr > quench) ax.scatter(dist[mask], EW[mask], c=cos_colors[0], marker='$\downarrow$', s=60.) mask = EW_upper_lim * (cos_ssfr < quench) ax.scatter(dist[mask], EW[mask], c=cos_colors[1], marker='$\downarrow$', s=60.) return c1, c2
if (survey == 'dwarfs') & (line == 'CIV1548'): cos_dict['EW'], cos_dict['EWerr'], cos_dict[ 'EW_less_than'] = get_cos_dwarfs_civ() #in mA cos_dict['EW'] /= 1000. cos_dict['EWerr'] /= 1000. elif (survey == 'dwarfs') & (line == 'H1215'): cos_dict['EW'], cos_dict['EWerr'] = get_cos_dwarfs_lya( ) # in mA cos_dict['EW'] /= 1000. cos_dict['EWerr'] /= 1000. cos_dict['EW'] = np.delete( cos_dict['EW'], 3 ) # delete the measurements from Cos dwarfs galaxy 3 for the Lya stuff cos_dict['EWerr'] = np.delete(cos_dict['EWerr'], 3) elif (survey == 'halos'): cos_dict['EW'], cos_dict['EWerr'] = read_halos_data(line) cos_dict['EW'] = np.abs(cos_dict['EW']) cos_dict['EW'] = cos_dict['EW'][mass_mask] cos_dict['EWerr'] = cos_dict['EWerr'][mass_mask] cos_dict['EW'] = np.delete(cos_dict['EW'], ignore_cos_gals) cos_dict['EWerr'] = np.delete(cos_dict['EWerr'], ignore_cos_gals) if survey == 'halos': ew_mask = cos_dict['EW'] > 0. for k in cos_dict.keys(): cos_dict[k] = cos_dict[k][ew_mask] if (survey == 'dwarfs') & (line == 'H1215'): for k in sim_dict.keys(): sim_dict[k] = np.delete(sim_dict[k], np.arange(3 * norients * ngals_each,