Exemple #1
0
def plot_dwarfs_civ(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, EW_less_than = get_cos_dwarfs_civ()  #in mA
    EW /= 1000.
    EWerr /= 1000.
    EW, EWerr = convert_to_log(EW, EWerr)

    dist = dist[cos_M > mlim]
    cos_ssfr = cos_ssfr[cos_M > mlim]
    EW = EW[cos_M > mlim]
    EWerr = EWerr[cos_M > mlim]
    EW_less_than = EW_less_than[cos_M > mlim]
    cos_M = cos_M[cos_M > mlim]

    mask = np.invert(EW_less_than) * (cos_ssfr > quench)
    c1 = ax.errorbar(dist[mask],
                     EW[mask],
                     yerr=EWerr[mask],
                     c=cos_colors[0],
                     ls='',
                     marker='x',
                     markersize=6,
                     label='COS-Dwarfs SF')
    mask = np.invert(EW_less_than) * (cos_ssfr < quench)
    c2 = ax.errorbar(dist[mask],
                     EW[mask],
                     yerr=EWerr[mask],
                     c=cos_colors[1],
                     ls='',
                     marker='x',
                     markersize=6,
                     label='COS-Dwarfs Q')
    mask = EW_less_than * (cos_ssfr > quench)
    ax.scatter(dist[mask],
               EW[mask],
               c=cos_colors[0],
               marker='$\downarrow$',
               s=60.)
    mask = EW_less_than * (cos_ssfr < quench)
    ax.scatter(dist[mask],
               EW[mask],
               c=cos_colors[1],
               marker='$\downarrow$',
               s=60.)

    return c1, c2
Exemple #2
0
            cos_dict = cos_dict_orig.copy()
            mass_mask = cos_mmask.copy()

            # removing COS-Dwarfs galaxy 3 for the Lya stuff
            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]