Skip to content
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

Confusing labelling of HALOFIT versions with massive neutrinos #88

Open
alexander-mead opened this issue Sep 3, 2020 · 8 comments
Open

Comments

@alexander-mead
Copy link
Contributor

alexander-mead commented Sep 3, 2020

I was looking at the different HALOFIT versions in CAMB and found myself confused. I think others will be confused too. At the moment, the main possible HALOFIT versions (ignoring the Peacock fudge, PKequal, and HMcode) are:

  • Smith et al. (2003)
  • Bird et al. (2012)
  • Takahashi (2012)

If the neutrino mass is zero, then these all map to the versions that can be found in the respective papers, withstanding some very slight differences between the parameter values in the papers, those in CAMB, and those in other published codes. However, if the neutrino mass is non-zero then some extra terms activate, and I feel that the way this happens is quite non intuitive given the labels.

The neutrino mass affects the calculation in two distinct places: The first is in the calculation of beta, which occurs on lines 368 and 388 of https://github.com/cmbant/CAMB/blob/master/fortran/halofit.f90 with line 368 being used if HALOFIT is either Smith or Bird, and line 388 being used if it is Takahashi. The second place the neutrino mass affects the calculation is in the calculation of the quasi-linear and halo terms on lines 414 and 415, which are used by all versions of HALOFIT.

The equation on line 368 is very similar to what is in the Bird et al. (2012) paper, but those on lines 388 and 414/415 do not appear in any paper, but in conversations with Simeon Bird I am told that they are re-fittings of the Bird et al. (2012) model but using Takahashi et al. (2012) as a baseline for the model, rather than Smith et al. (2003). I am certainly not complaining about these unpublished results, and doing this re-fitting seems very sensible given the content of the two papers that came out at very similar times.

My confusion arises because the following happens when I have massive neutrinos:

  • If I select Smith I get beta calculated according to Bird et al. (2012), and then I get the unpublished correction on lines 414/415.
  • If I select Bird I get a gamma modification on line 355/356 (which appears in the Bird et al. 2012 paper), beta calculated according to Bird et al. (2012), and then I get the unpublished correction on lines 414/415.
  • If I select Takahashi I get the unpublished correction on line 388 and then I get the unpublished correction on lines 414/415.

What I expected to happen was that I would get what was written in the papers, so that Smith and Takahashi would have no explicit massive-neutrino dependence and Bird would have exactly what was published in the Bird et al. (2012) paper. My feeling is that it would be better to have what was written in the papers, rather than the confusing mix situation described in the above bullet points. As it stands there is no way to get the published Smith et al., Bird et al. or Takahashi et al. results out of the CAMB implementation of HALOFIT when you have massive neutrinos.

I would then suggest adding a new HALOFIT version (called Bird_Takahashi maybe?) which would be the default, which would contain the unpublished version of the Bird et al. (2012) model with Takahashi et al. (2012) used as the baseline. Does that make sense?

@cmbant
Copy link
Owner

cmbant commented Sep 7, 2020

You don't want to make your new HMcode the default?

@alexander-mead
Copy link
Contributor Author

Ah, well, that might be better for me. But I think I'd rather wait for the paper to be reviewed before recommending you changed the default model.

@cmbant
Copy link
Owner

cmbant commented Dec 11, 2020

Happy to add more refined/less ambiguous mnu names, and/or make the new HMcode the default if you want to make a PR.

@alexander-mead
Copy link
Contributor Author

alexander-mead commented Dec 14, 2020

Let me open a separate issue to do with the default non-linear model.

Regarding the HALOFIT versions, would it be helpful if I implemented this in a pull request? I could probably find time to do that this week. I think that it would be useful to involve @sbird in this discussion to make sure that he agrees with what I would like to do.

Summary: Update HALOFIT versions so that there would be Smith, Takahashi, Bird, and Takahashi_Bird where the first three of these would map exactly to the published papers, while Takahashi_Bird would map to what is currently labelled Takahashi in CAMB.

I'm also happy not to do this if you think this is unnecessary/unwise. It is certainly not adversely affecting any of my work at the moment.

@cmbant
Copy link
Owner

cmbant commented Dec 14, 2020

Thanks, good for me, might certainly be useful to clarify it - I'm a bit lost on all the variations. (and no way I can meaningfully test them either) As long as it's backwards compatible/consistent should be fine.

@alexander-mead
Copy link
Contributor Author

Hmm... the changes I was planning to make would not be backwards compatible. I was planning to alter the way that Smith, Bird and Takahashi work for cosmologies with massive neutrinos because I think that the way in which they are currently implemented does not reflect what is written in the respective papers.

Then I was planning to add a new version Takahashi_Bird, which would be identical to the current Takahashi version, which is the unpublished hybrid of the two versions.

@cmbant
Copy link
Owner

cmbant commented Dec 15, 2020

Could add new names with date tags that match the papers or something?

@sbird
Copy link
Contributor

sbird commented Dec 16, 2020

Happy with new names with date tags that match the papers. It's largely moot at this point with M_nu < 0.2 anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants