Skip to content

[BUG] Converting the Behroozi mass function to different mass definitions does not seem to work #263

@puchwein

Description

@puchwein

Describe the bug
Converting the Behroozi mass function to different mass definitions does not seem to work properly.

To Reproduce
Steps to reproduce the behavior:

hmf_test.py

  1. Calculate Behroozi mass function using the SOcritical definition

  2. Find corresponding overdensity value for the SOmean definition for the same actual threshold density

  3. Calculate Behroozi mass function using the SOmean definition with the overdensity found above

  4. The mass functions calculated in 1. and 3. differ by up to 50%.

Expected behavior
The mass functions should be identical, as is the case when, e.g., using Tinker08 instead of Behroozi.

  • OS: MacOS 26.2
  • Python 3.14.2
  • hmf version 3.5.2

Additional context
Sample script for reproducing the issue is attached.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions