# galpy.potential.scf_compute_coeffs_axi_nbody¶

This function is the equivalent to galpy.potential.scf_compute_coeffs_axi 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 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 galpy.potential.scf_compute_coeffs_nbody where $$Acos_{nlm} = 0$$ at $$m\neq0$$ and $$Asin_{nlm} = None$$.

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

NAME:

scf_compute_coeffs_axi_nbody

PURPOSE:

Numerically compute the expansion coefficients for a given $N$-body set of points assuming that the density is axisymmetric

INPUT:

pos - positions of particles in rectangular coordinates with shape [3,n]

N - size of the Nth dimension of the expansion coefficients

L - size of the Lth dimension of the expansion coefficients

mass= (1.) mass of particles (scalar or array with size n)

a= (1.) parameter used to scale the radius

OUTPUT:

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

HISTORY:

2021-02-22 - Written based on general code - Bovy (UofT)