About mesalab
The Python package mesalab is designed for processing and analyzing stellar evolution simulations performed with MESA (Modules for Experiments in Stellar Astrophysics). It is developed to efficiently handle large grids of simulations, such as those where stellar mass (M) and metallicity (Z) are systematically varied.
- The primary goal of this pipeline is to take your MESA outputs and automatically:
Analyze each simulation within your grid.
Identify if the star enters the blue loop phase and crosses the instability strip.
Based on these findings, prepare GYRE input files and run the corresponding pulsation simulations.
Note
The current version of mesalab is optimized for MESA version 23.05.01 and GYRE version 7.0.
The mesalab pipeline goes through the following steps:
Data Collection: The pipeline gathers all relevant data from your MESA simulation output directories. This includes:
- From MESA
LOGS/history.datafiles: log_glog_Tefflog_Lmassstar_agelog_Rcenter_h1center_he4
- From MESA
- From MESA
inlistfiles: initial_massinitial_Z
- From MESA
Plotting Evolutionary Tracks (Optional):
In this phase mesalab generates individual Hertzsprung-Russell (HR) diagrams, plotting the evolutionary tracks for all stars within your simulation grid.
Blue Loop & Instability Strip Identification and Filtering:
The pipeline checks which stars undergo a blue loop phase and enter, or cross the instability strip during their evolution.
Then mesalab filters and extracts the data for these specific evolutionary phases.
Optionally, it can create a heatmap visualizing the number of instability strip edge crossings across your grid.
Generating Color-Magnitude, and HR Diagrams for the Selected Model Numbers (Optional):
For the filtered stellar models, it applies bolometric corrections using the MIST Bolometric Correction Tables.
Then it generates Color-Magnitude Diagrams (CMDs) tailored to Gaia observational bands.
Additional HR-diagrams and
log_gvslog_Teffdiagrams can also be generated.
GYRE Inlist Generation:
For the filtered stellar models (or optionally for all models, based on your configuration), mesalab creates the necessary input files (e.g.,
gyre.in) for the GYRE pulsation code.
GYRE Workflow Execution:
In this is phase the pipeline runs the GYRE pulsation code using the generated inlist files to perform the asteroseismic analysis.
About this Documentation
This documentation uses Sphinx and MyST Markdown. Initial content drafts, formatting suggestions, and phrasing were partially assisted by large language models (Google’s Gemini and OpenAI’s ChatGPT), while all final decisions and edits were made by the author.
Similarly, a significant portion of the unit tests were also initially generated by these large language models. This approach aided in rapidly building a foundational test suite and achieving initial code coverage. All LLM-generated tests have undergone thorough human review, verification, and refinement to ensure their correctness and effectiveness.