Skip to content

I get different results using galpy' internal units and physical units. Which result should I trust? #597

Answered by jobovy
jiweiliao6 asked this question in Q&A
Discussion options

You must be logged in to vote

I just looked at this more closely and it's exactly as I said before: the problem is that when you setup the orbit in internal units, you give phi in degree rather than in radian. That is, in these lines:

s_vxvv = [s_R/8. ,s_vR/220. ,s_vT/220., s_z/8., s_vz/220., s_phi*180./np.pi]  #conversion galpy internal units
...
vxvv = [R/8. ,vR/220. ,vT/220., z/8., vz/220., phi*180./np.pi]  #conversion galpy internal units

They should just be

s_vxvv = [s_R/8. ,s_vR/220. ,s_vT/220., s_z/8., s_vz/220., s_phi]  #conversion galpy internal units
...
vxvv = [R/8. ,vR/220. ,vT/220., z/8., vz/220., phi]  #conversion galpy internal units

Then both methods agree and the result is 13.4 kpc.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@jobovy
Comment options

@jiweiliao6
Comment options

@jobovy
Comment options

Answer selected by jobovy
@jiweiliao6
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants