def plot_dwarfs_lya(ax, quench, r200_scaled=False): cos_rho, cos_M, cos_r200, cos_ssfr = get_cos_dwarfs() if r200_scaled: cos_rho = cos_rho.astype(float) * h dist = cos_rho / cos_r200 else: dist = cos_rho.copy() EW, EWerr = get_cos_dwarfs_lya() # in mA EW /= 1000. EWerr /= 1000. EW, EWerr = convert_to_log(EW, EWerr) dist = np.delete(dist, 3) cos_ssfr = np.delete(cos_ssfr, 3) cos_M = np.delete(cos_M, 3) EW = np.delete(EW, 3) EWerr = np.delete(EWerr, 3) dist = dist[cos_M > mlim] cos_ssfr = cos_ssfr[cos_M > mlim] EW = EW[cos_M > mlim] EWerr = EWerr[cos_M > mlim] c1 = ax.errorbar(dist[cos_ssfr > quench], EW[cos_ssfr > quench], yerr=EWerr[cos_ssfr > quench], c=cos_colors[0], ls='', marker='x', markersize=6, capsize=4, label='COS-Dwarfs SF') c2 = ax.errorbar(dist[cos_ssfr < quench], EW[cos_ssfr < quench], yerr=EWerr[cos_ssfr < quench], c=cos_colors[1], ls='', marker='x', markersize=6, capsize=4, label='COS-Dwarfs Q') return c1, c2
if (survey == 'dwarfs') & (line == 'H1215'): mass_mask = np.delete(mass_mask, 3) for k in cos_dict.keys(): cos_dict[k] = np.delete(cos_dict[k], 3) for k in cos_dict.keys(): cos_dict[k] = np.delete(cos_dict[k], ignore_cos_gals) # read in COS observations, set units, remove dwarfs galaxy 3 for Lya, do mass mask 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':