galpy.util.conversion

Utility functions that provide conversions between galpy’s natural units and physical units. These can be used to translate galpy outputs in natural coordinates to physical units by multiplying with the appropriate function.

These could also be used to figure out the conversion between different units. For example, if you want to know how many \(\mathrm{GeV\,cm}^{-3}\) correspond to \(1\,M_\odot\,\mathrm{pc}^{-3}\), you can calculate

>>> from galpy.util import conversion
>>> conversion.dens_in_gevcc(1.,1.)/conversion.dens_in_msolpc3(1.,1.)
# 37.978342941703616

or \(1\,M_\odot\,\mathrm{pc}^{-3} \approx 40\,\mathrm{GeV\,cm}^{-3}\).

Also contains a few utility functions to deal with the ro and vo conversion parameters for galpy object or lists thereof.

Utility functions:

Conversion functions: