New issue 1237: HaloMassFcn units (or coments) inconsistent https://bitbucket.org/yt_analysis/yt/issues/1237/halomassfcn-units-or-coment...
Disclaimer: I'm not particularly experienced in HMFs. The below may not actually be a bug (just confusing/incorrect comments); if it is, I imagine it relates to issue #1228. It should possibly be a comment on that issue, but I can't confirm the two are related.
For reference, I'm going to link to the current stable yt, 3.2.3.
Based on comments in
I do not believe the stated output units are correct.
hubble0**2, resulting in units
rho0 _if the comment at
is to be believed_. But line 402 directly above states
rho0 in units of h^2
This error carries through to line
It is claimed that
dndM_dM_analytic has units of
h^3, but it is
we multiply through by
h^3, resulting units of
n_cumulative_analytic (while it is claimed
h are cancelled out).
has a similar issue, in that
h^2 units are claimed, but
h dependence. The proceeding usage of
rho0 indeed should have units
h^2 to achieve a
thisradius. I think this has a non-trivial impact on
the values in
sigmaarray, but I gave up trying to track it.
The masses do not appear to be affected, but both analytic output arrays seem to have
erroneous factors of
h, and I believe the sigma values are also computed with
R values. Since I gave up trying to track how incorrect
sigma, I don't know if this all agrees with the
behaviour described by @ioodderskov in #1228.
All that said, if I make the obvious change of _not_ multiplying
hubble0**2, the analytic fits do a much worse job of fitting haloes in some
of my Gadget-2 snapshots, whereas before agreement with P-S was very good. But I have no
idea if this is a fluke, and the simulations are faulty, or whether all of the above is a
misunderstanding on my part.
The multiplication by
hubble0**2 was introduced in ab0d4e0.