-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Fix missing mu in temperature calculation RAMSES #4817
[BUG] Fix missing mu in temperature calculation RAMSES #4817
Conversation
Hi! Welcome, and thanks for opening this pull request. We have some guidelines for new pull requests, and soon you'll hear back about the results of our tests and continuous integration checks. Thank you for your contribution! |
Thanks for the PR @V-Nathir! I made some modifications to ensure that we are backwards compatible with old code versions. If we cannot read the cooling tables, we assume that T = T/µ (it is wrong, but we can't easily get µ) and we raise a warning when the user tries to access the temperature. For recent code versions, we interpolate µ from the cooling tables, T/µ and nH. For reviewers: this is a breaking change but also a bug. I don't really see a way forward to fixing it that would satisfy these two constrains:
|
Failure on the build on py3.12 is unrelated :) |
How about we just ship it in our next feature release instead of a bugfix release ? |
Either way is fine by me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, but I'd like a second pair of eyes with someone from astro (@brittonsmith?)
Then I should leave this choice to reviewers. Please remember to set a milestone before you merge this. Thanks ! |
The failing tests are unrelated and fixed in #4819. |
c9f92ab
to
e88d310
Compare
@cphyc I trust Britton's approval and am ready to hit the button, but first I'd like us to clarify why you marked this change as "backward incompatible": what I think I understand here is that outputs from yt 4.3.1 were incorrect, so changing them is not bug-for-bug backwards compatible, sure, but it wouldn't break any downstream correct code, would it ? |
It depends what you define as buggy. We've been calling temperature In this context, |
Ok, I'll make sure this is explicitly called out in release notes then. For the sake of refreshing CI, can you rebase or merge from main again ? |
be0408d
to
ee1f138
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-approving by proxy
Hooray! Congratulations on your first merged pull request! We hope we keep seeing you around! 🎆 |
PR Summary
The YT´s output for Temperature was not exactly the temperature, it was temperature over mu. This mu is required since P/rho = kb/mu * T/m_p; where p=pressure, rho=density, T=Temperature, m_p=proton mass, kb=Boltzmann Cte., and mu is the dimensionless average particle weight. Yt used to do P/rho * mp/kb = T, this T is now T_over_mu, and the temperature is now T_over_mu * mu. Also, the dimension of mu has been changed.
PR Checklist