Skip to content

Calculating forces with with evaluateRforces() and evaluatezforces() with Irrgang13I #618

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

You must be logged in to vote

Hi,

Yes, this is confusing, but you're correct to note that:

  • If a Potential is set up without units (like MWPotential2014), then values returned are in internal units
  • If a Potential is set up with units, then return values have physical units.

The least confusing way to deal with units is to set astropy-units = False in the configuration file; that way all physical return values are astropy Quantities with clear units and if you get a float, it's in internal units.

For MWPotential2014, you can also get physical output doing, e.g.

evaluateRforces(MWPotential2014,1.,0.,ro=8.,vo=220.,use_physical=True)

or

evaluateRforces(MWPotential2014,1.,0.,ro=8.,vo=220.,use_physical=True,quantity=True)

t…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by jobovy
Comment options

You must be logged in to vote
1 reply
@jobovy
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