-
Notifications
You must be signed in to change notification settings - Fork 34
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
Logarithmic potential energy #37
Comments
BTW: I'm assuming, based on this code in the potential factory that what is input to |
hmm, when I run the first snippet of your code, it prints out 0.0172100968809 – same as the analytic expression.. |
Oh, sorry, I forgot something in the snippet -- I had also used: import astropy.units as u
agama.setUnits(length=u.kpc, time=u.Myr, mass=u.Msun) I agree -- if I don't do the |
The variable names and comment reference sigma here: Agama/src/potential_analytic.h Line 92 in 3052049
|
ah, I see. Thanks for catching the wrong usage of |
Ah, of course - that makes sense. |
ok, it turned out to be not such a big deal to add an extra dimensional parameter (length unit) to the Logarithmic potential, and restore the invariance of its zero-point w.r.t. the choice of units (available in the latest commit). |
I was playing with the logarithmic potential in Agama and comparing to my implementation in Gala but found an inconsistency. The definition in Agama states that the potential corresponds to
(1/2) \sigma^2 \ln[ r_c^2 + x^2 + (y/p)^2 + (z/q)^2 ]
, but it looks like the parameter it accepts isv0
. Is that the same as \sigma? If so, I would expect this:to return the same as
Am I misunderstanding the input parameters?
The text was updated successfully, but these errors were encountered: