galpy.potential.scf_compute_coeffs_spherical

Note: This function computes Acos and Asin as defined in Hernquist & Ostriker (1992), except that we multiply Acos by 2 such that the density from Galpy’s Hernquist Potential corresponds to \(Acos = \delta_{0n}\delta_{0l}\delta_{0m}\).

Further note that this function is a specification of scf_compute_coeffs_axi where \(Acos_{nlm} = 0\) at \(l\neq0\)

For a given \(\rho(r)\) we can compute \(Acos\) and \(Asin\) through the following equation

\[Acos_{nlm}= \frac{16 \pi a^3}{I_{nl}} \int_{\xi=0}^{\infty} (1 + \xi)^{2} (1 - \xi)^{-4} \rho(r) \Phi_{nlm}(\xi) d\xi \qquad Asin_{nlm}=None\]

Where

\[\Phi_{nlm}(\xi, \cos(\theta)) = -\frac{1}{2 a} (1 - \xi) C_{n}^{3/2}(\xi) \delta_{l0} \delta_{m0}\]
\[I_{n0} = - K_{n0} \frac{1}{4 a} \frac{(n + 2) (n + 1)}{(n + 3/2)} \qquad K_{nl} = \frac{1}{2}n(n + 3) + 1\]

\(C_{n}^{\alpha}\) is the Gegenbauer polynomial.

Also note \(\xi = \frac{r - a}{r + a}\), and \(n\), \(l\) and \(m\) are integers bounded by \(0 <= n < N\) , \(l = m = 0\)

galpy.potential.scf_compute_coeffs_spherical(dens, N, a=1.0, radial_order=None)[source]

Numerically compute the expansion coefficients for a given spherical density

Parameters:
  • dens (function) – A density function that takes a parameter R

  • N (int) – Size of expansion coefficients

  • a (float, optional) – Parameter used to scale the radius (default is 1.0)

  • radial_order (int, optional) – Number of sample points of the radial integral. If None, radial_order=max(20, N + 1) (default is None)

Returns:

(Acos,Asin) - Expansion coefficients for density dens that can be given to SCFPotential.__init__

Return type:

tuple

Notes

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