Hernquist & Ostriker Self-Consistent-Field-type potential

class galpy.potential.SCFPotential(amp=1.0, Acos=array([[[1]]]), Asin=None, a=1.0, normalize=False, ro=None, vo=None)[source]

Class that implements the Hernquist & Ostriker (1992) Self-Consistent-Field-type potential. Note that we divide the amplitude by 2 such that \(Acos = \delta_{0n}\delta_{0l}\delta_{0m}\) and \(Asin = 0\) corresponds to Galpy’s Hernquist Potential.

\[\rho(r, \theta, \phi) = \frac{amp}{2}\sum_{n=0}^{\infty} \sum_{l=0}^{\infty} \sum_{m=0}^l N_{lm} P_{lm}(\cos(\theta)) \tilde{\rho}_{nl}(r) \left(A_{cos, nlm} \cos(m\phi) + A_{sin, nlm} \sin(m\phi)\right)\]

where

\[\tilde{\rho}_{nl}(r) = \frac{K_{nl}}{\sqrt{\pi}} \frac{(a r)^l}{(r/a) (a + r)^{2l + 3}} C_{n}^{2l + 3/2}(\xi)\]
\[\Phi(r, \theta, \phi) = \sum_{n=0}^{\infty} \sum_{l=0}^{\infty} \sum_{m=0}^l N_{lm} P_{lm}(\cos(\theta)) \tilde{\Phi}_{nl}(r) \left(A_{cos, nlm} \cos(m\phi) + A_{sin, nlm} \sin(m\phi)\right)\]

where

\[\tilde{\Phi}_{nl}(r) = -\sqrt{4 \pi}K_{nl} \frac{(ar)^l}{(a + r)^{2l + 1}} C_{n}^{2l + 3/2}(\xi)\]

where

\[\xi = \frac{r - a}{r + a} \qquad N_{lm} = \sqrt{\frac{2l + 1}{4\pi} \frac{(l - m)!}{(l + m)!}}(2 - \delta_{m0}) \qquad K_{nl} = \frac{1}{2} n (n + 4l + 3) + (l + 1)(2l + 1)\]

and \(P_{lm}\) is the Associated Legendre Polynomials whereas \(C_n^{\alpha}\) is the Gegenbauer polynomial.

__init__(amp=1.0, Acos=array([[[1]]]), Asin=None, a=1.0, normalize=False, ro=None, vo=None)[source]

Initialize a SCF Potential from a set of expansion coefficients (use SCFPotential.from_density to directly initialize from a density)

Parameters:
  • amp (float or Quantity, optional) – Amplitude to be applied to the potential (default: 1); can be a Quantity with units of mass or Gxmass.

  • Acos (numpy.ndarray, optional) – The real part of the expansion coefficient (NxLxL matrix, or optionally NxLx1 if Asin=None).

  • Asin (numpy.ndarray, optional) – The imaginary part of the expansion coefficient (NxLxL matrix or None).

  • a (float or Quantity, optional) – Scale length.

  • 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

  • 2016-05-13 - Written - Aladdin Seaifan (UofT)

classmethod from_density(dens, N, L=None, a=1.0, symmetry=None, radial_order=None, costheta_order=None, phi_order=None, ro=None, vo=None)[source]

Initialize an SCF Potential from a given density.

Parameters:
  • dens (function) – Density function that takes parameters R, z and phi; z and phi are optional for spherical profiles, phi is optional for axisymmetric profiles. The density function must take input positions in internal units (R/ro, z/ro), but can return densities in physical units. You can use the member dens of Potential instances or the density from evaluateDensities.

  • N (int) – Number of radial basis functions.

  • L (int, optional) – Number of costheta basis functions; for non-axisymmetric profiles also sets the number of azimuthal (phi) basis functions to M = 2L+1).

  • a (float or Quantity, optional) – Expansion scale length.

  • symmetry ({'spherical','axisymmetry',None}, optional) – Symmetry of the profile to assume. None is the general, non-axisymmetric case.

  • radial_order (int, optional) – Number of sample points for the radial integral. If None, radial_order=max(20, N + 3/2L + 1).

  • costheta_order (int, optional) – Number of sample points of the costheta integral. If None, If costheta_order=max(20, L + 1).

  • phi_order (int, optional) – Number of sample points of the phi integral. If None, If costheta_order=max(20, L + 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).

Return type:

SCFPotential object

Notes

  • Written - Jo Bovy (UofT) - 2022-06-20