WebSky-CITA / XGPaint.jl

fast forward simulations of extragalactic foregrounds
https://websky-cita.github.io/XGPaint.jl/dev/
MIT License
4 stars 3 forks source link

Bug in the definition of Sigma_cen #7

Open giuspugl opened 2 years ago

giuspugl commented 2 years ago

It seems to me that the definition of sigma_cen is missing a square in model.shang_sigmaM https://github.com/xzackli/XGPaint.jl/blob/aee8f41fbf712153b8f9cd8f231fef05ef6ddbf7/src/cib.jl#L103

See eq. 23 of https://arxiv.org/abs/1109.1522 .Could you please confirm that ?

Also in https://github.com/xzackli/XGPaint.jl/blob/aee8f41fbf712153b8f9cd8f231fef05ef6ddbf7/src/cib.jl#L108 it doesn't seem implemented the SED form adopted in eq.24 of https://arxiv.org/abs/1109.1522 . why ?

marcelo-alvarez commented 2 years ago

It seems to me that the definition of sigma_cen is missing a square in model.shang_sigmaM

https://github.com/xzackli/XGPaint.jl/blob/aee8f41fbf712153b8f9cd8f231fef05ef6ddbf7/src/cib.jl#L103

See eq. 23 of https://arxiv.org/abs/1109.1522 .Could you please confirm that ?

Thanks @giuspugl for checking on this. The model.shang_sigmaM is an abuse of notation and actually means sigma_M^2 in the code. The default model used in this code, described in Stein et al. 2020, is sigma_M^2=0.3 along with other parameters taken from Table 5 in https://arxiv.org/pdf/1208.5049.pdf, i.e. "model 2" of Viero et al. 2012.

Note also that there is a typo in Stein et al. 2020 after equation 3.19: "model 1" should be "model 2" instead, since the latter includes an evolving dust temperature with respect to redshift and was what was actually adopted.

There is no bug that I see in the definition of sigma_cen, just confusing notation.

marcelo-alvarez commented 2 years ago

Also in

https://github.com/xzackli/XGPaint.jl/blob/aee8f41fbf712153b8f9cd8f231fef05ef6ddbf7/src/cib.jl#L108

it doesn't seem implemented the SED form adopted in eq.24 of https://arxiv.org/abs/1109.1522 . why ?

The function sigma_cen returns

https://github.com/xzackli/XGPaint.jl/blob/aee8f41fbf712153b8f9cd8f231fef05ef6ddbf7/src/cib.jl#L113

The SED here has a factor of Td^-(4+beta), consistent with Phi(z) (eq. 22 in Shang et al. (2012)) being proportional to the integrated greybody luminosity of a halo at fixed mass. This changes the redshift evolution of the model when the dust temperature evolves with redshift compared to the case where Phi(z) is proportional to the per-frequency luminosity, instead.

Given that Td~(1+z)^0.2, the normalization with an integrated luminosity leads to a shallower rise of the per-frequency luminosity with respect to redshift at fixed halo mass, (1+z)^1.3, instead of (1+z)^2.4. Since the model used by Viero et al. 2012 very likely used per-frequency (without the Td^-(4+beta) that is here), I would be fine with removing this factor to be more consistent with the literature (although I think normalizing so that Phi(z) is proportional to the integrated luminosity at fixed mass makes more sense physically).

it is not clear removing the Td^-(4+beta) would give a better fit to the clustering data for the particular case of the websky catalog (since each simulated catalog has a minimum halo mass and Viero et al. did not explicitly model the satellites, as is done in this code), so it would be best to do some additional validation and adjust the HOD parameters as necessary before releasing a new set of CIB maps.

Thanks @giuspugl for raising this issue.