Star Formation Histories¶
Class providing models for recording and outputting the star formation history of galaxy components —the star formation rate as a function of lookback time, binned by stellar age and metallicity. Implementations define how ages are discretized (fixed globally, fixed per output, or arbitrarily varying between galaxies), and provide methods to create, accumulate, and retrieve the history array. These histories are used to compute spectral energy distributions by convolving with stellar population templates, and for writing the time-resolved star formation record to output files.
Default implementation: starFormationHistoryNull
Methods¶
create→voidCreate and initialize the star formation history object for the given node, allocating the age and metallicity bins spanning from the specified start time to the optional end time.
type (treeNode), intent(inout), target :: nodetype (history ), intent(inout) :: historyStarFormationdouble precision , intent(in ) :: timeBegindouble precision , intent(in ), optional :: timeEnd
scales→voidSet ODE solver absolute scales for a star formation history object.
type (history ), intent(inout) :: historyStarFormationtype (treeNode ), intent(inout) :: nodedouble precision , intent(in ) :: massStellar, massGastype (abundances), intent(in ) :: abundancesStellar
rate→voidRecord the instantaneous rate of star formation in the history object for the given node, accumulating the stellar mass formed at the current time step into the appropriate age and metallicity bins.
type (treeNode ), intent(inout) :: nodetype (history ), intent(inout) :: historyStarFormationtype (abundances), intent(in ) :: abundancesFueldouble precision , intent(in ) :: rateStarFormation
metallicityBoundaries→double precision, allocatable, dimension(:)Return a (zero-indexed) array of metallicity boundaries for this history.
times→double precision, allocatable, dimension(:)Return an array of times for this history if the tabulation in time is static per output.
type (treeNode), intent(inout), optional :: nodeinteger (c_size_t), intent(in ), optional :: indexOutputtype (history ), intent(in ), optional :: starFormationHistorylogical , intent(in ), optional :: allowTruncationdouble precision , intent( out), optional :: timeStart
timeNext→double precisionReturn the next time at which the star formation history bin structure changes for the given node, indicating when the history must be updated or extended to cover the next time interval.
type(treeNode), intent(inout) :: nodetype(history ), intent(in ) :: starFormationHistory
masses→double precision, allocatable, dimension(:,:)Return a 2D array (indexed by age bin and metallicity bin) of stellar masses formed for the given node’s star formation history, representing the cumulative stellar mass in each age-metallicity cell.
type (treeNode), intent(inout) :: nodetype (history ), intent(in ) :: starFormationHistorylogical , intent(in ), optional :: allowTruncation
ageDistribution→type(enumerationStarFormationHistoryAgesType)Return an enumeration member indicating what may be assumed about the distribution of ages in the star formation histories.
update→voidUpdate the star formation history after an output time is reached.
type (treeNode), intent(inout), target :: nodeinteger(c_size_t), intent(in ) :: indexOutputtype (history ), intent(inout) :: historyStarFormation
rangeIsSufficient→logicalReturn true if the star formation history spans a sufficient range of times.
type(history), intent(in ) :: starFormationHistory, rangeHistory
extend→voidExtend a star formation history to span a sufficient range of times.
type (history), intent(inout) :: starFormationHistorydouble precision , intent(in ), dimension(:) :: times
move→voidMove (transfer and reset) the star formation history from one node into another, incrementing the destination history with the source data and then resetting the source to zero, as needed during galaxy mergers.
type(treeNode), intent(inout) :: node1 , node2type(history ), intent(inout) :: starFormationHistory1, starFormationHistory2
starFormationHistoryAdaptive¶
A star formation histories class which records star formation split by metallicity. The star formation history is tabulated on a grid of time and metallicity. A minimum size for the time bins is specified via \(\Delta t=\)[timeStepMinimum], and a maximum number of time bins allowed is specified via [countTimeStepsMaximum]. For the first output time, a set of timesteps starting from \(t=0\) to the output time is generated with size \(\Delta t\). If the number of steps exceeds [countTimeStepsMaximum] then one pair of consecutive steps are merged. The pair merged is chosen to minimize the global increase in the metric \((t_{i+1}-t_i)/(t\mathrm{out}-t_i)\) where \(t_i\) are the current timesteps and \(t_\mathrm{out}\) is the output time. This process is repeated until the number of timesteps is reduced to [countTimeStepsMaximum]. This results in timesteps distributed approximately uniformly in the logarithm of the age of the timestep.
For subsequent output times, the prior set of times is first extended, in steps of \(\Delta t\), to reach the new output time, and then, if necessary, the same timestep consolidation algorithm is applied to reduce the number of steps to [countTimeStepsMaximum]. Any accumulated star formation in the time bins used for the previous output time are accumulated over each consolidated pair of bins.
This approach ensures that the number of timesteps never exceeds [countTimeStepsMaximum], results in timesteps that are small close to the output time, but increase (approximately logarithmically) for times earlier than the output time, and allows simple (interpolation-free) consolidation of accumulated star formation from the previous output time’s timesteps to those of the current output time.
The time associated with each bin is the maximum time for which star formation will be accumulated to the bin, with the minimum time corresponding to the value associated with the previous bin (or \(t=0\) for the first bin).
The metallicity bins are arranged logarithmically in metallicity with [countMetallicities] bins between [metallicityMinimum] and [metallicityMaximum] (specified in Solar units). Note that the metallicity associated with each bin is the maximum metallicity for that bin, with the minimum metallicity corresponding to the value associated with the previous bin (or zero metallicity for the first bin). Note that a final bin, extending to infinite metallicity, is always added automatically. If [countMetallicities]\(=0\) is set, then the star formation history is not split by metallicity (i.e. a single metallicity bin encompassing all metallicities from zero to infinity is used). Alternatively, specific metallicity bin boundaries can be set via the [metallicityBoundaries] parameter—a final boundary corresponding to infinity is always added automatically.
Parameters
[timeStepMinimum](default0.01d0) — The minimum time step to use in tabulations of star formation histories [Gyr].[countTimeStepsMaximum](default10_c_size_t) — The maximum number of timesteps to track in any star formation history.[massScaleAbsolute](default1.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](default10_c_size_t) — The number of bins in metallicity to use when tabulating star formation histories.[metallicityMinimum](default1.0d-4) — The upper limit to the metallicity in the lowest metallicity bin when tabulating star formation histories [Solar units].[metallicityMaximum](default1.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 \(\gamma\). If empty, no reports are logged.[gammaInitial]— The initial value of the proposal scaling parameter \(\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 \(\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 \(\gamma\) is permitted to be increased during adaptive adjustment, preventing excessively large steps that would degrade acceptance rates.[gammaAdjustFactor]— The multiplicative factor by which \(\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 \(\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 \(\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 \(\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 \(\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 \(\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 \(\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 \(\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.
starFormationHistoryFixedAges¶
A star formation histories class which records star formation in logarithmically-sized time bins of fixed age and split by metallicity. The minimum age is specified via the [ageMinimum] parameter (the maximum age is always the age of the universe), with the number of ages specified via [countAges]. (One additional bin, at age zero, is always added.) This class is intended for use with lightcone output where the lightcone crossing times for each node can be computed in advance. One star formation history is computed for each lightcone crossing.
The time associated with each bin is the maximum time for which star formation will be accumulated to the bin, with the minimum time corresponding to the value associated with the previous bin (or \(t=0\) for the first bin).
The metallicity bins are arranged logarithmically in metallicity with [countMetallicities] bins between [metallicityMinimum] and [metallicityMaximum] (specified in Solar units). Note that the metallicity associated with each bin is the maximum metallicity for that bin, with the minimum metallicity corresponding to the value associated with the previous bin (or zero metallicity for the first bin). Note that a final bin, extending to infinite metallicity, is always added automatically. If [countMetallicities]\(=0\) is set, then the star formation history is not split by metallicity (i.e. a single metallicity bin encompassing all metallicities from zero to infinity is used). Alternatively, specific metallicity bin boundaries can be set via the [metallicityBoundaries] parameter—a final boundary corresponding to infinity is always added automatically.
Parameters
[ageMinimum](default0.01d0) — The minimum age to use in tabulations of star formation histories [Gyr].[countAges](default10_c_size_t) — The maximum number of ages to track in any star formation history.[massScaleAbsolute](default1.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](default10_c_size_t) — The number of bins in metallicity to use when tabulating star formation histories.[metallicityMinimum](default1.0d-4) — The upper limit to the metallicity in the lowest metallicity bin when tabulating star formation histories [Solar units].[metallicityMaximum](default1.0d+1) — The upper limit to the metallicity in the highest metallicity bin when tabulating star formation histories [Solar units].
starFormationHistoryInSitu¶
A star formation histories class which records in situ star formation. Another starFormationHistory object is used to provide the base star formation history. This class tracks a second copy which is identical but excludes any star formation from merging galaxies.
starFormationHistoryMetallicitySplit¶
A star formation histories class which records star formation split by metallicity. The star formation history is tabulated on a grid of time and metallicity. The binning in time is chosen such that bins are at most of size [timeStep] between the time at which each galaxy formed and the final output time, and at most of size [timeStepFine] in the period [timeFine] prior to each output time (all times specified in Gyr). The allows fine binning of recent star formation just prior to each output.
The time associated with each bin is the maximum time for which star formation will be accumulated to the bin, with the minimum time corresponding to the value associated with the previous bin (or \(t=0\) for the first bin).
The metallicity binning is arranged logarithmically in metallicity with [countMetallicities] bins between [metallicityMinimum] and [metallicityMaximum] (specified in Solar units). The metallicity bins are arranged logarithmically in metallicity with [countMetallicities] bins between [metallicityMinimum] and [metallicityMaximum] (specified in Solar units). Note that the metallicity associated with each bin is the maximum metallicity for that bin, with the minimum metallicity corresponding to the value associated with the previous bin (or zero metallicity for the first bin). Note that a final bin, extending to infinite metallicity, is always added automatically. If [countMetallicities]\(=0\) is set, then the star formation history is not split by metallicity (i.e. a single metallicity bin encompassing all metallicities from zero to infinity is used). Alternatively, specific metallicity bin boundaries can be set via the [metallicityBoundaries] parameter—a final boundary corresponding to infinity is always added automatically.
Methods
make— Make the star formation history.
Parameters
[timeStep](default0.1d0) — The time step to use in tabulations of star formation histories [Gyr].[timeStepFine](default0.01d0) — The fine time step to use in tabulations of star formation histories [Gyr].[timeFine](default0.1d0) — The period prior to each output for which the fine time step is used in tabulations of star formation histories [Gyr].[massScaleAbsolute](default1.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](default10) — The number of bins in metallicity to use when tabulating star formation histories.[metallicityMinimum](default1.0d-4) — The upper limit to the metallicity in the lowest metallicity bin when tabulating star formation histories [Solar units].[metallicityMaximum](default1.0d+1) — The upper limit to the metallicity in the highest metallicity bin when tabulating star formation histories [Solar units].
starFormationHistoryNull¶
A null star formation histories class that performs no recording or tracking of star formation history, used when detailed star formation history information is not required in the simulation.
(Default implementation)
Parameters
[dimensionless](default.true.) — If true the null profile is considered to be dimensionless.