NuGridPy

General Overview
Python codes for plotting the data created by PPN or MPPNP.

Installation
Download from the NuGrid github (or git clone). In the nugridpy directory, the package is made. For installation or running NuGridPy, you may need to fix some parts of these python codes.


 * 1) ppn.py (e.g., change from .data_plot import * --> from data_plot import *; from . import utils --> import utils)
 * 2) utils.py (e.g., change from . import ascii_table as att --> import ascii_table as att)
 * 3) data_plot.py (e.g., change from . import astronomy as ast --> import astronomy as ast)
 * 4) mesa.py (e.g., from . import astronomy as ast --> import astronomy as ast, from .data_plot import * --> from data_plot import *)

Plotting python scripts
Typically these code exist in "python scripts" directory of example codes. Some useful scripts are


 * 1) plot-x.py (plot whatever (typically time) vs abundance; made from x-time.dat)
 * 2) abu_chart.py (plot 2D (nuclear chart) abundance plot for one specific time; made from iso_massf****.DAT)
 * 3) plot_isoabund.py (plot 1D abundance plot for one specific time; made from iso_massf****.DAT)
 * 4) abu_evolution.py (plot time vs abundance; made from x-time.DAT)

Below are memos to avoid running errors.

abu_chart.py
In data_plot.py, ahead of return self._classTest_data.get(c, ''), change c = '.'.join(str(self.__class__)[:-2].rsplit('.', 2)[-2:])

to something defined in _classTest_data. For example,

c = "ppn.abu_vector"

This is needed because plotType = _classTest function doesn't successfully read the string.

plot-x.py
In x.plot('t_y',thing,logy=True,logx=True,shape=symbs[i],legend=plot_species[i],show=False), change t_y to real variable name used in the x-time.DAT (like 'time').

Note this code also needs to change to c = ppn.xtime" in data_plot.py.

analysis.py
I made this for analyzing mppnp outputs (hdf5 format).