We present a revised implementation of the MESA (Modules for Experiments in Stellar Astrophysics) custom colors module, designed to compute synthetic photometry from stellar atmosphere models. This updated module constructs spectral energy distributions (SEDs) based on fundamental MESAstellar parameters; effective temperature (Teff), surface gravity (log g), radius, and metallicity ([M/H]).
This work was completed in collaboration with Prof. Meridith Joyce, Dr. Phillip Mocz, and Dr. Calum Morris.
The ability to compute synthetic photometry directly from stellar evolution models is increasingly relevant as modern astronomical surveys, such as Gaia, JWST, LSST, and TESS, demand rigorous comparisons between theoretical predictions and observed stellar populations.
The module supports interpolation over stellar atmosphere grids to account for metallicity-dependent effects, ensuring consistency with empirical photometric data. Additionally, synthetic photometry can be directly incorporated into MESA’s stellar evolution models, improving the realism of evolutionary tracks and color-magnitude relationships.
This enhancement expands the capability of MESA in the context of stellar evolution, population synthesis, and Galactic chemical evolution modeling. Future improvements will focus on increasing the spectral resolution of underlying models, incorporating additional photometric systems, and extending the module’s applicability to a broader range of astrophysical contexts.
Read the effective temperature (\(T_{\text{eff}}\)), surface gravity (\(\log g\)), radius (R), and metallicity (\([M/H]\)) from the MESA model.
Retrieve the distance (d) from the inlist defined by user.
Load file paths for:
Determine whether an SED should be saved (make_sed
flag).
Load the lookup table containing SED filenames indexed by \((T_{\text{eff}}, \log g, [M/H])\).
Identify the four closest stellar models based on parameter distances.
Load and interpolate these models onto a common wavelength grid.
Compute weighted flux values to approximate the target stellar parameters.
Dilute the surface fluxes from the stellar atmosphere model to an observer at distance \(d\):
\[ F_{\text{obs}} = F_{\text{surface}} \times \left(\frac{R}{d}\right)^2 \]
Perform trapezoidal integration over the SED to obtain:
Bolometric flux: \[ F_{\text{bol}} = \int_{\lambda} F_{\lambda} d\lambda \]
Bolometric magnitude: \[ M_{\text{bol}} = -2.5 \log_{10}(F_{\text{bol}}) \]
Load the list of filter files specified in the input.
For each filter, read the wavelength-dependent transmission curve.
Interpolate the filter transmission onto the SED’s wavelength grid.
Compute the convolved flux:
\[ F_{\text{conv}}(\lambda) = F_{\text{SED}}(\lambda) \times T_{\text{filter}}(\lambda) \]
Integrate the convolved flux using Simpson’s rule:
\[ F_{\text{syn}} = \frac{\int_{\lambda} F_{\text{conv}}(\lambda) \lambda d\lambda}{\int_{\lambda} T_{\text{filter}}(\lambda) \lambda d\lambda} \]
Load the Vega spectrum from the reference file.
Convolve it with the same filter.
Compute the Vega synthetic flux:
\[ F_{\text{Vega}} = \frac{\int_{\lambda} F_{\text{Vega}}(\lambda) T_{\text{filter}}(\lambda) \lambda d\lambda}{\int_{\lambda} T_{\text{filter}}(\lambda) \lambda d\lambda} \]
If requested, save the convolved Vega spectrum for debugging.
Use the Vega magnitude system:
\[ m = -2.5 \log_{10} \left(\frac{F_{\text{syn}}}{F_{\text{Vega}}} \right) \]
If Vega flux is zero, return an error.
If make_sed
is enabled, save:
After cloning the GitHub repository, ensure that your MESA environment is correctly configured...
export MESA_DIR=/path/to/mesa
export MESASDK_ROOT=/path/to/mesasdk
source $MESASDK_ROOT/bin/mesasdk_init.sh
source ~/.bashrc # or source ~/.zshrc
git clone https://github.com/nialljmiller/MESA_custom_colours.git
cd MESA_custom_colours
./clean
./mk
./rn
The `./mk` command will download `testdata.txz` and extract the Kurucz2003 model along with Gaia and JWST filter transmission curves.