[yt-users] particle smoothing bug in latest version of yt
Desika Narayanan
dnarayan at haverford.edu
Thu May 15 03:59:28 PDT 2014
Hey Matt,
Thanks for looking into it - the field list is printed below
(Pdb) pprint.pprint(sorted(pf.field_list))
[('PartType0', 'Coordinates'),
('PartType0', 'Density'),
('PartType0', 'ElectronAbundance'),
('PartType0', 'InternalEnergy'),
('PartType0', 'Masses'),
('PartType0', 'Metallicity'),
('PartType0', 'NeutralHydrogenAbundance'),
('PartType0', 'ParticleIDs'),
('PartType0', 'Potential'),
('PartType0', 'SmoothingLength'),
('PartType0', 'StarFormationRate'),
('PartType0', 'Velocities'),
('PartType1', 'Coordinates'),
('PartType1', 'Masses'),
('PartType1', 'ParticleIDs'),
('PartType1', 'Potential'),
('PartType1', 'Velocities'),
('PartType2', 'Coordinates'),
('PartType2', 'Masses'),
('PartType2', 'ParticleIDs'),
('PartType2', 'Potential'),
('PartType2', 'Velocities'),
('PartType3', 'Coordinates'),
('PartType3', 'Masses'),
('PartType3', 'ParticleIDs'),
('PartType3', 'Potential'),
('PartType3', 'Velocities'),
('PartType4', 'Coordinates'),
('PartType4', 'Masses'),
('PartType4', 'Metallicity'),
('PartType4', 'ParticleIDs'),
('PartType4', 'Potential'),
('PartType4', 'StellarFormationTime'),
('PartType4', 'Velocities'),
('PartType5', 'BH_Mass'),
('PartType5', 'BH_Mdot'),
('PartType5', 'Coordinates'),
('PartType5', 'Masses'),
('PartType5', 'ParticleIDs'),
('PartType5', 'Potential'),
('PartType5', 'Velocities'),
('all', 'Coordinates'),
('all', 'Masses'),
('all', 'ParticleIDs'),
('all', 'Potential'),
('all', 'Velocities')]
On Thu, May 15, 2014 at 6:49 AM, Matthew Turk <matthewturk at gmail.com> wrote:
> 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
> >
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140515/c2cd5602/attachment.html>
More information about the yt-users
mailing list