Esempio n. 1
0
def bin_edges_from_config(Config, section):
    from orphics.tools.stats import npspace

    spacing = Config.get(section, "spacing")
    minim = Config.getfloat(section, "left_edge")
    maxim = Config.getfloat(section, "right_edge")
    num = Config.getint(section, "num_bins")
    return npspace(minim, maxim, num, scale=spacing)
Esempio n. 2
0
cc = ClusterCosmology(cosmoDict,
                      constDict,
                      clTTFixFile="../SZ_filter/data/cltt_lensed_Feb18.txt")

M500 = 5.e14
c500 = 1.18
z = 0.5
delta = 500
R500 = cc.rdel_c(M500, z, delta)
# R500_alt = cc.rdel_c_alt(M500,c500,delta)
# print R500, R500_alt
# sys.exit()
# R500 = R500_alt

Rrange = npspace(0.1, 10. * R500, 100, "log")

rhofunc = halos.rho_nfw(M500, c500, R500)
rhos = rhofunc(Rrange)

pl = Plotter(scaleY='log',
             scaleX='log',
             labelX="$R$ (Mpc/h)",
             labelY="$\\rho (h^2 M_{\\odot}/{\\mathrm{Mpc}^3})$")
pl.add(Rrange, rhos)
pl.done("output/rhos.png")

comL = cc.results.comoving_radial_distance(z) * cc.h
thetaS = R500 / c500 / comL
arcmin = 0.1
arcmax = 50.