Closed dwhan89 closed 1 year ago
I think the difference is there because we define MassDefVir
in terms of the critical density, which multiplies Delta
in the radius calculation, as seen here.
You may wish to define your own MassDef("vir", "matter")
, which recovers that extra 1/Omega_m
factor:
cosmo = ccl.CosmologyVanillaLCDM()
print(ccl.halos.MassDefVir().get_radius(cosmo, M=1e14, a=1) / cosmo["Omega_m"]**(1/3))
print(ccl.halos.MassDef("vir", "matter").get_radius(cosmo, M=1e14, a=1))
1.2373782561528808
1.2373782561528808
I have a quick question about the mass definition used in the pyccl library.
While calculating the virial radius of halos using the
pyccl.halos.massdef.MassDefVir
object, I found that the overdensity parameter Delta has an extra factor of1/Omega_m
compared to the standard definition (See https://github.com/LSSTDESC/CCL/blob/master/pyccl/halos/massdef.py#L140 and https://github.com/LSSTDESC/CCL/blob/master/src/ccl_massfunc.c#L41.).I checked whether the library uses
rho_m
in the mass definition (i.e such thatDelta/omega_m * rho_m = Delta*rho_crit
), but it doesn't seem like it at a glance (https://github.com/LSSTDESC/CCL/blob/master/pyccl/halos/massdef.py#L282). I'm wondering if you could help me understand why there's a difference and whether I'm missing something simple.