.. _physics-mergerTreeOutputter: Merger Tree Outputters ====================== Class providing outputters for merger trees---objects that write merger tree and galaxy data to persistent storage at each requested output time. An outputter traverses the nodes of a merger tree and serializes the desired set of galaxy/halo properties to HDF5 or other formats. It also handles reduction across MPI processes (combining partial outputs from different CPU ranks) and finalization at the end of the simulation. The standard outputter writes node properties as defined by the active :galacticus-class:`nodePropertyExtractorClass` instances. **Default implementation:** ``mergerTreeOutputterStandard`` Methods ------- ``outputTree`` → ``void`` Serialize all galaxy and halo properties from the given ``tree`` to the output dataset corresponding to output index ``indexOutput`` at cosmic time ``time``. Optionally provide an ``outputType`` describing the type of output. * ``type (mergerTree ), intent(inout), target :: tree`` * ``integer (c_size_t ), intent(in ) :: indexOutput`` * ``double precision , intent(in ) :: time`` * ``type (enumerationOutputGroupTypeType), intent(in ), optional :: outputType`` ``outputNode`` → ``void`` Serialize galaxy and halo properties of the given individual ``node`` to the output dataset corresponding to output index ``indexOutput``. * ``type (treeNode ), intent(inout) :: node`` * ``integer(c_size_t ), intent(in ) :: indexOutput`` * ``type (enumerationOutputGroupTypeType), intent(in ), optional :: outputType`` ``finalize`` → ``void`` Finalize the output of merger trees, flushing any buffered data to persistent storage and performing any post-processing required after all trees have been serialized. Optionally provide an ``outputType`` describing the type of output. ``reduce`` → ``void`` Reduce the object onto another object of the class. * ``class(mergerTreeOutputterClass), intent(inout) :: reduced`` .. _physics-mergerTreeOutputterAnalyzer: ``mergerTreeOutputterAnalyzer`` ------------------------------- A merger tree outputter class which performs analyzes on the trees. .. _physics-mergerTreeOutputterFullState: ``mergerTreeOutputterFullState`` -------------------------------- A merger tree outputter class that outputs the full state of merger trees to allow later postprocessing. Complete tree data in output in raw binary format to the file specified as ``[fileName]``. This can be later re-read and post-processed using the :galacticus-class:`taskPostprocessForests` task class. **Parameters** * ``[fileName]`` — The name of the file to which state should be stored. .. _physics-mergerTreeOutputterHaloFourierProfiles: ``mergerTreeOutputterHaloFourierProfiles`` ------------------------------------------ A merger tree outputter class which outputs :math:`k`-space density profiles as needed for halo model calculations. A "``haloModel``" group is created in the Galacticus output file. This group contains the following: ``wavenumber`` A dataset giving the wavenumbers (in units of Mpc\ :math:`^{-1}`) at which all output power spectra are tabulated. The minimum and maximum wavenumbers to tabulate are determined by the ``[haloModelWavenumberMinimum]`` and ``[haloModelWavenumberMaximum]`` parameters respectively, while the number of points to tabulate in each decade of wavenumber is determined by the ``[haloModelWavenumberPointsPerDecade]`` parameter. ``powerSpectrum`` A dataset giving the linear theory power spectrum (in units of Mpc\ :math:`^3` normalized to :math:`z=0`) at each wavenumber specified in the ``wavenumber`` dataset. ``Output{i}/mergerTree{j}/fourierProfile{k}`` A dataset giving the Fourier transform of the dark matter halo density profile (dimensionless and normalized to unity at small wavenumber) for the node with index ``k`` in merger tree with index ``j`` at output number ``i``. Profiles are written only for nodes which are isolated, and are tabulated at the wavenumbers given in the ``wavenumber`` group. Note that wavenumbers are assumed to be comoving. Finally, each numbered output group is given two additional attributes, ``linearGrowthFactor`` and ``linearGrowthFactorLogDerivative`` which give the growth factor, :math:`D`, and its logarithmic derivative, :math:`\d \ln D / \d \ln a` at the output time. **Parameters** * ``[wavenumberPointsPerDecade]`` (default ``10``) — The number of points per decade in wavenumber at which to tabulate power spectra for the halo model. * ``[wavenumberMinimum]`` (default ``1.0d-3``) — The minimum wavenumber (in Mpc\ :math:`{^-1}`) at which to tabulate power spectra for the halo model. * ``[wavenumberMaximum]`` (default ``1.0d4``) — The maximum wavenumber (in Mpc\ :math:`{^-1}`) at which to tabulate power spectra for the halo model. .. _physics-mergerTreeOutputterMulti: ``mergerTreeOutputterMulti`` ---------------------------- A merger tree outputter which combines multiple other outputters. **Methods** * ``columnDescriptions`` — Return a description of the columns. * ``elementCount`` — Return the number of properties in the tuple. * ``extractDouble`` — Extract the double properties from the given ``node``. * ``extractInteger`` — Extract the integer properties from the given ``node``. * ``names`` — Return the names of the properties extracted. * ``descriptions`` — Return descriptions of the properties extracted. * ``unitsInSI`` — Return the units of the properties extracted in the SI system. * ``units`` — Return an object containing units metadata for the properties. * ``ranks`` — Return the ranks of the properties extracted. * ``metaData`` — Populate a hash with meta-data for the property. .. _physics-mergerTreeOutputterNull: ``mergerTreeOutputterNull`` --------------------------- A merger tree outputter which does no output. **Parameters** * ``[dimensionless]`` (default ``.true.``) — If true the null profile is considered to be dimensionless. .. _physics-mergerTreeOutputterStandard: ``mergerTreeOutputterStandard`` ------------------------------- The standard merger tree outputter which writes galaxy and halo properties to HDF5 output files at each requested output time during galaxy evolution. Output is organized into groups named by ``[outputsGroupName]``, with optional dataset reference output controlled by the ``[outputReferences]`` parameter. **(Default implementation)** **Methods** * ``factors`` — Compute factors needed for tidal tensor calculation. * ``tidalTensorGet`` — Get the tidal tensor. **Parameters** * ``[stellarDensityChangeBinaryMotion]`` (default ``.true.``) — If true, account for the change in stellar density caused by the black hole binary's motion through the stellar background when computing the hardening rate of the binary via stellar scattering. * ``[computeVelocityDispersion]`` (default ``.false.``) — Specifies whether or not the velocity dispersion of dark matter and stars should be computed using Jeans equation in black hole binary hardening calculations. If ``false``, then the velocity dispersions are assumed to equal the characteristic velocity of dark matter and spheroid. * ``[bondiHoyleAccretionEnhancementSpheroid]`` (default ``5.0d0``) — The factor by which the Bondi-Hoyle accretion rate of spheroid gas onto black holes is enhanced. * ``[bondiHoyleAccretionEnhancementHotHalo]`` (default ``6.0d0``) — The factor by which the Bondi-Hoyle accretion rate of hot halo gas onto black holes is enhanced. * ``[bondiHoyleAccretionEnhancementNuclearStarCluster]`` (default ``5.0d0``) — The factor by which the Bondi-Hoyle accretion rate of :term:`NSC` gas onto black holes is enhanced. * ``[bondiHoyleAccretionHotModeOnly]`` (default ``.true.``) — Determines whether accretion from the hot halo should only occur if the halo is in the hot accretion mode. * ``[bondiHoyleAccretionTemperatureSpheroid]`` (default ``1.0d2``) — The assumed temperature (in Kelvin) of gas in the spheroid when computing Bondi-Hoyle accretion rates onto black holes. * ``[bondiHoyleAccretionTemperatureNuclearStarCluster]`` (default ``1.0d2``) — The assumed temperature (in Kelvin) of gas in the :term:`NSC` when computing Bondi-Hoyle accretion rates onto black holes. * ``[instantaneousRecyclingApproximation]`` (default ``.false.``) — If true, then use an instantaneous recycling approximation when computing recycling rates. * ``[instantaneousYieldApproximation]`` (default ``.false.``) — If true, then use an instantaneous recycling approximation when computing yield rates. * ``[instantaneousEnergyInputApproximation]`` (default ``.false.``) — If true, then use an instantaneous recycling approximation when computing energy input rates. * ``[massLongLived]`` (default ``1.0d0``) — The mass below which stars are assumed to be infinitely long-lived in the instantaneous approximation for stellar evolution. * ``[ageEffective]`` (default ``13.8d0``) — The effective age to use for computing SNeIa yield when using the instantaneous stellar evolution approximation. * ``[recycledFraction]`` (default ``0.0d0``) — The recycled fraction to use in the instantaneous stellar evolution approximation. (If not specified it will be computed internally.) * ``[metalYield]`` (default ``0.0d0``) — The metal yield to use in the instantaneous stellar evolution approximation. (If not specified it will be computed internally.) * ``[integrationToleranceRelative]`` (default ``4.0d-3``) — The relative tolerance used when integrating the flux of stellar populations through filters. * ``[integrationToleranceDegrade]`` (default ``.false.``) — If ``true``, automatically degrade the relative tolerance used when integrating the flux of stellar populations through filters to ensure convergence. * ``[storeToFile]`` (default ``.true.``) — Specifies whether or not stellar populations luminosities (integrated under a filter) should be stored to file for rapid reuse. * ``[storeDirectory]`` (default ``inputPath(pathTypeDataDynamic)//'stellarPopulations'``) — Specifies the directory to which stellar populations luminosities (integrated under a filter) should be stored to file for rapid reuse. * ``[maximumAgeExceededIsFatal]`` (default ``.true.``) — Specifies whether or not exceeding the maximum available age of the stellar population is fatal. * ``[inactiveBoundMass]`` (default ``.false.``) — Specifies whether or not the bound mass variable of the standard satellite component is inactive (i.e. does not appear in any ODE being solved). * ``[odeToleranceAbsolute]`` (default ``0.01d0``) — The absolute tolerance used in solving differential equations for node evolution. * ``[odeToleranceRelative]`` (default ``1.0d-2``) — The relative tolerance used in solving differential equations for node evolution. * ``[odeJacobianStepSizeRelative]`` (default ``0.01d0``) — The relative step size to use when perturbing properties for purposes of computing a finite difference approximation to the ODE system Jacobian. * ``[odeAlgorithm]`` (default ``var_str('rungeKuttaCashKarp')``) — The algorithm to use in the ODE solver. * ``[odeAlgorithmNonJacobian]`` (default ``var_str('rungeKuttaCashKarp')``) — The algorithm to use in the ODE solver. * ``[odeLatentIntegratorType]`` (default ``var_str('trapezoidal')``) — The type of integrator to use for latent variables. * ``[odeLatentIntegratorOrder]`` (default ``15``) — The order of the integrator for latent variables. * ``[odeLatentIntegratorIntervalsMaximum]`` (default ``1000``) — The maximum number of intervals allowed in the integrator for latent variables. * ``[profileOdeEvolver]`` (default ``.false.``) — Specifies whether or not to profile the ODE evolver. * ``[reuseODEStepSize]`` (default ``.true.``) — If true, re-use the previous ODE step size when resuming the evolution of a node. Otherwise, the initial step size is not specified. * ``[enforceNonNegativity]`` (default ``.false.``) — If true, properties that are marked as non-negative (e.g. masses) will be evolved in such a way as to enforce that non-negativity. * ``[allTreesExistAtFinalTime]`` (default ``.true.``) — Specifies whether or not all merger trees are expected to exist at the final requested output time. If set to false, then trees which finish before a given output time will be ignored. * ``[dumpTreeStructure]`` (default ``.false.``) — Specifies whether merger tree structure should be dumped to a `dot `_ file. * ``[timestepHostRelative]`` (default ``0.1d0``) — The maximum allowed relative timestep for node evolution relative to the time of the host halo. * ``[timestepHostAbsolute]`` (default ``1.0d0``) — The maximum allowed absolute timestep (in Gyr) for node evolution relative to the time of the host halo. * ``[fractionTimestepSatelliteMinimum]`` (default ``0.0d0``) — The minimum fraction of the timestep imposed by the "satellite in host" criterion to evolve over. If the timestep allowed is smaller than this fraction, the actual timestep will be reduced to zero. This avoids forcing satellites to take a large number of very small timesteps, and instead defers evolving a satellite until a large timestep can be taken. * ``[backtrackToSatellites]`` (default ``.false.``) — If true, after successfully evolving a node with satellites, revisit the satellites and attempt to evolve them again. * ``[profileSteps]`` (default ``.false.``) — Specifies whether or not to profile the ODE evolver. * ``[outputsGroupName]`` (default ``var_str('Outputs')``) — The name of the HDF5 group to which outputs will be written. * ``[outputReferences]`` (default ``.false.``) — Specifies whether or not references to individual merger tree datasets should be output. * ``[xAxisLabel]`` (default ``var_str('x')``) — Axis label for the property (x-axis) of the output analysis. * ``[yAxisLabel]`` (default ``var_str('y')``) — Axis label for the function value (y-axis) of the output analysis. * ``[targetLabel]`` (default ``var_str('')``) — Label identifying the comparison/target dataset, if any. * ``[xAxisIsLog]`` (default ``.false.``) — Whether the x-axis should be displayed on a logarithmic scale. * ``[yAxisIsLog]`` (default ``.false.``) — Whether the y-axis should be displayed on a logarithmic scale. * ``[valueTarget]`` — Target dataset values to compare against, one per bin of the output analysis. * ``[covarianceTarget]`` — Target-dataset covariance matrix corresponding to the ``valueTarget`` array. * ``[initialMassForSupernovaeTypeII]`` (default ``8.0d0``) — The minimum mass that a star must have in order that is result in a Type II supernova. * ``[supernovaEnergy]`` (default ``1.0d51``) — The canonical energy released per supernova event (in ergs), used to compute the total mechanical energy input from the supernova population; the default value of :math:`10^{51}` erg corresponds to the standard core-collapse supernova energy. * ``[efficiency]`` (default ``0.1d0``) — Specifies the efficiency with which outflowing gas is stripped from the hot halo, following the prescription of :cite:author:`font_colours_2008` (:cite:year:`font_colours_2008`; i.e. this is the parameter :math:`\epsilon_\mathrm{strip}` in their eqn. 6).