Skip to content

nialljmiller/MESA_custom_colours

Repository files navigation

MESA Colors Project

MESA Colors is an extension for the Modules for Experiments in Stellar Astrophysics (MESA) toolkit, designed to enable synthetic photometry calculations and provide additional stellar evolution diagnostics. By incorporating bolometric corrections and synthetic magnitudes, it allows for detailed analysis of stellar properties under various filter systems and atmospheric models.

Features

  • Synthetic Magnitudes: Compute magnitudes using arbitrary filter profiles.
  • Custom History Columns: Append photometric diagnostics to the MESA history output.
  • SED Interpolation: Interpolate between stellar models to generate spectral energy distributions (SEDs).
  • Flexible Filter System Integration: Easily incorporate custom filter profiles for synthetic photometry.

Installation

  1. Clone or download the MESA Colors module to your MESA project directory.

  2. Ensure your mesasdk path is properly set.

  3. Clean and compile the module:

    ./clean; ./mk
  4. The script will download a 35MB file containing JWST and Gaia filter transmission curves, Kurucz 2003 stellar atmosphere models, and precomputed blackbody curves. These files will be stored in the data/ directory.

Directory Structure

mesa_colors/
├── src/
│   ├── run_star_extras.f90       # Main Fortran module
│   ├── utilities.f90             # Helper functions for interpolation and file handling
├── data/
│   ├── stellar_models/           # Stellar models (Kurucz, PHOENIX, etc.)
│   ├── filters/                  # Filter profiles (e.g., GAIA, HST, JWST, etc.)
│   ├── extracted_marker          # Marker file to confirm data extraction
├── inlist                        # Example inlist

Inlist Options

Configuring a Stellar Atmosphere Model

The stellar atmosphere models are grids of precomputed stellar SEDs. These SEDs are computed as a function of multiple stellar features, many of which are generated by MESA. We use those features to find the N closest SEDs which match our parameters. Each folder within the stellar atmosphere models contains two main features: - A grid of stellar models - A lookup table holding the metadata of those models (e.g., the Teff and Logg used to generate the SED)

If you wish to add more stellar atmosphere models, a good place to start would be SVO: http://svo2.cab.inta-csic.es/theory/newov2/.

Your lookup table only requires some formatting rules: - The file name is the first column. - At least one of Teff, Logg, Z must be present.

Here is an example of the first few lines of the lookup table for the Kurucz2003 stellar atmospheres:

#file_name, alpha, lh, logg, meta, teff, vtur
Kurucz2003all_fid16202.txt,0,1.25,3.5,-0.5,10500,2
Kurucz2003all_fid16203.txt,0,1.25,4,-0.5,10500,2
Kurucz2003all_fid16204.txt,0,1.25,4.5,-0.5,10500,2
Kurucz2003all_fid16205.txt,0,1.25,5,-0.5,10500,2
Kurucz2003all_fid16206.txt,0,1.25,2,-0.5,10750,2
Kurucz2003all_fid16207.txt,0,1.25,2.5,-0.5,10750,2
Kurucz2003all_fid16208.txt,0,1.25,3,-0.5,10750,2
Kurucz2003all_fid16209.txt,0,1.25,3.5,-0.5,10750,2

Configuring a photometric filter system

The phtometric filters are configered similarly to the stellar atmosphere models. Indeed, they are sourced from the same website -- http://svo2.cab.inta-csic.es/theory/fps/

The filteres are ready by the code with the assumption that they are stored as:

`data/filters/{TELESCOPE}/{INTRUMENT}/FILTER1.csv, FILTER2.csv...`

Outputs

  • History Columns: Bolometric magnitudes and fluxes will be appended to the MESA history output.
  • SED.csv: If x_character_ctrl(4) = 'false', this will save CSV files of each constructed SED.

Dependencies

  • MESA (Version 24.06.1 or higher recommended)
  • Fortran Compiler (e.g., gfortran, ifort)
  • Python Helpers: - Python 3 - numpy - matplotlib - mesa_reader

Acknowledgments

This project was inspired by the need for more detailed synthetic photometry in stellar evolution simulations. It incorporates insights from MESA's development community and builds upon the work of Rob Farmer and the MESA Team.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published