Arbitrary spherical density potential

class galpy.potential.AnySphericalPotential(amp=1.0, dens=<function AnySphericalPotential.<lambda>>, normalize=False, ro=None, vo=None)[source]

Class that implements the potential of an arbitrary spherical density distribution \(\rho(r)\)

__init__(amp=1.0, dens=<function AnySphericalPotential.<lambda>>, normalize=False, ro=None, vo=None)[source]

Initialize the potential of an arbitrary spherical density distribution.

Parameters:
  • amp (float, optional) – Amplitude to be applied to the potential. Default is 1.0.

  • dens (callable, optional) – A function of a single variable that gives the density as a function of radius (can return a Quantity). Default is lambda r: 0.64 / r / (1 + r) ** 3.

  • normalize (bool or float, optional) – If True, normalize such that vc(1.,0.)=1., or, if given as a number, such that the force is this fraction of the force necessary to make vc(1.,0.)=1.

  • ro (float or Quantity, optional) – Distance scale for translation into internal units (default from configuration file).

  • vo (float or Quantity, optional) – Velocity scale for translation into internal units (default from configuration file).

Notes

  • 2021-01-05 - Written - Bovy (UofT)