API Reference
BC Grid API
BolometricCorrections.AbstractBCGrid
— TypeAbstractBCGrid{T <: Real}
is the abstract supertype for all bolometric correction grids. T
is the data type to use internally and is returned by eltype
. Generally, concrete subtypes should be callable with population properties (e.g., metallicity, reddening, etc.) to interpolate the full grid to these properties, returning a concrete subtype of BolometricCorrections.AbstractBCTable
. As different grids will have different population properties available (e.g., some support different α-element abundances in addition to total metallicity), the call signature to interpolate the grid is specific for each concrete subtype, which include
BolometricCorrections.filternames
— Methodfilternames(grid::AbstractBCGrid)
Returns a Vector{String}
containing the names of the photometric filters contained in the provided bolometric correction grid. See columnnames
if you also want to retrieve names of dependent variable columns.
Base.extrema
— Methodextrema(grid::AbstractBCGrid)
Returns a NamedTuple
containing the bounds of the dependent variables in the bolometric correction grids (e.g., [Fe/H], Av).
TypedTables.Table
— MethodTable(grid::AbstractBCGrid)
Returns a TypedTables.Table
containing the data underlying the bolometric correction grid.
TypedTables.columnnames
— Methodcolumnnames(grid::AbstractBCGrid)
Returns the column names in the provided bolometric correction grid. Includes dependent variables. See filternames
to retrieve only the names of the contained photometric filters.
Tables.columns
— Methodcolumns(grid::AbstractBCGrid)
Returns the columns of the table underlying the bolometric correction grid.
TypedTables.getproperties
— Methodgetproperties(grid::AbstractBCGrid, names::Tuple{Vararg{Symbol}})
Returns properties names
from the provided bolometric correction grid.
BC Table API
BolometricCorrections.AbstractBCTable
— TypeAbstractBCTable{T <: Real}
is the abstract supertype for all bolometric correction tables with extraneous dependent variables (e.g., [Fe/H], Av) fixed – should typically only have dependent variables logg
and Teff
remaining. T
is the data type to use internally and is returned by eltype
.
(table::AbstractBCTable{T})([::Type{TypedTables.Table},]
Teff::AbstractArray{S},
logg::AbstractArray{V}) where {T, S <: Real, V <: Real}
All concrete subtypes of AbstractBCTable
must be callable with (Teff, logg)
arguments and return the interpolated BCs at those values. This method broadcasts the operation over arrays of Teff
and logg
and formats the result into a stacked matrix or a TypedTables.Table
. The three-argument version that returns a Table
has a roughly fixed runtime overhead cost of 3–5 μs to perform the type conversion.
BolometricCorrections.filternames
— Methodfilternames(table::AbstractBCGrid)
Returns a NTuple{N, Symbol}
containing the names of the photometric filters contained in the provided bolometric correction table. See columnnames
if you also want to retrieve names of dependent variable columns.
Base.extrema
— Methodextrema(table::AbstractBCTable)
Returns a NamedTuple
containing the bounds of the dependent variables in the bolometric correction table (e.g., logg
, Teff
).
TypedTables.Table
— MethodTable(table::AbstractBCTable)
Returns a TypedTables.Table
containing the data underlying the bolometric correction table.
TypedTables.columnnames
— Methodcolumnnames(table::AbstractBCTable)
Returns the column names in the provided bolometric correction table.
Tables.columns
— Methodcolumns(table::AbstractBCTable)
Returns the columns of the table underlying the bolometric correction table.
TypedTables.getproperties
— Methodgetproperties(grid::AbstractBCGrid, names::Tuple{Vararg{Symbol}})
Returns properties names
from the provided bolometric correction grid.
Photometric Zeropoints API
BolometricCorrections.AbstractZeropoints
— TypeAbstractZeropoints
is the abstract supertype for information regarding the photometric zeropoints assumed for a particular grid of bolometric corrections and supports conversion between systems (AB, Vega, ST).
BolometricCorrections.zeropoints
— Functionzeropoints(grid::AbstractBCGrid)
zeropoints(table::AbstractBCTable)
Return the correct concrete instance of AbstractZeropoints
for the type of grid
or table
.
julia> zeropoints(MISTBCGrid("JWST")) isa BolometricCorrections.MIST.MISTZeropoints
true
BolometricCorrections.filternames
— Methodfilternames(zpt::AbstractZeropoints)
Returns a Vector{String}
containing the names of the photometric filters in the table of zeropoints.
BolometricCorrections.vegamags
— Functionvegamags(zpt::AbstractZeropoints, filter, mags)
Uses the photometric zeropoint information in zpt
to convert magnitudes mags
in the given filter
to the Vega magnitude system.
BolometricCorrections.abmags
— Functionabmags(zpt::AbstractZeropoints, filter, mags)
Uses the photometric zeropoint information in zpt
to convert magnitudes mags
in the given filter
to the AB magnitude system.
BolometricCorrections.stmags
— Functionstmags(zpt::AbstractZeropoints, filter, mags)
Uses the photometric zeropoint information in zpt
to convert magnitudes mags
in the given filter
to the ST magnitude system.
BolometricCorrections.Mbol
— FunctionMbol(zpt::AbstractZeropoints)
Returns the absolute bolometric magnitude of the Sun assumed in the definition of the BC grid.
BolometricCorrections.Lbol
— FunctionLbol(zpt::AbstractZeropoints)
Returns the bolometric luminosity [erg / s] of the Sun assumed in the definition of the BC grid.
Chemical Mixture API
Chemical mixtures used for BCs typically start by defining an assumed chemical mixture for the Sun. When considering the solar chemical mixture, it is important to note that there is a difference between photospheric abundances and protostellar abundances as metals diffuse out of the photosphere over time, leading the photospheric abundances to be lower than protostellar abundances. We differentiate between these in our API. Generally the protostellar quantities (i.e., X
, Y
, Z
) are preferred for most use cases, as these are the initial conditions for the stellar models set by the researchers and are therefore static. The diffusive processes responsible for the difference between the photospheric and protostellar metallicities depend on the initial mass of a star in addition to its age, and so a population of stars that share a single protostellar metallicity will not all have identical photospheric metallicities, even if they all have the same age. Ideally the photospheric metallicity should be a quantity tracked during the simulation of a stellar model so that it would be included in the stellar track – the photospheric metallicities are therefore a prediction of the stellar evolution models, rather than an intrinsic property set at the beginning of the simulation.
BolometricCorrections.AbstractChemicalMixture
— TypeAbstractChemicalMixture
is the abstract supertype for information regarding the chemical mixtures available or assumed for a particular grid of bolometric corrections. It also supports evaluation and conversion between different chemical conventions (i.e., conversion between metal mass fraction Z
and logarithmic metallicity [M/H]).
BolometricCorrections.chemistry
— Methodchemistry(mix::AbstractBCTable)
chemistry(mix::AbstractBCGrid)
Returns the correct concrete instance of AbstractChemicalMixture
for the provided bolometric correction grid or table. This provides a convenient programmatic way to obtain this chemical information.
julia> grid = MISTBCGrid("JWST");
julia> chemistry(grid)
BolometricCorrections.MIST.MISTChemistry()
julia> table = grid(-1.5, 0.03);
julia> chemistry(table)
BolometricCorrections.MIST.MISTChemistry()
BolometricCorrections.X
— MethodX(mix::AbstractChemicalMixture)
Returns the protostellar solar hydrogen mass fraction assumed in the provided chemical mixture.
BolometricCorrections.X_phot
— MethodX_phot(mix::AbstractChemicalMixture)
Returns the photospheric solar hydrogen mass fraction assumed in the provided chemical mixture.
BolometricCorrections.Y_p
— MethodY_p(mix::AbstractChemicalMixture)
Returns the primordial helium mass fraction assumed in the provided chemical mixture.
BolometricCorrections.Y
— MethodY(mix::AbstractChemicalMixture)
Returns the protostellar solar helium mass fraction. May use [Z
] internally.
BolometricCorrections.Y_phot
— MethodY_phot(mix::AbstractChemicalMixture)
Returns the photospheric solar helium mass fraction. May use [Z_phot
] internally.
BolometricCorrections.Z
— MethodZ(mix::AbstractChemicalMixture)
Returns the protostellar solar metal mass fraction assumed in the provided chemical mixture.
BolometricCorrections.Z_phot
— MethodZ_phot(mix::AbstractChemicalMixture)
Returns the photospheric solar metal mass fraction assumed in the provided chemical mixture.
The above methods define the solar standard assumed in chemical mixture models. The information contained in an AbstractChemicalMixture
can be used to convert between different chemical conventions (i.e., the metal mass fraction Z
and logarithmic metallicity [M/H]). These conversion methods are documented below with accompanying notes for use.
It has been shown that helium abundance $Y$ typically only affects broadband BCs at the level of a few thousandths of magnitudes [6, 7]. However, it is common for stellar BCs to assume helium abundances that are a function of the stellar metallicity to match the relation used for the stellar evolution models where the helium abundance makes a more significant difference. For grids in which $Y$ scales with $Z$, the following methods can be used to derive other quantities.
BolometricCorrections.X
— MethodX(mix::AbstractChemicalMixture, Z)
Returns protostellar hydrogen mass fraction given the protostellar metal mass Z
and the provided chemical mixture. Generic method returns 1 - Y(mix, Z) - Z
.
BolometricCorrections.Y
— MethodY(mix::AbstractChemicalMixture, Z)
Returns the protostellar helium mass fraction given the protostellar metal mass fraction Z
. Only valid for grids in which $Y$ is a function of $Z$.
BolometricCorrections.Z
— MethodZ(mix::AbstractChemicalMixture, MH)
Returns the protostellar metal mass fraction given the logarithmic metallicity MH
and the provided chemical mixture.
BolometricCorrections.MH
— MethodMH(mix::AbstractChemicalMixture, Z)
Returns the protostellar logarithmic metallicity [M/H] = log10(Z/X) - log10(Z⊙/X⊙) given the metal mass fraction Z
and the provided chemical mixture.
Note that we do not offer methods scaling the photospheric abundance values with $Z$, such as MH_phot(mix::BolometricCorrections.AbstractChemicalMixture, Z)
, as the diffusive processes that change the photospheric abundances relative to the initial abundances depend on both the age and initial mass of the star in question – it is therefore inappropriate to simply scale the assumed solar photospheric abundances to other bulk metallicities $Z$.