Skip to content

Commit

Permalink
Better way to get the right units with pynbody
Browse files Browse the repository at this point in the history
  • Loading branch information
apontzen authored and jobovy committed Dec 12, 2024
1 parent 9a71d9b commit 8e94507
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions doc/source/potential.rst
Original file line number Diff line number Diff line change
Expand Up @@ -701,10 +701,7 @@ the simulation on it, and align the galaxy face-on using
we also convert the simulation to physical units, but set ``G=1`` by
doing the following

>>> s.physical_units()
>>> from galpy.util.conversion import _G
>>> s['mass'] *= _G/1000
>>> s['mass'].units= 'kpc km**2 s**-2 G**-1'
>>> s.physical_units(mass='kpc km**2 s**-2 G**-1')

We can now load an interpolated version of this snapshot's potential
into ``galpy`` using
Expand Down

0 comments on commit 8e94507

Please sign in to comment.