[Mesa-users] qpmg: Quickly Plot MESA or GYRE

Warrick Ball W.H.Ball at bham.ac.uk
Mon Sep 10 05:01:57 EDT 2018


Hi everyone,

For a while I've been using a fairly simple Python script to quickly inspect my 
MESA (and sometimes GYRE) output files.  I've finally (I hope?) packaged it 
into something that the outside world might be able to use. I've dubbed it 
"qpmg" for "Quickly Plot MESA or GYRE".  It should work with any files that 
follow the format of MESA profiles/histories or GYRE summaries/eigenfunction 
files.  It just allows you to plot columns that are in the given files, though 
it should be able to work out it can use logarithms appropriately (so it'll 
compute `log_L` from `L` if `log_L` isn't available).

The code is hosted on GitHub [1].  It's also available through the Python 
Package Index (PyPI) [2] so you can install it with

     pip install --user qpmg

The script uses whatever your system calls `python` and should work with Python 
2 or 3.  It only requires NumPy and Matplotlib.

Those two links and the readme provide details but, for a quick example, you 
can get a simple HR track with

     qpmg LOGS/history.data -x log_Teff -y log_L --flip-x

assuming `log_Teff` and `log_L` are columns in the history, which they are 
in the defaults.  Calling `qpmg` on a file without any further arguments 
will produce an error that lists the available columns.

Cheers,
Warrick

[1] https://github.com/warrickball/qpmg/
[2] https://pypi.org/project/qpmg/


------------
Warrick Ball
Postdoc, School of Physics and Astronomy
University of Birmingham, Edgbaston, Birmingham B15 2TT
W.H.Ball at bham.ac.uk
+44 (0)121 414 4552





More information about the Mesa-users mailing list