Skip to content

Merge main and quadratic SFRD#38

Open
JulianBMunoz wants to merge 14 commits intoquadratic-SFRDfrom
main
Open

Merge main and quadratic SFRD#38
JulianBMunoz wants to merge 14 commits intoquadratic-SFRDfrom
main

Conversation

@JulianBMunoz
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR merges changes related to the “quadratic SFRD” work into main, updating the SFR efficiency calculation and annotating new edit provenance in the SFRD module.

Changes:

  • Add an additional editor attribution block in zeus21/sfrd.py.
  • Modify fstarofz to clip the (pre-baryon-fraction) star-formation efficiency to [0, 1], effectively capping returned fstar at OmegaB/OmegaM.
Comments suppressed due to low confidence (2)

zeus21/sfrd.py:690

  • fstarofz now hard-caps the pre-baryon-fraction efficiency to 1.0 via np.clip(..., 0, 1), which implies the returned fstar is capped at OmegaB/OmegaM regardless of Astro_Parameters.fstarmax (except when fstarmax < OmegaB/OmegaM). If fstarmax is intended to be the sole user-controlled cap, consider clipping using Astro_Parameters.fstarmax (or documenting that fstar is now physically limited to OmegaB/OmegaM), and consider whether the PopIII path (fstarofz_III) should be capped the same way for consistency.
        self.xHI_avg = (1.0 - self._xHII_avg)
        self.xHI_avg = np.fmin(1.0, self.xHI_avg)
        
        

zeus21/sfrd.py:688

  • The new clipping behavior in fstarofz is a functional change (it saturates at OmegaB/OmegaM). There are tests for SFR behavior in tests/test_astrophysics.py, but nothing directly asserts the new saturation/positivity behavior of fstarofz. Adding a small unit test that exercises extreme epsstar/mass values and asserts 0 <= fstarofz <= OmegaB/OmegaM would help prevent accidental regressions (and clarify intended behavior).
        self.xHI_avg = (1.0 - self._xHII_avg)
        self.xHI_avg = np.fmin(1.0, self.xHI_avg)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI and others added 11 commits April 29, 2026 16:11
Agent-Logs-Url: https://github.com/ZeusCosmo/Zeus21/sessions/125bc937-b800-45fc-b854-32e56c5f75df

Co-authored-by: JulianBMunoz <22434409+JulianBMunoz@users.noreply.github.com>
…rapezoid

Replace deprecated `np.trapz` with `np.trapezoid`, require NumPy ≥ 2.0
In case sigmaUV is huge. Basically M*/t for some t parameter min_t_formation_Myr, by default set to None
comment out old weights
and fix trapz to trapezoid...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ZeusCosmo/Zeus21/sessions/2c5ae1f8-5c98-4298-b426-afd7b6757fb8

Co-authored-by: JulianBMunoz <22434409+JulianBMunoz@users.noreply.github.com>
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.

4 participants