pisces.models.galaxy_clusters.spherical.SphericalGalaxyClusterModel.from_entropy_and_density#
- classmethod SphericalGalaxyClusterModel.from_entropy_and_density(density_profile: BaseSphericalDensityProfile, entropy_profile: BaseSphericalEntropyProfile, filename: str | Path, min_radius: unyt_quantity | str = unyt_quantity(1, 'kpc'), max_radius: unyt_quantity | str = unyt_quantity(1, 'Mpc'), num_points: int = 1000, overwrite: bool = False, stellar_density_profile: BaseSphericalDensityProfile = None, **kwargs)[source]#
Generate a spherical cluster model from gas density and entropy profiles.
- Parameters:
density_profile (
BaseSphericalDensityProfile
) – Profile object representing the radial gas density.entropy_profile (
BaseSphericalEntropyProfile
) – Profile object representing the entropy of the ICM gas.filename (
str
orPath
) – Output HDF5 file path.min_radius (
unyt_quantity
orstr
, optional) – Minimum radius for sampling (default: 1 kpc).max_radius (
unyt_quantity
orstr
, optional) – Maximum radius for sampling (default: 1 Mpc).num_points (
int
, optional) – Number of radial samples (default: 1000).overwrite (
bool
, optional) – Whether to overwrite existing file (default: False).stellar_density_profile (
BaseSphericalDensityProfile
, optional) – Optional stellar density profile. If provided, the stellar density will be included in the model. Otherwise, the stellar density is assumed to be zero and no stellar component is included.**kwargs – Additional keyword arguments for radial grid construction.
Notes
Given entropy \(K(r)\) and gas density \(\rho_{\mathrm{gas}}(r)\), we use:
Entropy definition:
\[ \begin{align}\begin{aligned} K(r) = \frac{T(r)}{n_e(r)^{2/3}}\\with\end{aligned}\end{align} \]\[n_e(r) = \frac{\rho_{\mathrm{gas}}(r)}{\mu_e m_p}\]Invert to get temperature:
\[T(r) = K(r) \cdot \left(\frac{\rho_{\mathrm{gas}}(r)}{\mu_e m_p}\right)^{2/3}\]Compute pressure from ideal gas law and proceed as in the temperature + density pathway.