.. _physics-mergerTreeBuildMasses: Merger Tree Build Masses ======================== Class providing methods for generating the set of root halo masses for which merger trees will be built in a Galacticus simulation. Each implementation returns an array of masses (and associated weights or mass intervals) sampled from a chosen distribution---typically the halo mass function---at the desired output redshift. The mass sampling determines which part of the halo mass function is represented and how accurately the galaxy population is sampled. **Default implementation:** ``mergerTreeBuildMassesSampledDistributionUniform`` Methods ------- ``construct`` → ``void`` Returns a set of merger tree masses (and either their weights, or corresponding mass interval) to be built. * ``double precision, intent(in ) :: time`` * ``double precision, intent( out), allocatable, dimension(:) :: mass, massMinimum, massMaximum, weight`` .. _physics-mergerTreeBuildMassesFixedMass: ``mergerTreeBuildMassesFixedMass`` ---------------------------------- A merger tree masses class which assigns fixed, user-specified halo masses to merger trees for galaxy formation modeling. Multiple mass values and tree counts can be provided, with ``[masses]``, ``[treeCount]``, and, optionally, ``[radii]`` controlling the halo mass, number of trees per mass, and the reference radius within which masses are defined. **Parameters** * ``[massTree]`` (real; default ``spread(1.0d12,1,fixedHalosCount)``) — Specifies the masses of halos to use when building halos. * ``[treeCount]`` (integer; default ``spread(1,1,fixedHalosCount)``) — Specifies the number of halos to use when building halos. * ``[radiusTree]`` (real; default ``spread(-1.0d0,1,fixedHalosCount)``) — Specifies the radii within which halo masses are specified when building halos. * ``[massIntervalFractional]`` (real; default ``0.1d0``) — The fractional mass interval occupied by the trees. Where the intervals of trees of different mass would overlap this interval will be truncated. .. _physics-mergerTreeBuildMassesRead: ``mergerTreeBuildMassesRead`` ----------------------------- A merger tree masses class which samples masses from a distribution. **Methods** * ``tabulate`` — Tabulate the virial density contrast as a function of mass and time. * ``restoreTable`` — Restore a tabulated solution from file. * ``storeTable`` — Store a tabulated solution to file. .. _physics-mergerTreeBuildMassesReadHDF5: ``mergerTreeBuildMassesReadHDF5`` --------------------------------- A merger tree build masses class which reads masses from an HDF5 file. The HDF5 file should have the following structure: .. code-block:: none HDF5 { GROUP '/' { DATASET 'treeRootMass' { DATATYPE H5T_IEEE_F64BE DATASPACE SIMPLE { ( * ) / ( * ) } } DATASET 'treeWeight' { DATATYPE H5T_IEEE_F64BE DATASPACE SIMPLE { ( * ) / ( * ) } } } } where the ``treeRootMass`` dataset contains the mass (in Solar masses) of the root halo of a tree to generate, and the (optional) ``treeWeight`` dataset contains the weight (in units of Mpc\ :math:`^{-3}`) to assign to each tree. **Parameters** * ``[fileName]`` (string) — The name of the file from which to read merger tree masses. * ``[massIntervalFractional]`` (real; default ``0.1d0``) — The fractional mass interval occupied by the trees. Where the intervals of trees of different mass would overlap this interval will be truncated. .. _physics-mergerTreeBuildMassesReadXML: ``mergerTreeBuildMassesReadXML`` -------------------------------- A merger tree build masses class which reads masses from an XML file. The XML file should have the following form: .. code-block:: none 13522377303.5998 19579530191.8709 21061025282.9613 . . . 13522377303.5998 19579530191.8709 21061025282.9613 . . . where each ``treeRootMass`` element gives the mass (in Solar masses) of the root halo of a tree to generate, and the (optional) ``treeWeight`` elements give the corresponding weight (in units of Mpc\ :math:`^{-3}`) to assign to each tree. **Parameters** * ``[fileName]`` (string) — The name of the file from which to read merger tree masses. * ``[massIntervalFractional]`` (real; default ``0.1d0``) — The fractional mass interval occupied by the trees. Where the intervals of trees of different mass would overlap this interval will be truncated. .. _physics-mergerTreeBuildMassesReplicate: ``mergerTreeBuildMassesReplicate`` ---------------------------------- A merger tree masses class which replicates the halo mass list from a delegate class a specified number of times, effectively increasing statistical sampling of the halo population. The number of replications is controlled by the ``[replicationCount]`` parameter, multiplying the effective tree count for improved sampling statistics. **Parameters** * ``[replicationCount]`` (integer) — The number of times to replicate each halo mass. .. _physics-mergerTreeBuildMassesSampledDistribution: ``mergerTreeBuildMassesSampledDistribution`` -------------------------------------------- A merger tree masses class which samples halo masses from a user-specified distribution function to populate the halo mass function. The mass range is bounded by ``[massTreeMinimum]`` and ``[massTreeMaximum]``, with the sampling density set by ``[treesPerDecade]`` trees per decade of halo mass. **Methods** * ``tabulate`` — Tabulate the virial density contrast as a function of mass and time. * ``restoreTable`` — Restore a tabulated solution from file. * ``storeTable`` — Store a tabulated solution to file. .. _physics-mergerTreeBuildMassesSampledDistributionPseudoRandom: ``mergerTreeBuildMassesSampledDistributionPseudoRandom`` -------------------------------------------------------- A merger tree masses class which samples masses from a distribution using pseudo-random sampling. **Parameters** * ``[massTreeMinimum]`` (real; default ``1.0d10``) — The minimum mass of merger tree base halos to consider when sampled masses from a distribution, in units of :math:`M_\odot`. * ``[massTreeMaximum]`` (real; default ``1.0d15``) — The maximum mass of merger tree base halos to consider when sampled masses from a distribution, in units of :math:`M_\odot`. * ``[treesPerDecade]`` (real; default ``10.0d0``) — The number of merger trees masses to sample per decade of base halo mass. .. _physics-mergerTreeBuildMassesSampledDistributionQuasiRandom: ``mergerTreeBuildMassesSampledDistributionQuasiRandom`` ------------------------------------------------------- A merger tree masses class which samples masses from a distribution using quasi-random sampling. **Parameters** * ``[massTreeMinimum]`` (real; default ``1.0d10``) — The minimum mass of merger tree base halos to consider when sampled masses from a distribution, in units of :math:`M_\odot`. * ``[massTreeMaximum]`` (real; default ``1.0d15``) — The maximum mass of merger tree base halos to consider when sampled masses from a distribution, in units of :math:`M_\odot`. * ``[treesPerDecade]`` (real; default ``10.0d0``) — The number of merger trees masses to sample per decade of base halo mass. .. _physics-mergerTreeBuildMassesSampledDistributionUniform: ``mergerTreeBuildMassesSampledDistributionUniform`` --------------------------------------------------- A merger tree masses class which samples masses from a distribution uniformly. **(Default implementation)** **Parameters** * ``[massTreeMinimum]`` (real; default ``1.0d10``) — The minimum mass of merger tree base halos to consider when sampled masses from a distribution, in units of :math:`M_\odot`. * ``[massTreeMaximum]`` (real; default ``1.0d15``) — The maximum mass of merger tree base halos to consider when sampled masses from a distribution, in units of :math:`M_\odot`. * ``[treesPerDecade]`` (real; default ``10.0d0``) — The number of merger trees masses to sample per decade of base halo mass. .. _physics-mergerTreeBuildMassesSubset: ``mergerTreeBuildMassesSubset`` ------------------------------- A merger tree masses class which extracts a contiguous subset of halo masses from a delegate class, enabling parallel processing of mass lists across multiple jobs. The range of entries to extract is specified by ``[subsetBegin]`` and ``[subsetEnd]``, both indexed from 1. **Parameters** * ``[subsetBegin]`` (integer) — The first entry in the subset (indexed from 1). * ``[subsetEnd]`` (integer) — The last entry in the subset (indexed from 1). .. _physics-mergerTreeBuildMassesUnion: ``mergerTreeBuildMassesUnion`` ------------------------------ A merger tree masses class which constructs the union of other classes. **Methods** * ``initialize`` — Initialize the set of output times.