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

overdensityLineardouble precision

Return 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) :: node

  • logical , intent(in ), optional :: presentDay

overdensityLinearGradientTimedouble precision

Return the gradient with time of the environmental linear overdensity for the given node.

  • type (treeNode), intent(inout) :: node

overdensityNonLineardouble precision

Return 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

environmentRadiusdouble precision

Return the radius (in Mpc) of the spherical region over which the large-scale density is averaged to define the halo environment.

environmentMassdouble precision

Return 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.

overdensityLinearMinimumdouble precision

Return the minimum linear overdensity for which the environmental overdensity PDF is non-zero.

overdensityLinearMaximumdouble precision

Return the maximum linear overdensity for which the environmental overdensity PDF is non-zero.

pdfdouble precision

Return the PDF of the environmental overdensity for the given overdensity.

  • double precision, intent(in ) :: overdensity

cdfdouble precision

Return the CDF of the environmental overdensity for the given overdensity.

  • double precision, intent(in ) :: overdensity

overdensityLinearSetvoid

Set 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) :: node

  • double precision , intent(in ) :: overdensity

overdensityIsSettablelogical

Return 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.

volumeFractionOccupieddouble precision

Return the fraction of the volume occupied by the regions described by this environment.

isNodeDependentlogical

Return true if the environment is node dependent (but false if the only dependency on the node is via its host tree).

isTreeDependentlogical

Return 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; default 0.0d0) — The radius of the sphere used to determine the variance in the environmental density.

  • [massEnvironment] (real; default 1.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; default 7.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; default 1.0d15) — The mass within the sphere sphere used to determine the variance in the environmental density.

  • [radiusEnvironment] (real; default 7.0d0) — The radius of the sphere used to determine the variance in the environmental density.

  • [redshift] (real; default 0.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)