Jupyter notebook interface for the MESA code.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This is MAGPIE

A small handy tool for editing runs for MESA (http://mesa.sourceforge.net/) from the comfort of a jupyter notebook.

What can it do?

  1. Display inlists as tables with qgrid for easy editing
  2. Read defaults to see and browse parameters from MESA
  3. Write inlists to your workfolder
  4. Compile your workfolder
  5. Plot profiles and history data (through mesa reader)

Ok, how do I do all this?

First, make sure you have all the required packages. (all of these are pip-able, except mesa reader, which is +1 command)

Required packages (as of 17/11/01)

  • numpy
  • pandas
  • jupyter
  • qgrid (specific version so that tables are editable)
    • pip install qgrid==1.0.0b3
    • jupyter nbextension enable --py --sys-prefix qgrid
  • mesa reader

Then, import magpie.py to your notebook and that's it.


Yes, you can run

  • git clone https://github.com/frivasa/magpie.git

but since the tool is lightweight, you can just download or copy the magpie.py file directly to your working directory, and the notebook example to get started quickly. For plotting the output, do the same with plotting.py (17/11/20: I have not joined both files because of the added installation of mesa reader).

Crash course

Use the included notebook or see this .io article to get a feel of how to use it. (17/11/20: Plotting routines are straightforward).