-
Notifications
You must be signed in to change notification settings - Fork 274
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: Use cm_per_mpc instead of 3.08e24 #3867 #3868
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! |
I'll leave triage to @cphyc: don't hesitate to put this in the 4.0.3 milestone if it makes sense to you |
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.
Thanks for the contribution!
Looks like a test uses the old value of 3.08e24 to calculate the compared simulation time
and hence this commit fails. One option is to update the test values, but since this test is on an old output (probably made before the introduction of the more accurate |
Good catch. Is it possible to parse (or deduce) which version of RAMSES produced a given output file ? If not, I'd err on the side of embracing the newest version rather than the oldest, but I guess we'd need to expose some parameter to make it possible to reproduce the old behaviour. |
Unfortunately, I don't think there is any easy way of telling the RAMSES version where this change was introduced, so I'd be in favour of accepting this PR as is (and update the failing test accordingly). |
I agree about there being no way to tell which version. Do you think this needs some kind of warning? |
If we're going to support only one convention I agree that it's best to go with the newest. Do you guys have an idea when it was switched in RAMSES ? |
As far as I can tell, it was introduced to |
Ok. Sounds old enough that I'd side with Corentin: let's just update the existing test result. |
Head branch was pushed to by a user without write access
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
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.
LGTM, but I'll let @cphyc push the button :)
Hooray! Congratulations on your first merged pull request! We hope we keep seeing you around! 🎆 |
Fix for #3867.
PR Summary
Use
cm_per_mpc
instead of 3.08e24 for conversion from Mpc to cm. Also partly addresses #2098:where
tA-tB
is now-0.5628994599301222 Myr
where it was-22.47323433951169 Myr
.