halomod / hmf

Python halo mass function calculator
Other
69 stars 34 forks source link

[Question] Mass Conversion #72

Open steven-murray opened 4 years ago

steven-murray commented 4 years ago

I am a bit unsure of what the best way to do mass conversion is. I can think of two ways: the first (as is currently implemented) is to take the user's input masses in whatever they define the definition to be, calculate the HMF at those masses defined at whatever definition the fitting function uses and then convert the mass function by multiplying by dm_old/dm_new.

The second way would be to change the input masses themselves on input to the new definition, then just calculate the mass function there. This has the undesirable effect of needing to change the whole mass array every time a new definition is chosen, and might make some comparisons harder.

I guess each way should give the same result, right? That might make for an interesting test...

steven-murray commented 4 years ago

Wondering if https://arxiv.org/pdf/1401.7334.pdf will be of help

steven-murray commented 4 years ago

Calling in @benediktdiemer on this issue. Overall, I'm leaning towards not having mass conversion for the purposes of the mass function. But it would be good to get to a strategy for figuring out if it's feasible.

benediktdiemer commented 4 years ago

There is a good reason to expect that a mass conversion won't work: scatter. Any conversion is gonna suffer huge scatter due to random density profiles. For the mass function, this will cause Eddington bias, which should increase the mass function at high masses.

But I think it would be easy to test: take a Tinker+08 MF for one definition, convert it, see if it matches another definition.

steven-murray commented 4 years ago

Thanks @benediktdiemer, yes that makes sense, and I think that's a reasonable test.

I'm trying to figure out the "least surprising" behaviour here for the user. Given the inherent uncertainties in converting between mass definitions for the mass function (modulo the test you propose), it may be best to by default assume that the mass definition is the same as whatever mass function is chosen by the user (though this gets tricky in halomod when a concentration-mass relation is also chosen with a particular mass definition, and may be different from the mass function's definition in which it was measured -- then which do we pick!?).

If the user explicitly sets a mass definition which is not the definition used to measure the chosen hmf, we could then just raise an error, or give a warning. The Tinker08 fit at different overdensities indicates that the mass function can change by up to ~50% for a 400m overdensity compared to the 200m (at high mass), which to me would indicate that an error should be raised. However, this would mean that to use most of the hmf's would require using the FOF-definition, which doesn't have the best support over the halo model. In particular, the ST mass function is often used with the halo model, but is FOF.

I guess I'm trying to get at what would be a not-too-restrictive, unsurprising, but still accurate way to deal with these inputs consistently. Will have to think more...

benediktdiemer commented 4 years ago

400m is by no means the highest possible, 200c would be ~600m, so the differences can be quite large...