.. _physics-posteriorSampleDffrntlEvltnProposalSize: Posterior Sampling Differential Evolution Proposal Size ======================================================= Class providing proposal sizes for differential evolution posterior samplers. Specifically, this class provides the proposal size parameter, :math:`\gamma` (the fraction of the vector connecting to chain state to be used as the proposal for another chain), for use in differential evolution simulations. Methods ------- ``gamma`` → ``double precision`` Return the proposal size parameter :math:`\gamma` given the current simulation state and convergence status, scaling the vector difference between two randomly selected chain states to form the differential evolution proposal. * ``class(posteriorSampleStateClass ), intent(inout) :: simulationState`` * ``class(posteriorSampleConvergenceClass), intent(inout) :: simulationConvergence`` .. _physics-posteriorSampleDffrntlEvltnProposalSizeAdaptive: ``posteriorSampleDffrntlEvltnProposalSizeAdaptive`` --------------------------------------------------- This class adaptively changes :math:`\gamma` in an attempt to maintain the acceptance rate at an acceptable level. The algorithm is controlled by the following sub-parameters: ``[gammaInitial]`` The initial value for :math:`\gamma`. ``[gammaFactor]`` The multiplicative factor by which :math:`\gamma` should be increased or decreased if the acceptance rate is out of range. ``[gammaMinimum]`` The smallest value allowed for :math:`\gamma`. ``[gammaMaximum]`` The largest value allowed for :math:`\gamma`. ``[acceptanceRateMinimum]`` The minimum acceptance rate to accept before reducing :math:`\gamma`. ``[acceptanceRateMaximum]`` The maximum acceptance rate to accept before reducing :math:`\gamma`. ``[updateCount]`` The number of steps between successive checks of the acceptance rate. **Parameters** * ``[timeStepMinimum]`` (default ``0.01d0``) — The minimum time step to use in tabulations of star formation histories [Gyr]. * ``[countTimeStepsMaximum]`` (default ``10_c_size_t``) — The maximum number of timesteps to track in any star formation history. * ``[massScaleAbsolute]`` (default ``1.0d0``) — The absolute tolerance scale (for the mass in each bin of star formation history) to use during ODE solution. * ``[metallicityBoundaries]`` — The metallicities corresponding to boundaries between metallicity bins to use when tabulating star formation histories. * ``[countMetallicities]`` (default ``10_c_size_t``) — The number of bins in metallicity to use when tabulating star formation histories. * ``[metallicityMinimum]`` (default ``1.0d-4``) — The upper limit to the metallicity in the lowest metallicity bin when tabulating star formation histories [Solar units]. * ``[metallicityMaximum]`` (default ``1.0d+1``) — The upper limit to the metallicity in the highest metallicity bin when tabulating star formation histories [Solar units]. * ``[logFileName]`` — The name of a file to which to log reports of adjustments to :math:`\gamma`. If empty, no reports are logged. * ``[gammaInitial]`` — The initial value of the proposal scaling parameter :math:`\gamma` used before the acceptance rate has been assessed and any adaptive adjustment has been made. * ``[gammaMinimum]`` — The minimum value to which the proposal scaling parameter :math:`\gamma` is permitted to be reduced during adaptive adjustment, preventing the step size from becoming vanishingly small. * ``[gammaMaximum]`` — The maximum value to which the proposal scaling parameter :math:`\gamma` is permitted to be increased during adaptive adjustment, preventing excessively large steps that would degrade acceptance rates. * ``[gammaAdjustFactor]`` — The multiplicative factor by which :math:`\gamma` is increased or decreased at each adaptation step when the current acceptance rate falls outside the target range. * ``[acceptanceRateMinimum]`` — The minimum acceptable chain acceptance rate; if the measured acceptance rate falls below this threshold :math:`\gamma` is reduced to produce smaller, more easily accepted proposals. * ``[acceptanceRateMaximum]`` — The maximum acceptable chain acceptance rate; if the measured acceptance rate exceeds this threshold :math:`\gamma` is increased to produce larger proposals that explore the posterior more efficiently. * ``[updateCount]`` — The number of steps between potential updates of the proposal size. * ``[outliersInAcceptanceRate]`` (default ``.true.``) — The number of steps between potential updates of the proposal size. * ``[appendLog]`` (default ``.false.``) — If true, append to the existing log file, otherwise overwrite. * ``[restoreFromLog]`` (default ``.false.``) — If true, restore the value of :math:`\gamma` from the log file. * ``[flushLog]`` (default ``.false.``) — If true, logs are flushed to file after every update. * ``[exponentInitial]`` — The initial value of the temperature-scaling exponent :math:`\alpha` used before any adaptive adjustment based on the acceptance-rate gradient has been applied. * ``[exponentMinimum]`` — The minimum value to which the temperature-scaling exponent :math:`\alpha` may be reduced during adaptive adjustment, preventing the temperature dependence from becoming negligibly weak. * ``[exponentMaximum]`` — The maximum value to which the temperature-scaling exponent :math:`\alpha` may be increased during adaptive adjustment, preventing the proposal size from growing too steeply with temperature. * ``[exponentAdjustFactor]`` — The additive increment by which the temperature-scaling exponent :math:`\alpha` is increased or decreased at each adaptation step when the acceptance-rate gradient falls outside the target range. * ``[gradientMinimum]`` — The minimum acceptable gradient of acceptance rate with log-temperature. * ``[gradientMaximum]`` — The maximum acceptable gradient of acceptance rate with log-temperature. * ``[updateCount]`` — The number of steps between potential updates of the temperature exponent. .. _physics-posteriorSampleDffrntlEvltnProposalSizeFixed: ``posteriorSampleDffrntlEvltnProposalSizeFixed`` ------------------------------------------------ A posterior sampling differential evolution proposal size class in which the proposal size is a fixed value :math:`\gamma=`\ ``[gamma]``. **Parameters** * ``[mass]`` (default ``100.0d0``) — The fixed mass (in :math:`\mathrm{M}_\odot`) assigned to all newly-formed seed black holes in this implementation, representing the initial black hole mass when a halo first forms a central black hole. * ``[spin]`` (default ``0.0d0``) — The dimensionless spin parameter (between :math:`-1` and :math:`+1`) assigned to all newly-formed seed black holes, where :math:`0` corresponds to a non-rotating Schwarzschild black hole and :math:`\pm 1` to a maximally rotating Kerr black hole. * ``[fraction]`` (default ``0.01d0``) — The fixed fraction :math:`f_\mathrm{outflow}` of the stellar energy input rate (normalized to a canonical :math:`1\,\mathrm{M}_\odot` population) that drives gas outflows, setting the mass loading factor for stellar feedback in the galaxy. * ``[escapeFraction]`` (default ``0.006d0``) — Escape fraction of ionizing photons from young HII regions. * ``[ageLimit]`` (default ``0.03d0``) — The age beyond which all ionizing photons are assumed to escape from HII regions. * ``[timescale]`` (default ``1.0d0``) — The timescale for star formation in the fixed timescale model. * ``[rateStarFormation]`` (default ``1.0d9``) — The rate of star formation in units of :math:`\mathrm{M}_\odot \hbox{Gyr}^{-1}`. * ``[proposalSize]`` — The fixed value of the proposal scaling parameter :math:`\gamma` used to scale the vector difference between two randomly selected chain states when forming differential evolution proposals. * ``[exponentValue]`` — The fixed value of the temperature-scaling exponent :math:`\alpha` by which the proposal size :math:`\gamma` is scaled as :math:`\gamma \propto T^{\alpha}` in tempered differential evolution runs. * ``[massResolution]`` (default ``5.0d9``) — The mass resolution to use when building merger trees. * ``[rootVariance]`` — The root variance of the random error distribution. * ``[velocityRadial]`` (default ``-0.90d0``) — The radial velocity (in units of the host virial velocity) to used for the fixed virial orbits distribution. Default value matches approximate peak in the distribution of :cite:t:`benson_orbital_2005`. * ``[velocityTangential]`` (default ``0.75d0``) — The tangential velocity (in units of the host virial velocity) to used for the fixed virial orbits distribution. Default value matches approximate peak in the distribution of :cite:t:`benson_orbital_2005`. * ``[rateCoefficient]`` — The rate coefficient (in units of cm\ :math:`^3` s\ :math:`^{-1}`) for radiative recombination. * ``[gamma]`` (default ``0.67d0``) — The multiplicative factor, :math:`\gamma`, used to compute the cooling coefficient. * ``[fractionLossAngularMomentum]`` (default ``0.3d0``) — Specifies the fraction of angular momentum that is lost from cooling/infalling gas. * ``[concentration]`` — The fixed NFW concentration parameter :math:`c = r_\mathrm{virial}/r_\mathrm{scale}` assigned to all halos regardless of mass or redshift, representing the ratio of the virial radius to the scale radius of the dark matter density profile. * ``[metallicity]`` — The metallicity (relative to Solar) of the :term:`IGM`. * ``[factor]`` (default ``sqrt(0.5d0)``) — The ratio of galaxy radius to :math:`\lambda r_\mathrm{vir}` in the "fixed" galactic structure radius solver algorithm. This will be applied to any component for which no component-specific value is provided. * ``[factorDisk]`` (default ``sqrt(0.5d0)``) — The ratio of galaxy radius to :math:`\lambda r_\mathrm{vir}` in the "fixed" galactic structure radius solver algorithm for disks. This will override the generic value supplied by ``[factor]`` for disks. * ``[factorSpheroid]`` (default ``sqrt(0.5d0)``) — The ratio of galaxy radius to :math:`\lambda r_\mathrm{vir}` in the "fixed" galactic structure radius solver algorithm for spheroids. This will override the generic value supplied by ``[factor]`` for spheroids. * ``[radiusFixed]`` (default ``var_str('virial')``) — The radius to use in the "fixed" galactic structure radius solver algorithm. Allowed options are "virial" and "turnaround". * ``[overdensity]`` — The fixed linear overdensity :math:`\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]`` (default ``0.0d0``) — The radius of the sphere used to determine the variance in the environmental density. * ``[massEnvironment]`` (default ``1.0d15``) — The mass within the sphere sphere used to determine the variance in the environmental density. * ``[densityContrastValue]`` (default ``200.0d0``) — The virial density contrast to use in the fixed value model. * ``[densityType]`` (default ``var_str('critical')``) — The reference density to use in the fixed value virial density contrast model. Either of ``critical`` and ``mean`` are allowed. * ``[turnAroundOverVirialRadius]`` (default ``2.0d0``) — The ratio of the turnaround to virial radii in the fixed value model. * ``[criticalOverdensity]`` (default ``(3.0d0/20.0d0)*(12.0d0*Pi)**(2.0d0/3.0d0)``) — The value to use for the critical overdensity for collapse of dark matter halos when using a fixed value.