[yt-users] Simple radial profile

Nicholas M. Earl earlnich at msu.edu
Mon Oct 19 17:37:13 PDT 2009


Hey all,

I was hoping that someone might have a suggestion or answer for an  
issue I'm having with generating simple radial profiles from  
simulation data. The profiles automatically generate axis bounds and  
while I can set the bounds on the x axis using the x_bounds parameter,  
I don't know how, or if it's even possible, to set a similar  
restriction for the y axis. (I have tried simply setting a y_bounds  
parameter, but the script breaks stating that y_bounds is unrecognized).

Here is an example of the code:

from yt.mods import * # set up our namespace

for n in range(1,242):
         pf = load("/work/01198/earln/RSW_nC_1-0/DD%04i/DD%04i" % (n,n))
         pc = PlotCollection(pf, center=[0.5, 0.5, 0.5])
         pc.add_profile_sphere(10.0, "mpc",
         ["Radius", "RadialVelocity"], weight="CellMassMsun",  
x_bounds=(1.0e+18,1.0e+20), y_bounds=(1e-3, 1.e+8))
         pc.save("/work/01198/earln/RSW_nC_1-0/graph-data_radvel/ 
profiles/%s" % pf)

Any suggestions or help would be greatly appreciated,
Nicholas Earl



More information about the yt-users mailing list