[yt-users] find_max error

Stella Offner soffner at cfa.harvard.edu
Tue Mar 6 07:48:32 PST 2012


Hi,

I'm working with an undergrad student doing Orion data analysis using  
the most recent stable version of yt (he attended the recent yt  
workshop - yea!). However, he is encountering this error with his yt  
installation:
File "slicePJ.py", line 18, in <module>
    c = pf.h.find_max("Density") #this involves finding the max density
  File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/ 
static_output.py", line 172, in hierarchy
    self, data_style=self.data_style)
  File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/frontends/orion/ 
data_structures.py", line 131, in __init__
    self._setup_field_list()
  File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/frontends/orion/ 
data_structures.py", line 365, in _setup_field_list
    for field in self.field_info:
AttributeError: 'OrionHierarchy' object has no attribute 'field_info'
I can't reproduce this error on any of my own yt installations with  
the data (although my versions are a bit older). His script (below) is  
pretty straight forward and successfully loads the data first. Any  
ideas?

from yt.mods import *
from yt.funcs import *
import particles
import fields
"""
The next section is taken from the yt cookbook as a basic test to make  
sure I can get everything to work
"""
fn = "p1a09025"
pf = load(fn)
pf = load(fn) # load data
pc = PlotCollection(pf) # defaults to center at most dense point
pc.add_slice("Density", 0) # 0 = x-axis
pc.add_slice("Density", 1) # 1 = y-axis
pc.add_slice("Density", 2) # 2 = z-axis
#pc.set_width(1.5, 'mpc') # change width of all plots in pc  #I have  
commented this line from the cookbook version
pc.save(fn) # save all plots
"""
Below are commented versions of older efforts, working off from what I  
did at the yt workshop
"""
#dd = pf.h.all_data()
#c = pf.h.find_max("Density") #this involves finding the max density
#pc = PlotCollection(pf) #recentering  # commenented out the(  ,c ) in  
the argument to test if
#p1 = pc.add_slice("Temperature", 2)
#p2 = pc.add_projection("Density", 2, "Density")
#pc.set_width(0.1, "unitary")
#pc.set_cmap("cool")

Thanks!
Stella



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20120306/b88084aa/attachment.htm>


More information about the yt-users mailing list