Halo Environment¶
Class providing models of the large-scale environment of dark matter halos—the linear and non-linear overdensity of the surrounding density field on a characteristic smoothing scale (typically several Mpc). Environmental overdensity modulates halo formation rates (assembly bias), the critical overdensity for collapse, and the IGM photo-ionization background. Implementations provide the overdensity PDF/CDF, its value for individual nodes, and the radius and mean mass of the environmental region, ranging from a uniform (field) environment to constrained local density models.
Default implementation: haloEnvironmentUniform
Methods¶
overdensityLinear→double precisionReturn the linear (pre-collapse) large-scale environmental overdensity for the given
node, optionally evaluated at the present day rather than at the node’s cosmic time.type (treeNode), intent(inout) :: nodelogical , intent(in ), optional :: presentDay
overdensityLinearGradientTime→double precisionReturn the gradient with time of the environmental linear overdensity for the given
node.type (treeNode), intent(inout) :: node
overdensityNonLinear→double precisionReturn the non-linear (post-collapse) large-scale environmental overdensity for the given
node, accounting for gravitational non-linear evolution of the surrounding density field.type(treeNode), intent(inout) :: node
environmentRadius→double precisionReturn the radius (in Mpc) of the spherical region over which the large-scale density is averaged to define the halo environment.
environmentMass→double precisionReturn the mean mass (in \(\mathrm{M}_\odot\)) enclosed within the environmental smoothing region, equal to the background matter density times the volume of the sphere of radius
environmentRadius.overdensityLinearMinimum→double precisionReturn the minimum linear overdensity for which the environmental overdensity PDF is non-zero.
overdensityLinearMaximum→double precisionReturn the maximum linear overdensity for which the environmental overdensity PDF is non-zero.
pdf→double precisionReturn the PDF of the environmental overdensity for the given overdensity.
double precision, intent(in ) :: overdensity
cdf→double precisionReturn the CDF of the environmental overdensity for the given overdensity.
double precision, intent(in ) :: overdensity
overdensityLinearSet→voidSet the linear environmental overdensity for the given
node, allowing external code (e.g., constrained realization samplers) to assign a specific large-scale density to the node’s host region.type (treeNode), intent(inout) :: nodedouble precision , intent(in ) :: overdensity
overdensityIsSettable→logicalReturn true if the environmental overdensity can be set externally via
overdensityLinearSet, allowing the caller to determine at runtime whether the environment model supports direct assignment.volumeFractionOccupied→double precisionReturn the fraction of the volume occupied by the regions described by this environment.
isNodeDependent→logicalReturn true if the environment is node dependent (but false if the only dependency on the node is via its host tree).
isTreeDependent→logicalReturn true if the environmental overdensity depends on the host merger tree (i.e., on
node%hostTree), as opposed to depending only on the individual node or being completely node-independent.
haloEnvironmentFixed¶
Implements a halo environment with a fixed, user-specified overdensity, representing a deterministic large-scale density field around a halo. The environmental overdensity is set by [overdensity], while the filtering scale for variance computations is specified by either [radiusEnvironment] or the corresponding environmental mass [massEnvironment].
Parameters
[overdensity](real) — The fixed linear overdensity \(\delta\) of the large-scale environment assigned uniformly to all halos; a positive value places halos in an overdense region, while negative values simulate voids.[radiusEnvironment](real; default0.0d0) — The radius of the sphere used to determine the variance in the environmental density.[massEnvironment](real; default1.0d15) — The mass within the sphere sphere used to determine the variance in the environmental density.
haloEnvironmentLogNormal¶
Implements a halo environment in which the large-scale overdensity follows a log-normal probability distribution, modeling the statistical distribution of cosmic environments around dark matter halos. The variance of the density field is computed within a sphere of radius given by [radiusEnvironment], drawn from the linear power spectrum.
Parameters
[radiusEnvironment](real; default7.0d0) — The radius of the sphere used to determine the variance in the environmental density.
haloEnvironmentNormal¶
Implements a halo environment in which the large-scale overdensity follows a Gaussian (normal) probability distribution, modeling the statistical distribution of cosmic large-scale density fields around dark matter halos. The filtering scale and redshift at which the environment is defined are set by [massEnvironment] or [radiusEnvironment] and [redshift].
Methods
calculationReset— Reset memoized calculations.
Parameters
[massEnvironment](real; default1.0d15) — The mass within the sphere sphere used to determine the variance in the environmental density.[radiusEnvironment](real; default7.0d0) — The radius of the sphere used to determine the variance in the environmental density.[redshift](real; default0.0d0) — The redshift at which the large-scale environmental overdensity is defined; the linear density variance and growth factor are evaluated at the corresponding cosmic time to normalize the Gaussian environmental PDF.
haloEnvironmentUniform¶
Implements a uniform halo environment.
(Default implementation)