Ellipsoidal potentials¶
- class galpy.potential.EllipsoidalPotential.EllipsoidalPotential(amp=1.0, b=1.0, c=1.0, zvec=None, pa=None, glorder=50, ro=None, vo=None, amp_units=None)[source]¶
Base class for potentials corresponding to density profiles that are stratified on ellipsoids:
\[\rho(x,y,z) \equiv \rho(m^2)\]where \(m^2 = x^2+y^2/b^2+z^2/c^2\). Note that \(b\) and \(c\) are defined to be the axis ratios (rather than using \(m^2 = x^2/a^2+y^2/b^2+z^2/c^2\) as is common).
Implement a specific density distribution with this form by inheriting from this class and defining functions
_mdens(self,m)
(the density as a function ofm
),_mdens_deriv(self,m)
(the derivative of the density as a function ofm
), and_psi(self,m)
, which is:\[\psi(m) = -\int_{m^2}^\infty d m^2 \rho(m^2)\]See PerfectEllipsoidPotential for an example and Merritt & Fridman (1996) for the formalism.
- __init__(amp=1.0, b=1.0, c=1.0, zvec=None, pa=None, glorder=50, ro=None, vo=None, amp_units=None)[source]¶
Initialize an ellipsoidal potential.
- Parameters:
amp (float or Quantity, optional) – Amplitude to be applied to the potential (default: 1); can be a Quantity with units that depend on the specific spheroidal potential.
b (float, optional) – y-to-x axis ratio of the density.
c (float, optional) – z-to-x axis ratio of the density.
zvec (numpy.ndarray, optional) – If set, a unit vector that corresponds to the z axis.
pa (float or Quantity, optional) – If set, the position angle of the x axis (rad or Quantity).
glorder (int, optional) – If set, compute the relevant force and potential integrals with Gaussian quadrature of this order.
ro (float, optional) – Distance scale for translation into internal units (default from configuration file).
vo (float, 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 (passed to Potential.__init__).
Notes
2018-08-06 - Started - Bovy (UofT)