-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] neutrino mass incorrectly implemented #117
Comments
Thanks for the report and the potential fix! When passing on to CAMB, does
one also need to specify omnuh2 (as well as taking away its contribution to
omch2)?
Otherwise, this seems like a perfectly reasonable fix. What do you think
could be better? Would be very happy with a PR along these lines :-)
…On Fri, Dec 11, 2020 at 7:29 PM Jia Liu ***@***.***> wrote:
Assigned #117 <#117> to
@steven-murray <https://github.com/steven-murray>.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#117 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJWRXSZAHVXNSSRWLTOTQDSULISHANCNFSM4UXSRDDA>
.
|
Hi Steven, I did a bit editing from my original proposal - instead of manually calculate omega_nu, I use the calculation directly from astropy. I fixed the splitting to degenerate since it should be sufficient for any realistic usage.. I submitted a PR. A more complicated fix (any neutrino mass values and splitting) can probably be done with more care, following the description under |
After the first attempt to fix the issue (but fixing the input parameter for camb), my colleague brought to my attention that for neutrinos, the best match of HMF (to simulations) is achieved using P_cb and rho_cb (cb=cdm+baryons) during calculation (though the background cosmology does take into account of massive neutrinos), instead of P_matter and rho_matter (matter = cdm+baryon+neutrinos). See fig. 1 of: https://arxiv.org/abs/1311.1514 Implementation of this is more involved.. I will come back to it later.. |
Describe the bug
Neutrino mass parameter is not properly modeled right now, because astropy takes in m_nu (in unit of eV), but camb uses omnuh2 (no unit).
To Reproduce
Steps to reproduce the behavior:
would show 0, meaning massive and massless neutrinos have identical transfer functions, because m_nu parameter is not passed on to camb
Expected behavior
tr0.transfer_function - tr1.transfer_function
should be differentAdditional context
I have a quick fix by redefining the CDM parameter omch2:
change line 212 in
hmf/density_field/transfer_models.py
from:omch2=(self.cosmo.Om0 - self.cosmo.Ob0) * self.cosmo.h ** 2
to:
omch2=(self.cosmo.Om0 - self.cosmo.Ob0) * self.cosmo.h ** 2 - sum(self.cosmo.m_nu.value)/93.14
But I think there should be a better way to do it.
The text was updated successfully, but these errors were encountered: