Skip to content

cgarling/StellarTracks.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StellarTracks.jl

Stable Dev Build Status Coverage

This package provides access to and interpolation of pre-computed libraries of stellar tracks. Secondary operations like isochrone creation are also supported. Currently included libraries are

These tracks contain only quantities from stellar interior modeling (e.g., bolometric luminosities and effective temperatures) and must be combined with bolometric corrections to make predictions for observations in different filters/bandpasses. This package integrates with BolometricCorrections.jl to support isochrone interpolation with the addition of bolometric corrections. See the examples below for a quick overview and our documentation linked in the badges above for more details.

Installation

This package is registered to Julia's General registry and can be installed via Pkg from the Julia REPL by executing

import Pkg;
Pkg.add("StellarTracks");

Example Usage

The most common use cases for this package will involve interacting with subtypes of AbstractTrackLibrary -- these subtypes (PARSECLibrary, MISTLibrary, BaSTIv1Library, BaSTIv2Library) load all relevant stellar tracks for a particular set of model input parameters -- for example, MIST offers both rotating and non-rotating stellar models, and users can choose between these sets when constructing a MISTLibrary. These types provide the ability to interpolate tracks to different stellar initial masses and metallicities and interpolate isochrones at different ages and metallicities.

julia> using StellarTracks

# Load non-rotating models (vvcrit=0)
julia> tracklib = MISTLibrary(0)

# Interpolate a new track at [M/H] = -2.09, M_ini = 1.09 M⊙
julia> newtrack = tracklib(-2.09, 1.09)
InterpolatedTrack with M_ini=1.09, MH=-2.09, Z=0.00012111671593180112, Y=0.2491818874546179, X=0.7506969958294503.

# Interpolate newtrack at log(age [yr]) = 9
julia> newtrack(9)
(log_L = 0.4956590459743111, log_Teff = 3.898620504847251, log_g = 4.528985420811569, log_surf_cell_z = -4.641158732471512)

# Interpolate isochrone at [M/H] = -2.09, log(age [yr]) = 9
julia> iso = isochrone(tracklib, 9, -2.09);

# `isochrone` returns a `NamedTuple` of vectors that can be parsed
# as a table, for example `TypedTables.Table` or `DataFrames.DataFrame`.
julia> using TypedTables: Table

julia> Table(iso)
Table with 7 columns and 609 rows:
      eep  m_ini     logTe    Mbol     logg     logL      log_surf_cell_z
    ┌────────────────────────────────────────────────────────────────────
 1200  0.100631  3.54677  11.6724  5.35538  -2.77296  -3.9351
 2201  0.101926  3.54824  11.6322  5.35036  -2.7569   -3.9351
 3202  0.103545  3.55008  11.5823  5.34418  -2.73691  -3.9351
 ...

This package integrates with BolometricCorrections.jl to support isochrone interpolation with the addition of bolometric corrections to place the isochrone into an observational photometric system.

julia> using BolometricCorrections

# Load MIST BCs for HST ACS/WFC
julia> bcgrid = MISTBCGrid("hst_acs_wfc")
MIST bolometric correction grid for photometric system MIST_HST_ACS_WFC

# MIST BCs support reddening (Av) interpolation
# Interpolate isochrone at log(age [yr]) = 9, [M/H] = -2.09, Av = 0.13 mag
julia> isochrone(tracklib, bcgrid, 9, -2.09, 0.13)
Table with 20 columns and 609 rows:
      eep  m_ini     logTe    Mbol     logg     logL      log_surf_cell_z  ACS_WFC_F435W  ACS_WFC_F475W  ACS_WFC_F502N  ACS_WFC_F550M  
    ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 1200  0.100631  3.54677  11.6724  5.35538  -2.77296  -3.9351          14.7118        14.0111        14.0181        12.7635        
 2201  0.101926  3.54824  11.6322  5.35036  -2.7569   -3.9351          14.6536        13.9571        13.9586        12.7166        
 3202  0.103545  3.55008  11.5823  5.34418  -2.73691  -3.9351          14.5806        13.8895        13.8844        12.6579        

About

Julia interface to stellar evolutionary track libraries enabling track and isochrone interpolation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages