Dark Matter Halo Spin Parameter Distributions

Class providing the distribution \(p(\lambda)\) of the dark matter halo spin parameter \(\lambda \equiv J |E|^{1/2} / \mathrm{G} M^{5/2}\), where \(J\) is the angular momentum, \(E\) the total energy, and \(M\) the halo mass. The spin distribution, sometimes approximated by a log-normal, determines the range of galaxy disk sizes that form from cooling gas conserving the specific angular momentum of the halo. Implementations return both the distribution function \(p(\lambda)\) and random samples from it, enabling Monte Carlo assignment of spins to halos.

Default implementation: haloSpinDistributionBett2007

Methods

sampledouble precision

Samples a spin parameter from the distribution for the given node.

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

distributiondouble precision

Return the spin distribution function, \(p(\lambda)\), for the given node. It is assumed that node provides the value of the spin at which the distribution function should be evaluated.

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

haloSpinDistributionBett2007

A halo spin distribution in which the spin is drawn from the distribution found by Bett et al. (2007). The \(\lambda_0\) and \(\alpha\) parameter of Bett et al. (2007)’s distribution are set by the [lambda0] and [alpha] input parameters.

(Default implementation)

Parameters

  • [lambda0] (default 0.04326d0) — The parameter \(\lambda_0\) in the halo spin distribution of Bett et al. (2007).

  • [alpha] (default 2.509d0) — The parameter \(\alpha\) in the halo spin distribution of Bett et al. (2007).

  • [errorTolerant] (default .false.) — Error tolerance for the N-body spin distribution operator.

  • [logNormalRange] (default 100.0d0) — The multiplicative range of the log-normal distribution used to model the distribution of the mass and energy terms in the spin parameter. Specifically, the lognormal distribution is truncated outside the range \((\lambda_\mathrm{m}/R,\lambda_\mathrm{m} R\), where \(\lambda_\mathrm{m}\) is the measured spin, and \(R=\)[logNormalRange]

haloSpinDistributionDeltaFunction

A halo spin distribution class in which the spin is drawn from a \(\delta\)-function distribution, \(P(\lambda) = \delta(\lambda-\lambda_0)\), where \(\lambda_0=\)[spin], i.e. a fixed value of spin equal to \(\lambda_0\) is returned.

Parameters

  • [densityHydrogen] (default 100.0d0) — The density of hydrogen, \(n_\mathrm{H}\), in HII regions (in units of cm\(^{-3}\)).

  • [spin] (default 0.03687d0) — The fixed value of spin in a \(\delta\)-function spin distribution.

haloSpinDistributionLogNormal

A halo spin distribution class in which the spin is drawn from a lognormal distribution with median \(\bar{\lambda}=\)[median] and width \(\sigma=\)[sigma]. Specifically, the distribution function for spin, \(\lambda\), is

\[p(\lambda) = \frac{1}{\sqrt{2 \pi} \sigma \lambda} \exp\left[ - \frac{1}{2} \left(\frac{\log\lambda-\log\bar{\lambda}}{\sigma}\right)^2\right].\]

Parameters

  • [median] (default 0.03687d0) — The median value of the dimensionless Bullock spin parameter \(\lambda\) in the log-normal distribution, representing the typical angular momentum content of dark matter halos at the present day.

  • [sigma] (default 0.5102d0) — The standard deviation \(\sigma\) of \(\ln\lambda\) in the log-normal spin distribution, controlling the spread of spin parameters across the halo population; larger values produce a broader distribution of angular momenta.

  • [mean] — The mean of the log-normal distribution (ignoring any imposed upper and lower limits).

  • [variance] — The variance of the log-normal distribution (ignoring any imposed upper and lower limits).

  • [x0] — The median (geometric mean) \(x_0 > 0\) of the log-normal distribution; the distribution peaks at \(x_0 \exp(-\sigma^2)\) and has median \(x_0\).

  • [sigma] — The logarithmic width (standard deviation of \(\ln x\)) \(\sigma > 0\) of the log-normal distribution; the distribution becomes more skewed and broader as \(\sigma\) increases.

  • [limitLower] — The lower truncation limit \(x_\mathrm{min}\) of the log-normal distribution; when set, the distribution is renormalized over \([x_\mathrm{min}, x_\mathrm{max}]\) rather than \((0, \infty)\).

  • [limitUpper] — The upper truncation limit \(x_\mathrm{max}\) of the log-normal distribution; when set, the distribution is renormalized over \([x_\mathrm{min}, x_\mathrm{max}]\) rather than \((0, \infty)\).

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

haloSpinDistributionNbodyErrors

A halo spin distribution which modifies another spin distribution to account for the effects of particle noise errors in spins measured in N-body simulations.

Methods

  • distributionAveraged — Return the spin distribution function averaged over all halos above the given massLimit.

  • distributionFixedPoint — Return the spin distribution function at a fixed point in intrinsic mass and spin.

  • tabulate — Tabulate the spin distribution as a function of spin and halo mass. Ensure that the table spans the massRequired and spinRequireed if provided.

Parameters

  • [massParticle] — The mass (in \(\mathrm{M}_\odot\)) of a single N-body simulation particle, used together with the halo particle count to estimate measurement errors in the halo spin parameter arising from discrete particle sampling.

  • [particleCountMinimum] — Minimum number of particles per halo in the N-body simulation.

  • [energyEstimateParticleCountMaximum] — Maximum number of particles used in estimating the potential energy of halos. Set to a very large number if no such maximum was used.

  • [redshift] — Redshift at which the spin distribution should be evaluated.

  • [logNormalRange] (default 100.0d0) — The multiplicative range of the log-normal distribution used to model the distribution of the mass and energy terms in the spin parameter. Specifically, the lognormal distribution is truncated outside the range \((\lambda_\mathrm{m}/R,\lambda_\mathrm{m} R\), where \(\lambda_\mathrm{m}\) is the measured spin, and \(R=\)[logNormalRange]