pisces.physics.virialization.eddington.compute_eddington_distribution#
- pisces.physics.virialization.eddington.compute_eddington_distribution(density: unyt_array, potential: unyt_array, num_points: int = 1000, boundary_value: unyt_quantity = unyt_quantity(0, 'km**2/s**2'), scale: str = 'linear') tuple[unyt_array, unyt_array] [source]#
Compute the isotropic Eddington distribution function from a given species density and gravitational potential.
The distribution function \(f(\mathcal{E})\) is computed under the assumption of ergodicity and isotropy:
\[f(\mathcal{E}) = \frac{1}{\sqrt{8}\pi^2} \frac{d}{d\mathcal{E}} \int_0^\mathcal{E} \frac{1}{\sqrt{\mathcal{E}-\Psi}} \frac{d\rho}{d\Psi} d\Psi\]- Parameters:
density (
unyt_array
) – The species density profile \(\rho(r)\). Must be ordered identically to potential.potential (
unyt_array
) – The gravitational potential profile \(\Phi(r)\) corresponding to the same radii as density.num_points (
int
, optional) – Number of evaluation points in relative energy \(\mathcal{E}\). Default is 1000.boundary_value (
unyt_quantity
, optional) – Value of \(\Phi_0\) used to define the relative potential \(\Psi = -(\Phi - \Phi_0)\). Default is 0.scale (
{'linear', 'log'}
, optional) – Whether to sample relative energy points linearly or logarithmically. Default is ‘linear’.
- Returns:
unyt_array
– Relative energies \(\mathcal{E}\).unyt_array
– Distribution function values \(f(\mathcal{E})\), in units of \([\rho][\mathcal{E}]^{-3/2}\).