Example #1
0
Config.optionxform = str
Config.read(iniFile)

cosmologyName = 'params'  # from ini file
cosmoDict = dictFromSection(Config, cosmologyName)
constDict = dictFromSection(Config, 'constants')

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)
Example #2
0
sigGals = []
sigCMBs = []

pl = Plotter(scaleY='log')

for i, z in enumerate(zrange):
    #if z<2.5: continue

    zlens = z
    lc.addStepNz("gal" + str(i),
                 zlens,
                 zmax,
                 bias=None,
                 magbias=None,
                 numzIntegral=300)
    R500 = cc.rdel_c(M500, zlens, delta)

    win = lc.kernels["gal" + str(i)]["window_z"](zlens)
    comL = (cc.results.comoving_radial_distance(zlens)) * cc.h
    winsGal.append(win * comL * (1. + zlens) / R500**2.)
    winsCMB.append(lc.kernels["cmb"]["window_z"](zlens) * comL * (1. + zlens) /
                   R500**2.)

    LF.loadSS(ellrange,
              Clss,
              ngal=ngalArcminSquare * fracgals[i],
              shapeNoise=0.3)
    totCl = Clss + LF.Nls['ss'](ellrange)

    pl.add(ellrange,
           totCl,