galpy.potential.scf_compute_coeffs_nbody

This function is the equivalent to galpy.potential.scf_compute_coeffs but computing the coefficients based on an N-body representation of the density.

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

galpy.potential.scf_compute_coeffs_nbody(pos, N, L, mass=1.0, a=1.0)[source]

Numerically compute the expansion coefficients for a given $N$-body set of points

Parameters:
  • pos (numpy.ndarray) – Positions of particles in rectangular coordinates with shape [3,n]

  • N (int) – Size of the Nth dimension of the expansion coefficients

  • L (int) – Size of the Lth and Mth dimension of the expansion coefficients

  • mass (float or numpy.ndarray, optional) – Mass of particles (scalar or array with size n), by default 1.0

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

Returns:

Expansion coefficients for density dens that can be given to SCFPotential.__init__

Return type:

tuple

Notes

  • 2020-11-18 - Written - Morgan Bennett (UofT)