[Yt-dev] Hierarchy optimization

Jennifer Jones westbr39 at msu.edu
Tue Sep 1 13:51:28 PDT 2009


I have a coding question:

If my code reads:
from yt.mods import *

pf = load("/Users/Jennifer/work/little_galcluster_highres_crs/RD0031/ 
RD0031")
pc = PlotCollection(pf)



def Press(field, data):
     densq= (data["Density"]*data["Density"])
     return densq
add_field("Press", function=Press, units=r"\rm{g}/\rm{cm}^{2}")


pc.add_projection("Press",0)
print pc.save("test1")

It fails.

But if there is "Pressure" in place of ever "press" it works.  What is  
the reason for that to occur?

Thanks,
Jennifer

P.S. yes I am aware that this is not actually creating pressure.



More information about the yt-dev mailing list