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 ofr
and time;_rforce(self,r,t=0.)
: the radial force as a function ofr
and time;_r2deriv(self,r,t=0.)
: the second radial derivative of the potential as a function ofr
and time;_rdens(self,r,t=0.)
: the density as a function ofr
and time (if not implemented, calculated using the Poisson equation).
- __init__(amp=1.0, ro=None, vo=None, amp_units=None)[source]¶
NAME:
__init__
PURPOSE:
initialize a spherical potential
INPUT:
amp - amplitude to be applied to the potential (default: 1); can be a Quantity with units that depend on the specific spherical potential
amp_units - (‘mass’, ‘velocity2’, ‘density’) type of units that amp should have if it has units (passed to Potential.__init__)
ro=, vo= distance and velocity scales for translation into internal units (default from configuration file)
OUTPUT:
(none)
HISTORY:
2020-03-30 - Written - Bovy (UofT)