It does.
However I changed something since my last email, now I'm getting a
different error. Now I get:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/dccollins/local/src/yt-hg/yt/data_objects/grid_patch.py",
line 147, in __getitem__
self.get_data(key)
File "/Users/dccollins/local/src/yt-hg/yt/data_objects/grid_patch.py",
line 190, in get_data
self._generate_field(field)
File "/Users/dccollins/local/src/yt-hg/yt/data_objects/grid_patch.py",
line 135, in _generate_field
self[field] = self.pf.field_info[field](self)
File "/Users/dccollins/local/src/yt-hg/yt/data_objects/field_info_container.py",
line 308, in __call__
dd *= self._convert_function(data)
TypeError: unsupported operand type(s) for *=: 'NoneType' and 'float'
That leads me to believe this is operator error-- I'll poke around
more and get back to you.
Thanks,
d.
On Mon, Jun 20, 2011 at 8:58 PM, Matthew Turk
Hi Dave,
Does it show up in the list of detected fields when debug mode is on?
-Matt
On Mon, Jun 20, 2011 at 7:53 PM, david collins
wrote: Hi--
I have (a probably stupid) problem. I have a field that I'm writing out to some grids. The field is called 'AvgElec0', and only exists on level>0 grids (non-root-grids). I've defined this field
def _AEx(field,data): return data['AvgElec0'][:,:-1,:-1] add_field('AEx',function=_AEx,validators=[ValidateSpatial(0)],take_log=False,not_in_all=True)
(the slice is for the centering of the field). When I do something like pf.h.grids[1]['AEx'] I get a key error, "AvgElec0," even though double checking the field is in fact in that grid. If I change the code so it's written on all levels, the same pf.h.grids[1]['AEx'] works fine, as one would expect. Has the not_in_all behavior changed? Might I be doing something stupid?
Thanks, d.
-- Sent from my computer. _______________________________________________ Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
-- Sent from my computer.