Skip to content

Cap HMCode2020 feedback stellar fraction at baryon fraction#2

Open
Uendert wants to merge 1 commit into
mainfrom
fix-feedback-fstar-cap
Open

Cap HMCode2020 feedback stellar fraction at baryon fraction#2
Uendert wants to merge 1 commit into
mainfrom
fix-feedback-fstar-cap

Conversation

@Uendert
Copy link
Copy Markdown
Collaborator

@Uendert Uendert commented May 24, 2026

This PR adds the HMCode2020 feedback stellar-fraction cap used in the original Fortran HMcode implementation.

For HMCode2020 feedback, the stellar fraction should be capped at the cosmic baryon fraction:

fstar <= Omega_b / Omega_m

Without this cap, the Julia implementation can exceed the baryon fraction at high redshift, producing large feedback deviations.

This PR adds the same cap and a regression test checking that:

  • low-redshift values are unchanged when fstar < Omega_b / Omega_m
  • high-redshift values are capped when fstar > Omega_b / Omega_m

Validation:

  • the new targeted feedback regression test passes locally
  • the broader existing test suite starts correctly after declaring the standard Julia Test target

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

Successfully merging this pull request may close these issues.

1 participant