[yt-users] fixed resolution projections
Britton Smith
brittonsmith at gmail.com
Tue Dec 7 18:26:45 PST 2010
Hi all,
I'm having some problems with AMRFixedResProjectionBase.
I was at first getting this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/Users/britton/Documents/work/yt/yt/yt/data_objects/data_containers.py",
line 339, in __repr__
for i in self._con_args])
AttributeError: 'AMRFixedResProjection' object has no attribute
'weight_field'
So I added a weight_field kwarg to the __init__ function and a
self.weight_field attribute. That took care of the first error, but now if
I do
proj = pf.h.fixed_res_proj(0, 0, na.array([0,0,0]), 32, fields=['Density'])
proj['Density']
I get this:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/Users/britton/Documents/work/yt/yt/yt/data_objects/data_containers.py",
line 276, in __getitem__
self.get_data(key)
File
"/Users/britton/Documents/work/yt/yt/yt/data_objects/data_containers.py",
line 1816, in get_data
self._get_data_from_grid(grid, fields_to_get, dls)
File
"/Users/britton/Documents/work/yt/yt/yt/data_objects/data_containers.py",
line 1836, in _get_data_from_grid
FillBuffer(ref_ratio,
NameError: global name 'FillBuffer' is not defined
If instead I do this:
proj.data['Density']
I simply get an array full of zeros.
Does anyone have any advice or examples on using fixed resolution
projections?
Thanks,
Britton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20101207/6f7ce8cf/attachment.htm>
More information about the yt-users
mailing list