예제 #1
0
    plot_dir = 'plots/'
    h = 0.68
    r200_scaled = True
    norients = 8
    ngals_each = 5

    sim_colors, cos_colors = get_tol_colors()

    # adjust the filename
    plot_name = model + '_' + wind + '_' + background + '_rho_ew'
    if r200_scaled:
        plot_name += '_scaled'
    plot_name += '.png'

    # read in the parameters of the COS galaxies
    cos_halos_dict, _ = make_cos_dict('halos', mlim, r200_scaled)
    cos_dwarfs_dict, _ = make_cos_dict('dwarfs', mlim, r200_scaled)

    sim_halos_dict = read_simulation_sample(model, wind, '137', 'halos',
                                            background, norients, lines,
                                            r200_scaled)
    sim_halos_dict['rho'] = np.repeat(cos_halos_dict['rho'],
                                      norients * ngals_each)

    sim_dwarfs_dict = read_simulation_sample(model, wind, '151', 'dwarfs',
                                             background, norients, lines,
                                             r200_scaled)
    sim_dwarfs_dict['rho'] = np.repeat(cos_dwarfs_dict['rho'],
                                       norients * ngals_each)

    if r200_scaled:
예제 #2
0
    quench = quench_thresh(z)

    # ignore the galaxies that dont have counterparts in the m50n512 boxes
    if ((model == 'm50n512') &
        (survey == 'halos')) or (model == 'm25n512') or (model == 'm25n256'):
        ignore_simba_gals, ngals_each = get_ignore_simba_gals(model, survey)
        ignore_cos_gals, ngals_each = get_ignore_cos_gals(model, survey)
        ignore_los = get_ignore_los(ignore_simba_gals)
    else:
        ignore_simba_gals = []
        ignore_cos_gals = []
        ignore_los = []

    if survey == 'halos':
        cos_dict_orig, cos_mmask = make_cos_dict('halos', mlim, r200_scaled)
    elif survey == 'dwarfs':
        cos_dict_orig, cos_mmask = make_cos_dict('dwarfs', mlim, r200_scaled)

    basic_dir = '/disk01/sapple/cgm/absorption/cos_comparison/absorption_analysis/'
    # rescaled the x axis by r200
    if r200_scaled:
        cos_dict_orig['dist'] = cos_dict_orig['rho'] / cos_dict_orig['r200']
        cos_file = basic_dir + 'data/cos_' + survey + '_obs_path_abs_thresh_data_scaled.h5'
        sim_file = basic_dir + 'data/cos_' + survey + '_' + model + '_' + wind + '_' + snap + '_' + background + '_sim_path_abs_thresh_data_scaled.h5'
    else:
        cos_dict_orig['dist'] = cos_dict_orig['rho'].copy()
        cos_file = basic_dir + 'data/cos_' + survey + '_obs_path_abs_thresh_data.h5'
        sim_file = basic_dir + 'data/cos_' + survey + '_' + model + '_' + wind + '_' + snap + '_' + background + '_sim_path_abs_thresh_data.h5'

    # get the bins for the COS data - these nbins ensure there are roughly ~8 galaxies in each bin