API Reference

BC Grid API

BolometricCorrections.AbstractBCGridType

AbstractBCGrid{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

source
BolometricCorrections.filternamesMethod
filternames(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.

source
Base.extremaMethod
extrema(grid::AbstractBCGrid)

Returns a NamedTuple containing the bounds of the dependent variables in the bolometric correction grids (e.g., [Fe/H], Av).

source
TypedTables.TableMethod
Table(grid::AbstractBCGrid)

Returns a TypedTables.Table containing the data underlying the bolometric correction grid.

source
TypedTables.columnnamesMethod
columnnames(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.

source
Tables.columnsMethod
columns(grid::AbstractBCGrid)

Returns the columns of the table underlying the bolometric correction grid.

source
TypedTables.getpropertiesMethod
getproperties(grid::AbstractBCGrid, names::Tuple{Vararg{Symbol}})

Returns properties names from the provided bolometric correction grid.

source

BC Table API

BolometricCorrections.AbstractBCTableType

AbstractBCTable{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.

source
BolometricCorrections.filternamesMethod
filternames(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.

source
Base.extremaMethod
extrema(table::AbstractBCTable)

Returns a NamedTuple containing the bounds of the dependent variables in the bolometric correction table (e.g., logg, Teff).

source
TypedTables.TableMethod
Table(table::AbstractBCTable)

Returns a TypedTables.Table containing the data underlying the bolometric correction table.

source
Tables.columnsMethod
columns(table::AbstractBCTable)

Returns the columns of the table underlying the bolometric correction table.

source
TypedTables.getpropertiesMethod
getproperties(grid::AbstractBCGrid, names::Tuple{Vararg{Symbol}})

Returns properties names from the provided bolometric correction grid.

source

Photometric Zeropoints API

BolometricCorrections.AbstractZeropointsType

AbstractZeropoints 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).

source
BolometricCorrections.zeropointsFunction
zeropoints(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
source
BolometricCorrections.vegamagsFunction
vegamags(zpt::AbstractZeropoints, filter, mags)

Uses the photometric zeropoint information in zpt to convert magnitudes mags in the given filter to the Vega magnitude system.

source
BolometricCorrections.abmagsFunction
abmags(zpt::AbstractZeropoints, filter, mags)

Uses the photometric zeropoint information in zpt to convert magnitudes mags in the given filter to the AB magnitude system.

source
BolometricCorrections.stmagsFunction
stmags(zpt::AbstractZeropoints, filter, mags)

Uses the photometric zeropoint information in zpt to convert magnitudes mags in the given filter to the ST magnitude system.

source
BolometricCorrections.MbolFunction
Mbol(zpt::AbstractZeropoints)

Returns the absolute bolometric magnitude of the Sun assumed in the definition of the BC grid.

source
BolometricCorrections.LbolFunction
Lbol(zpt::AbstractZeropoints)

Returns the bolometric luminosity [erg / s] of the Sun assumed in the definition of the BC grid.

source

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.AbstractChemicalMixtureType

AbstractChemicalMixture 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]).

source
BolometricCorrections.chemistryMethod
chemistry(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()
source
BolometricCorrections.XMethod
X(mix::AbstractChemicalMixture)

Returns the protostellar solar hydrogen mass fraction assumed in the provided chemical mixture.

source
BolometricCorrections.X_photMethod
X_phot(mix::AbstractChemicalMixture)

Returns the photospheric solar hydrogen mass fraction assumed in the provided chemical mixture.

source
BolometricCorrections.Y_pMethod
Y_p(mix::AbstractChemicalMixture)

Returns the primordial helium mass fraction assumed in the provided chemical mixture.

source
BolometricCorrections.YMethod
Y(mix::AbstractChemicalMixture)

Returns the protostellar solar helium mass fraction. May use [Z] internally.

source
BolometricCorrections.ZMethod
Z(mix::AbstractChemicalMixture)

Returns the protostellar solar metal mass fraction assumed in the provided chemical mixture.

source
BolometricCorrections.Z_photMethod
Z_phot(mix::AbstractChemicalMixture)

Returns the photospheric solar metal mass fraction assumed in the provided chemical mixture.

source

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.XMethod
X(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.

source
BolometricCorrections.YMethod
Y(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$.

source
BolometricCorrections.ZMethod
Z(mix::AbstractChemicalMixture, MH)

Returns the protostellar metal mass fraction given the logarithmic metallicity MH and the provided chemical mixture.

source
BolometricCorrections.MHMethod
MH(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.

source

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$.