Fixed Age-Metallicity Relations

It is often the case that one may want to fit for star formation rates under a fixed age-metallicity relation or other metallicity evolution model with no degrees of freedom. Such functionality is provided by fixed_amr, which takes as input the relative weights (relweights in the function call, equivalently the $r_{j,k}$ in the above derivation) on each template due to a predetermined metallicity model and fits only the per-age-bin coefficients ($R_j$ in the above derivation).

StarFormationHistories.fixed_amrFunction
fixed_amr(models::AbstractVector{T},
          data::AbstractMatrix{<:Number},
          logAge::AbstractVector{<:Number},
          metallicities::AbstractVector{<:Number},
          relweights::AbstractVector{<:Number};
          relweightsmin::Number=0, 
          x0=construct_x0_mdf(logAge, convert(S,13.7)),
          kws...) where {S <: Number, T <: AbstractMatrix{S}}
fixed_amr(models::AbstractMatrix{S},
          data::AbstractVector{<:Number},
          logAge::AbstractVector{<:Number},
          metallicities::AbstractVector{<:Number},
          relweights::AbstractVector{<:Number};
          relweightsmin::Number=0,
          x0=construct_x0_mdf(logAge, convert(S,13.7)),
          kws...) where S <: Number

Method that fits a linear combination of the provided Hess diagrams models to the observed Hess diagram data, under an externally-imposed age-metallicity relation (AMR) and/or metallicity distribution function (MDF). As such, a number of coefficients equal to length(unique(logAge)) are returned; that is, only one coefficient is derived per unique entry in logAge.

The second call signature supports the flattened formats for models and data. See the notes for the flattened call signature of StarFormationHistories.composite! for more details.

Arguments

  • models::AbstractVector{<:AbstractMatrix{<:Number}} is a vector of equal-sized matrices that represent the template Hess diagrams for the simple stellar populations that compose the observed Hess diagram.
  • data::AbstractMatrix{<:Number} is the Hess diagram for the observed data.
  • logAge::AbstractVector{<:Number} is the vector containing the effective ages of the stellar populations used to create the templates in models, in units of log10(age [yr]). For example, if a population has an age of 1 Myr, its entry in logAge should be log10(10^6) = 6.0.
  • metallicities::AbstractVector{<:Number} is the vector containing the effective metallicities of the stellar populations used to create the templates in models. This is most commonly a logarithmic abundance like [M/H] or [Fe/H], but you could use a linear abundance like the metal mass fraction Z if you wanted to. There are some notes on the Wikipedia that might be useful.
  • relweights::AbstractVector{<:Number} is a vector of length equal to that of models which contains the relative weights to apply to each model Hess diagram resulting from an externally-imposed age-metallicity relation and/or metallicity distribution function. Additional details on how to create these weights is provided in the notes below and in the online documentation.

Keyword Arguments

  • relweightsmin truncates the input list of models based on the provided relweights, providing a speedup at the cost of precision by removing models that contribute least to the overall composite model. By default, no truncation of the input is performed and all provided models are used in the fit. We recommend this only be increased when fitting performance begins to impact workflow (e.g., when running massive Monte Carlo experiments). See StarFormationHistories.truncate_relweights for implementation details.
  • x0 is the vector of initial guesses for the stellar mass coefficients per unique entry in logAge. You should basically always be calculating and passing this keyword argument. We provide StarFormationHistories.construct_x0_mdf to prepare x0 assuming constant star formation rate, which is typically a good initial guess.

Other kws... are passed to Optim.options to set things like convergence criteria for the optimization.

Notes

  • All metallicity-related weighting of the models is assumed to be captured in the provided relweights vector, which has the same length as the logAge, metallicities, and models vectors. Each entry in relweights is assumed to be a relative weight for the corresponding model. For example, for the model Hess diagram models[i], with log10(age [yr]) = logAge[i] and metallicity metallicities[i], the relative weight due to the model's age and metallicity w(logAge[i], metallicities[i]) is assumed to be relweights[i]. The sum of all relweights for each unique entry in logAge should be 1; i.e., the following condition should be met: all( sum(relweights[logAge .== la]) ≈ 1 for la in unique(logAge)). If this is not the case, this function will issue a warning and attempt to renormalize relweights by mutating the vector in place. More information on preparation of the relweights for input to this method is provided in our online documentation.
  • This function is designed to work best with a "grid" of stellar models, defined by the outer product of N unique entries in logAge and M unique entries in metallicities. See the examples for more information on usage.
source