pisces.models.galaxy_clusters.spherical.SphericalGalaxyClusterModel.get_df#
- SphericalGalaxyClusterModel.get_df(species: str) tuple[unyt_array, unyt_array][source]#
Retrieve the distribution function and energy grid for a given species.
The distribution functions are expressed as function of the effective energy \(\mathcal{E}\). Thus,
\[P(a<\mathcal{E}<b) = \int_a^b {\rm DF}(\mathcal{E}) d\mathcal{E}.\]Inside the underlying HDF5 file, distribution functions are stored in the
"DISTRIBUTION_FUNCTIONS".- Parameters:
species (
str) – The species name (e.g., “stellar”, “gas”, “dm”). This will look for keys named"E_<species>"and"DF_<species>"in the"DISTRIBUTION_FUNCTIONS"group of the model HDF5 file.- Returns:
A tuple
(E, DF)containing the energy grid and corresponding distribution function as unyt arrays with units.- Return type:
Tupleofunyt_array- Raises:
KeyError – If the species’ distribution function or energy grid is missing.