-
Notifications
You must be signed in to change notification settings - Fork 107
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
Spergel
stepk
has two powers of the scale radius
#1324
Labels
bug report
Bug report
Comments
I concur. Looks like this error was introduced when trying to move more of the implementation up to python. The pure C++ code looks right, but the python code has a spurious extra r0. And we apparently didn't have a test that would catch the change. |
Yep. Tests pass either way. Maybe we should check |
propto 1/scale_radius. But yeah, we should add a test about this. |
rmjarvis
added a commit
that referenced
this issue
Dec 20, 2024
rmjarvis
added a commit
that referenced
this issue
Dec 20, 2024
rmjarvis
added a commit
that referenced
this issue
Dec 20, 2024
rmjarvis
added a commit
that referenced
this issue
Jan 3, 2025
rmjarvis
added a commit
that referenced
this issue
Jan 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It appears that galsim has two factors of
r0
being applied when computing thestepk
for theSpergel
profile.The first power is here:
GalSim/src/SBSpergel.cpp
Lines 101 to 102 in 120eab3
but then the scale radius is applied again here:
GalSim/galsim/spergel.py
Lines 206 to 211 in 120eab3
I compared to the implementation in jax-galsim, and I can only get them to agree if I use a second factor of
r0
within jax-galsim like thisNote that the jax-galsim
calculateFluxRadius
function is in normalized units, and so should have only one factor ofr0
.The text was updated successfully, but these errors were encountered: