Merge main and quadratic SFRD#38
Open
JulianBMunoz wants to merge 14 commits intoquadratic-SFRDfrom
Open
Conversation
Clipped fstarofz such that 0<SFE<1
Contributor
There was a problem hiding this comment.
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
fstarofzto clip the (pre-baryon-fraction) star-formation efficiency to[0, 1], effectively capping returnedfstaratOmegaB/OmegaM.
Comments suppressed due to low confidence (2)
zeus21/sfrd.py:690
fstarofznow hard-caps the pre-baryon-fraction efficiency to 1.0 vianp.clip(..., 0, 1), which implies the returnedfstaris capped atOmegaB/OmegaMregardless ofAstro_Parameters.fstarmax(except whenfstarmax < OmegaB/OmegaM). Iffstarmaxis intended to be the sole user-controlled cap, consider clipping usingAstro_Parameters.fstarmax(or documenting thatfstaris now physically limited toOmegaB/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
fstarofzis a functional change (it saturates atOmegaB/OmegaM). There are tests for SFR behavior intests/test_astrophysics.py, but nothing directly asserts the new saturation/positivity behavior offstarofz. Adding a small unit test that exercises extremeepsstar/mass values and asserts0 <= fstarofz <= OmegaB/OmegaMwould 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.
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>
Implement max sfr physical
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.