.. _physics-nbodyHaloMassError: N-body Halo Mass Errors ======================= Class providing models of measurement errors on dark matter halo masses in N-body simulations ---the fractional uncertainty :math:`\delta M/M` arising from finite particle sampling, halo finder systematics, or projection effects. Methods return the fractional mass error and the correlation between mass errors of pairs of halos. These errors are used when comparing Galacticus halo mass function predictions with N-body halo counts, or when fitting model parameters to clustering or abundance statistics derived from N-body simulations. **Default implementation:** ``nbodyHaloMassErrorNull`` Methods ------- ``errorFractional`` → ``double precision`` Return the fractional error on the mass of an N-body halo corresponding to the given ``node``. * ``type(treeNode), intent(inout) :: node`` ``correlation`` → ``double precision`` Return the correlation in the error on the mass of a pair of N-body halos corresponding to the given ``node1`` and ``node2``. * ``type(treeNode), intent(inout) :: node1, node2`` ``errorZeroAlways`` → ``logical`` Return ``true`` if the mass error is always zero for any halo. .. _physics-nbodyHaloMassErrorFriendsOfFriends: ``nbodyHaloMassErrorFriendsOfFriends`` -------------------------------------- An N-body dark matter halo mass error class that models the statistical mass errors in halos identified by friends-of-friends group finding algorithms, using a fitting function calibrated against simulations. The simulation particle mass required for the error model is set by the ``[massParticle]`` parameter. **Parameters** * ``[massParticle]`` — The mass of the particle in the N-body simulation in which friends-of-friends groups were found. * ``[linkingLength]`` (default ``0.2d0``) — The friends-of-friends linking length algorithm to use in computing virial density contrast. * ``[densityRatio]`` (default ``4.688d0``) — The ratio of mean virial density to density at the virial radius to assume when setting virial density contrasts in the friends-of-friends model. .. _physics-nbodyHaloMassErrorNull: ``nbodyHaloMassErrorNull`` -------------------------- A null N-body dark matter halo mass error class in which the fractional mass error is identically zero for all halos and at all epochs---i.e., it assumes that N-body halo masses are known perfectly with no measurement uncertainty. This is appropriate when mass errors are negligible or when error effects have already been accounted for by other means. **(Default implementation)** **Parameters** * ``[dimensionless]`` (default ``.true.``) — If true the null profile is considered to be dimensionless. .. _physics-nbodyHaloMassErrorPowerLaw: ``nbodyHaloMassErrorPowerLaw`` ------------------------------ An N-body dark matter halo mass error class in which the fractional mass uncertainty is modeled as a power-law function of halo mass, useful for parameterizing simulation resolution effects. The model is characterized by the normalization parameters :math:`\sigma_{12}` and :math:`\sigma_\infty`, and the power-law exponent with respect to mass. Optionally, correlations between mass errors of pairs of halos may be modeled as a power-law in the ratio of halo masses and expansion factors: :math:`C_{12} = C_0 [M_2/M_1]^\alpha [(1+z_2)/(1+z_1)]^\beta`. If this option is disabled (the default), a trivial correlation model is used in which the correlation is unity for halos with identical mass and time, and zero otherwise. **Parameters** * ``[exponent]`` (default ``1.73d0``) — Exponent of the differential luminosity function. * ``[rateHydrogenIonizingPhotonsMinimum]`` (default ``1.0d48``) — The minimum ionizing photon production rate (:math:`Q_\mathrm{H,min}`, in photons/s) below which the power-law HII region luminosity function is truncated to zero. * ``[rateHydrogenIonizingPhotonsMaximum]`` (default ``huge(0.0d0)``) — The maximum ionizing photon production rate (:math:`Q_\mathrm{H,max}`, in photons/s) above which the power-law HII region luminosity function is truncated to zero. * ``[exponent]`` (default ``1.0d0``) — Halo masses will be (pseudo-)uniformly distributed in :math:`[\log(M)]^{1/(1+\alpha)}` where :math:`\alpha=`\ ``exponent``. * ``[wavelengthMinimum]`` — The minimum wavelength (in units of \AA) for the power-law spectrum. * ``[wavelengthMaximum]`` — The maximum wavelength (in units of \AA) for the power-law spectrum. * ``[exponent]`` — The exponent of the power-law spectrum. * ``[normalization]`` — The normalization (in units of :math:`L_\odot / \AA`) of the power-law spectrum. * ``[normalization]`` — Parameter :math:`\sigma_{12}` appearing in model for random errors in the halo mass function. * ``[fractionalErrorHighMass]`` — Parameter :math:`\sigma_\infty` appearing in model for random errors in the halo mass function. * ``[exponent]`` — Parameter :math:`\gamma` appearing in model for random errors in the halo mass function. Specifically, the fractional error is given by :math:`\sigma(M) = \left[ \sigma^2_{12} \left({M_\mathrm{halo} \over 10^{12}\mathrm{M}_\odot}\right)^{2\gamma} + \sigma^2_\infty \right]^{1/2}`, where :math:`\sigma_{12}=`\ ``[normalization]`` and :math:`\gamma=`\ ``[exponent]``. * ``[correlationModelTrivial]`` (default ``.true.``) — If true, the correlation between mass errors of pairs of halos is unity for halos with identical mass and time, and zero otherwise. If false, a power-law correlation model in mass ratio and expansion factor ratio is used instead. * ``[correlationNormalization]`` (default ``0.0d0``) — Variable :math:`C_0` in the model for the correlation between halo mass errors: :math:`C_{12} = C_0 [M_2/M_1]^\alpha [(1+z_2)/(1+z_1)]^\beta`. * ``[correlationMassExponent]`` (default ``0.0d0``) — Variable :math:`\alpha` in the model for the correlation between halo mass errors: :math:`C_{12} = C_0 [M_2/M_1]^\alpha [(1+z_2)/(1+z_1)]^\beta`. * ``[correlationRedshiftExponent]`` (default ``0.0d0``) — Variable :math:`\beta` in the model for the correlation between halo mass errors: :math:`C_{12} = C_0 [M_2/M_1]^\alpha [(1+z_2)/(1+z_1)]^\beta`. * ``[radiusLow]`` (default ``+0.0154d0``) — The low-mass limit of the characteristic scale radius :math:`r_0` (in Mpc) in the power-law scale radius model, giving the scale radius normalization for low-mass halos as a function of peak height and expansion factor. * ``[radiusHigh]`` (default ``+0.0962d0``) — The high-mass limit of the characteristic scale radius :math:`r_1` (in Mpc) in the power-law scale radius model, giving the scale radius normalization for high-mass halos. * ``[radiusTransition]`` (default ``+1.2137d0``) — The peak height :math:`\nu` at which the characteristic scale radius transitions between its low-mass and high-mass limiting values in the power-law scale radius model. * ``[radiusWidth]`` (default ``+0.5482d0``) — The parameter :math:`\Delta r` in the power-law scale radius model. * ``[massLow]`` (default ``+0.3895d0``) — The parameter :math:`\alpha_0` in the power-law scale radius model. * ``[massHigh]`` (default ``+0.2984d0``) — The parameter :math:`\alpha_1` in the power-law scale radius model. * ``[massTransition]`` (default ``-0.2583d0``) — The parameter :math:`\alpha_\nu` in the power-law scale radius model. * ``[massWidth]`` (default ``+16.6050d0``) — The parameter :math:`\Delta \alpha` in the power-law scale radius model. * ``[expansionFactorLow]`` (default ``-0.6977d0``) — The parameter :math:`\beta_0` in the power-law scale radius model. * ``[expansionFactorHigh]`` (default ``+0.7972d0``) — The parameter :math:`\beta_1` in the power-law scale radius model. * ``[expansionFactorTransition]`` (default ``+0.5395d0``) — The parameter :math:`\beta_\nu` in the power-law scale radius model. * ``[expansionFactorWidth]`` (default ``+0.4282d0``) — The parameter :math:`\Delta \beta` in the power-law scale radius model. * ``[scatter]`` (default ``+0.1513d0``) — The scatter (in dex) in the scale radius at fixed halo mass and redshift in the power-law scale radius model, representing the intrinsic halo-to-halo variation in concentration. * ``[index]`` (default ``0.9649d0``) — The index of the power-law primordial power spectrum. * ``[running]`` (default ``0.0d0``) — The running, :math:`\d n_\mathrm{s} / \d \ln k`, of the power spectrum index. * ``[runningRunning]`` (default ``0.0d0``) — The running-of-the-running, :math:`\d^2 n_\mathrm{s} / \d \ln k^2`, of the power spectrum index. * ``[wavenumberReference]`` (default ``1.0d0``) — When a running power spectrum index is used, this is the wavenumber, :math:`k_\mathrm{ref}`, at which the index is equal to ``[index]``. * ``[runningSmallScalesOnly]`` (default ``.false.``) — If ``true`` then the index runs only for :math:`k > k_\mathrm{ref}`, for smaller :math:`k` the index is constant. .. _physics-nbodyHaloMassErrorSOHaloFinder: ``nbodyHaloMassErrorSOHaloFinder`` ---------------------------------- An N-body dark matter halo mass error class that models the statistical errors in halo masses measured by spherical overdensity halo finders, accounting for shot noise due to the finite particle mass of the simulation. The simulation particle mass is set by the ``[massParticle]`` parameter. **Parameters** * ``[massParticle]`` — Mass of particle in the simulation to which the spherical overdensity algorithm was applied. .. _physics-nbodyHaloMassErrorTrenti2010: ``nbodyHaloMassErrorTrenti2010`` -------------------------------- An N-body dark matter halo mass error class that models correlated halo mass errors between different halos and epochs using the fitting formula of :cite:t:`trenti_how_2010`. The simulation particle mass and correlation model parameters :math:`C_0`, :math:`\alpha`, and :math:`\beta` are set via the corresponding input parameters. This class is implemented as a specialization of the :galacticus-class:`nbodyHaloMassErrorPowerLaw` class, with the parent class parameters set to reproduce the :cite:t:`trenti_how_2010` fractional error formula and to enable the power-law correlation model. **Parameters** * ``[massParticle]`` — The mass of the particle in the N-body simulation in which halos were found. * ``[correlationNormalization]`` (default ``0.0d0``) — Variable :math:`C_0` in the model for the correlation between halo mass errors: :math:`C_{12} = C_0 [M_2/M_1]^\alpha [(1+z_2)/(1+z_1)]^\beta`. * ``[correlationMassExponent]`` (default ``0.0d0``) — Variable :math:`\alpha` in the model for the correlation between halo mass errors: :math:`C_{12} = C_0 [M_2/M_1]^\alpha [(1+z_2)/(1+z_1)]^\beta`. * ``[correlationRedshiftExponent]`` (default ``0.0d0``) — Variable :math:`\beta` in the model for the correlation between halo mass errors: :math:`C_{12} = C_0 [M_2/M_1]^\alpha [(1+z_2)/(1+z_1)]^\beta`.