Spherical potentials

class galpy.potential.SphericalPotential.SphericalPotential(amp=1.0, ro=None, vo=None, amp_units=None)[source]

Base class for spherical potentials.

Implement a specific spherical density distribution with this form by inheriting from this class and defining functions:

  • _revaluate(self,r,t=0.): the potential as a function of r and time;

  • _rforce(self,r,t=0.): the radial force as a function of r and time;

  • _r2deriv(self,r,t=0.): the second radial derivative of the potential as a function of r and time;

  • _rdens(self,r,t=0.): the density as a function of r and time (if not implemented, calculated using the Poisson equation).

__init__(amp=1.0, ro=None, vo=None, amp_units=None)[source]

Initialize a spherical potential.

Parameters:
  • amp (float, optional) – Amplitude to be applied to the potential (default: 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).

  • amp_units (str, optional) – Type of units that amp should have if it has units (‘mass’, ‘velocity2’, ‘density’).

Notes

  • 2020-03-30 - Written - Bovy (UofT)