API

Chemistry

We utilize the chemistry API from BolometricCorrections.jl to describe the chemistry of the stellar track libraries.

Individual Tracks

An individual stellar track, containing the time evolution of properties for a single star, is represented by our AbstractTrack type. Different concrete implementations are used for different stellar evolution libraries, but all support the common access API defined below.

API

StellarTracks.AbstractTrackType

Abstract supertype representing individual stellar tracks. Different concrete implementations are used for different stellar libraries, but all subtypes of AbstractTrack are guaranteed to support the generic API described in the documentation.

The main way to get the properties of the modeled star when it has a particular age, assuming track is a valid concrete instance, is to call the track with the logarithmic age track(log10(age)) where age is in years. This will return a NamedTuple containing the available properties (e.g., logL, logTe) of the modeled star at that age. Not all libraries will have the same properties available.

source
Base.extremaMethod
Base.extrema(t::AbstractTrack)

Returns the minimum and maximum logarithmic age (log10(age [yr])) of the stellar model.

source
Base.keysMethod
Base.keys(t::AbstractTrack)

Returns a tuple of symbols that will be used to set the keys of the NamedTuples returned by t(logAge::Number).

source
StellarTracks.massMethod
mass(t::AbstractTrack)

Returns the initial stellar mass of the modeled star in solar masses.

source
BolometricCorrections.MHMethod
MH(t::AbstractTrack)

Returns the logarithmic metal abundance of the modeled star, defined as [M/H] = log(Z/X) - log(Z⊙/X⊙).

source

Concrete Implementations

StellarTracks.InterpolatedTrackType
InterpolatedTrack(track0, track1, track1_prefac, track2_prefac) <: AbstractTrack

Type allowing for linear interpolation between two stellar tracks of identical mass but different metallicity (track0 and track1). Simple linear interpolation between the two tracks is applied. The track can be evaluated at a particular logarithmic age by calling (track::InterpolatedTrack)(logAge::Number).

The constructor for this type is considered internal and users should not construct this type directly. Rather, tracks of this type are constructed from track libraries by calling them with the signature (tracklib::AbstractTrackLibrary)(mh::Number, M::Number) where mh is the logarithmic metallicity [M/H] and M is the initial stellar mass in solar masses.

julia> using StellarTracks.PARSEC: PARSECLibrary

julia> p = PARSECLibrary();

julia> track = p(-2.05, 1.05)
InterpolatedTrack with M_ini=1.05, MH=-2.05, Z=0.00013856708164357998, Y=0.24874664940532557, X=0.7511147835130308.

julia> track(9.0)
(logTe = 3.8820487347062302, Mbol = 3.7411721770340987, logg = 4.521853108813156, C_O = 0.0)
source

Track Sets

We define a "track set" to be a set of individual stellar tracks that share common properties (typically initial metallicity). By grouping these tracks together, we can interpolate between tracks in the set, create isochrones, and perform other similar operations.

API

StellarTracks.AbstractTrackSetType

Abstract supertype representing a set of stellar tracks with common properties and supports common operations like interpolating between tracks and calculating isochrones. Specifically, it is assumed all individual tracks in a track set have identical initial metallicity and chemical composition. Subtypes of AbstractTrackSet are guaranteed to support the generic API described in the documentation.

Concrete instances are callable with an initial stellar mass (in solar masses), returning an interpolated track at the requested mass.

source
StellarTracks.massMethod
mass(ts::AbstractTrackSet)

Returns the initial stellar masses (in solar masses) of the individual tracks contained in the track set.

source
BolometricCorrections.XMethod
X(ts::AbstractTrackSet)

Returns the common hydrogen mass fraction of the tracks contained in the track set.

source
BolometricCorrections.YMethod
Y(ts::AbstractTrackSet)

Returns the common helium mass fraction of the tracks contained in the track set.

source
BolometricCorrections.MHMethod
MH(ts::AbstractTrackSet)

Returns the common logarithmic metal abundance of the tracks contained in the track set, defined as [M/H] = log(Z/X) - log(Z⊙/X⊙).

source
StellarTracks.post_rgbMethod
post_rgb(ts::AbstractTrackSet)

Returns true if the tracks in the track set include post-RGB evolution, false otherwise.

source
StellarTracks.isochroneMethod
isochrone(ts::AbstractTrackSet, logAge::Number)

Interpolates properties of the stellar tracks in the track set at the requested logarithmic age (logAge = log10(age [yr])). Returns a NamedTuple containing the properties; different libraries may have different properties available. If result = isochrone(...), EEP points are generally available as result.eep and the corresponding initial stellar masses are result.m_ini.

julia> using StellarTracks.MIST

julia> ts = MISTTrackSet(-1, 0); # Load set of MIST tracks with [M/H] = -1, vvcrit=0

julia> isochrone(ts, 10.0) isa NamedTuple
true
source
StellarTracks.isochroneMethod
isochrone(ts::StellarTracks.AbstractTrackSet,
          bc::BolometricCorrections.AbstractBCTable,
          logAge::Number)

Returns an isochrone as a TypedTables.Table calculated using the stellar evolutionary tracks contained in ts with bolometric corrections interpolated from the provided table bc at the logarithmic age logAge. Column names can be retrieved with TypedTables.columnnames. The result can be converted to a matrix with Tables.matrix.

using StellarTracks, BolometricCorrections
p = PARSECLibrary()    # Load PARSEC library of stellar models
m = MISTBCGrid("JWST") # Load MIST library of BCs
isochrone(p.ts[1], m(MH(p.ts[1]), 0.0), 10.0)
Table with 35 columns and 1323 rows:
...
source

Concrete Implementations

Track Libraries

For ease of use, our main entry point is the AbstractTrackLibrary, which loads and organizes all stellar tracks available from a given library (e.g., PARSEC). Once all tracks have been loaded, subsets with common chemical compositions can be extracted. Individual tracks and isochrones can also be interpolated directly from the library instance. However, the interfaces for these interpolations are not generic as not all libraries offer the same variations in initial chemistry – e.g., most will offer variation in total metallicity (i.e., $Z$), but some also include variation in $\alpha$-element abundances. These methods are documented separately for each stellar library under their unique pages in the left panel.

API

StellarTracks.AbstractTrackLibraryType

Abstract supertype for loading the full set of all stellar tracks available from a given library (e.g., PARSEC). For some libraries (e.g., MIST), there are different model sets for other stellar input parameters (e.g., rotation vvcrit in MIST) that are not interpolated over – these should be provided as arguments to the concrete type constructors.

These are typically assembled as a collection of individual track sets, with one track set constructed for each unique set of stellar chemical compositions (i.e., [M/H]). For more details, see the documentation for AbstractTrackSet.

Concrete subtypes must implement an isochrone interpolation method. A generic method for the call signature isochrone(tracklib::AbstractTrackLibrary, logAge::Number, mh::Number) is provided. This generic method should work as long as the concrete subtype follows the chemistry API and has a field tracklib.ts containing the individual tracksets that make up the library. The tracksets must support isochrone interpolation via a method isochrone(ts::<your_type_here>, logAge::Number).

Concrete instances must support interpolation of stellar tracks at user-provided metallicities and initial stellar masses. A generic method is implemented via the signature (tracklib::AbstractTrackLibrary)(mh::Number, M::Number). This method interpolates the tracklib at logarithmic metallicity [M/H] = mh and stellar initial mass M, returning an InterpolatedTrack that can be called to evaluate the track.

source
BolometricCorrections.XMethod
X(tl::AbstractTrackLibrary)

Returns the hydrogen mass fractions of the track sets contained in the track library.

source
BolometricCorrections.YMethod
Y(tl::AbstractTrackLibrary)

Returns the helium mass fractions of the track sets contained in the track library.

source
BolometricCorrections.ZMethod
Z(tl::AbstractTrackLibrary)

Returns the metal mass fractions of the track sets contained in the track library.

source
BolometricCorrections.MHMethod
MH(tl::AbstractTrackLibrary)

Returns the logarithmic metal abundances of the track sets contained in the track library, defined as [M/H] = log(Z/X) - log(Z⊙/X⊙).

source
StellarTracks.post_rgbMethod
post_rgb(tl::AbstractTrackLibrary)

Returns true if any of the track sets in the track library include post-RGB evolution, false otherwise.

source
StellarTracks.isochroneMethod
isochrone(tracklib::AbstractTrackLibrary, logAge::Number, mh::Number)

Interpolates properties of the stellar tracks in the track library at the requested logarithmic age (logAge = log10(age [yr])) and metallicity [M/H] = mh. Returns a NamedTuple containing the properties; different libraries may have different properties available. If result = isochrone(...), EEP points are generally available as result.eep and the corresponding initial stellar masses are result.m_ini.

julia> using StellarTracks.MIST

julia> p = MISTLibrary(0.0); # Load the library of MIST tracks with vvcrit=0

julia> isochrone(p, 10.0, -1.65) isa NamedTuple
true
source
StellarTracks.isochroneMethod
isochrone(tracklib::AbstractTrackLibrary,
          bc::BolometricCorrections.AbstractBCTable,
          logAge::Number,
          mh::Number)

Returns an isochrone as a TypedTables.Table calculated using the stellar evolutionary tracks contained in tracklib with bolometric corrections interpolated from the provided table bc at the logarithmic age logAge and metallicity [M/H] = mh. Column names can be retrieved with TypedTables.columnnames. The result can be converted to a matrix with Tables.matrix.

using StellarTracks, BolometricCorrections
p = MISTLibrary(0.0)   # Load MIST library of non-rotating stellar models
m = MISTBCGrid("JWST") # Load MIST library of BCs
isochrone(p, m(-1.01, 0.0), 10.0, -1.01)
Table with 36 columns and 1465 rows:
...
source

Concrete Implementations

Utilities

StellarTracks.MbolFunction
Mbol(logL::Number, solmbol::Number=4.74)

Returns the bolometric magnitude corresponding to the provided logarithmic bolometric luminosity logL which is provided in units of solar luminosities (e.g., logL = log10(L / L⊙)). This is given by Mbol⊙ - 2.5 * logL; the zeropoint of bolometric magnitude scale is defined by the solar bolometric magnitude, which you can specify as the second argument. The default (4.74) was recommended by IAU Resolution B2.

source
StellarTracks.logLFunction
logL(Mbol::Number, solmbol::Number=4.74)

Returns the logarithmic bolometric luminosity in units of solar luminosities (e.g., logL = log10(L / L⊙)) corresponding to the provided bolometric magnitude. This is given by (Mbol⊙ - Mbol) / 2.5; the zeropoint of bolometric magnitude scale is defined by the solar bolometric magnitude, which you can specify as the second argument. The default (4.74) was recommended by IAU Resolution B2.

source
StellarTracks.radiusFunction
radius(Teff::Number, logl::Number)

Returns the radius of a star in units of solar radii given its effective temperature Teff in Kelvin and the logarithm of its luminosity in units of solar luminosities (e.g., logl = log10(L / L⊙)).

Assumes solar properties following IAU 2015 Resolution B3.

julia> isapprox(StellarTracks.radius(5772, 0.0), 1.0; rtol=0.001) # For solar Teff and logL, radius ≈ 1
true
source
StellarTracks.surface_gravityFunction
surface_gravity(M, R)

Returns the surface gravity of a star in cm / s^2 given its mass in solar masses and radius in solar radii.

Assumes solar properties following IAU 2015 Resolution B3.

julia> isapprox(StellarTracks.surface_gravity(1, 1), 27420; rtol=0.001) # For solar M and R, g ≈ 27430 cm / s^2
true
source