[yt-users] particle smoothing bug in latest version of yt

Matthew Turk matthewturk at gmail.com
Thu May 15 03:49:48 PDT 2014


Hi Desika,

Looks like a bug, yes.  I think the problem is that "metal_density" is
not getting aliased correctly for your dataset.  What is the output
of:

import pprint
pprint.pprint(sorted(ds.field_list))

where ds is your dataset.

-Matt

On Wed, May 14, 2014 at 9:05 AM, Desika Narayanan
<dnarayan at haverford.edu> wrote:
> Hi YT,
>
> I have a function that loads a pf from a Gadget data set, and then smooths a
> few physical quantities (gas metallicity; mass; density) onto an octree, and
> then returns them:
>
> http://paste.yt-project.org/show/4624/
>
> in an older version of yt (3.0) that I'm using: 7cf523a36d10 (yt-3.0)
>
> this works, no problem.  if I run yt-update, to get to:  4d1488b8fa47
>
> this gives the following traceback copied below.  Has something important
> changed that should affect the way I use smoothing functions?
>
> -desika
>
>
>
>
>   File "/Users/desika/Dropbox/powderday/particle_smooth_yt.py", line 41, in
> yt_smooth
>     saved["metallicity"] = ad["gas", "metallicity"]
>   File
> "/Users/desika/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line
> 214, in __getitem__
>     self.get_data(f)
>   File
> "/Users/desika/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line
> 623, in get_data
>     self._generate_fields(fields_to_generate)
>   File
> "/Users/desika/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line
> 640, in _generate_fields
>     fd = self._generate_field(field)
>   File
> "/Users/desika/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line
> 251, in _generate_field
>     tr = self._generate_fluid_field(field)
>   File
> "/Users/desika/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line
> 271, in _generate_fluid_field
>     rv = finfo(gen_obj)
>   File "/Users/desika/yt-x86_64/src/yt-hg/yt/fields/derived_field.py", line
> 178, in __call__
>     dd = self._function(self, data)
>   File "/Users/desika/yt-x86_64/src/yt-hg/yt/fields/fluid_fields.py", line
> 153, in _metallicity
>     tr = data[ftype, "metal_density"] / data[ftype, "density"]
>   File
> "/Users/desika/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line
> 207, in __getitem__
>     f = self._determine_fields([key])[0]
>   File
> "/Users/desika/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line
> 455, in _determine_fields
>     finfo = self.pf._get_field_info(ftype, fname)
>   File "/Users/desika/yt-x86_64/src/yt-hg/yt/data_objects/static_output.py",
> line 487, in _get_field_info
>     raise YTFieldNotFound((ftype, fname), self)
> yt.utilities.exceptions.YTFieldNotFound: Could not find field '('gas',
> 'metal_density')' in snapshot_006.
>
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list