Plot radial profiles

This notebook should work with the "latest" PPMstar astrohub image. Select local PyPPM version below only needed for testing.


In [ ]:
%pylab ipympl

In [ ]:
import sys, os
sys.path.insert(1, '/user/scratch14_csa/fherwig/repos/PyPPM')

In [ ]:
from ppmpy import ppm   # github version v0.92 (Nov 26, 2019)

In [ ]:
# Specify path to rprofs
cases = ['M36-100x-768',  'M37-10000x-768']
dir_repo    = '/data/ASDR/PPMstar'
dir_project = 'H-core-M25'
path1 = os.path.join(dir_repo,dir_project,cases[0],'prfs') 
path1 = os.path.join(dir_repo,dir_project,cases[1],'prfs')

In [ ]:
help(rp1.rprofgui)

In [ ]:
rp1 = ppm.RprofSet(path1)
rp1.rprofgui(ifig=1)
title(cases[0])

In [ ]:
rp2 = ppm.RprofSet(path2)
rp1.rprofgui(ifig=2)
title(cases[1])

Manual plot

Example of how to plot radial profiles from two runs.

  1. Select a variable to plot.
  2. Use the rp_plot method.

For more examples of using RProf files see PPMnotebooks/Demos/rprof_demo.ipynb (on github.com/PPMstar/PPMnotebooks).


In [ ]:
ifig=12;close(ifig);figure(ifig)
dumps = list(range(200,401,200))
labels = cases
yvar = 'FV'
rp1.rp_plot(dumps,yvar,ifig=ifig,logy=True,runlabel=labels[0])
rp2.rp_plot(dumps,yvar,ifig=ifig,logy=True,yylim=(-3,0.1),\
                  xxlim=(0,2000),newfig=False,idn=1,runlabel=labels[1])

In [ ]: