[yt-users] Problems with fields

Matthew Turk matthewturk at gmail.com
Tue Sep 24 03:47:10 PDT 2013


Hi Cameron,

On Mon, Sep 23, 2013 at 11:00 PM, Cameron Hummels <chummels at gmail.com> wrote:
> Hello fellow yt'ers:
>
> I'm having some issues with some fields that I don't think are behaving the
> way they should be in yt.  I'm encountering a number of problems with a
> simple 2D enzo dataset (x and y), so I put together a notebook demonstrating
> my various issues.
>
> https://hub.yt-project.org/nb/727j2j
>
> To summarize the weirdness from the notebook:
>
> 1) The 'dx' field doesn't seem to be able to be displayed (i.e. when I try
> to slice it), whereas the 'dy' field is fine.  'dz' even exists, but it's
> just uniformly 0, as is expected from a 2D dataset.
>
> 2) When I try to produce a new field which is 2^GridLevel, I get weird
> results (ignored levels and more).
>
> 3-5) I get strange behavior when trying to make a new field combining
> GridLevel and 'dy', since GridLevel  has twice as many indices as any of the
> spatial fields (in the z direction no less).  This results in some odd
> behavior when I try to pair various subsets of GridLevel with 'dy'.
>

Just to echo what Sam said, the field definitions you are using in
many cases have an additional index from the ValidateSpatial call you
supply.

An additional comment is that oftentimes, visualization is not the
only way to inspect what appear to be oddities.  As an example,
operations like this:

dd = pf.h.all_data()
print np.unique(dd["dx"] * 2**dd["GridLevels"])

and so on can give useful pieces of information as well.

> Any clarification of these ideas is welcome.  The docs and source haven't
> yet revealed what is going on here.  Thanks!
>
> Cameron
>
> --
> Cameron Hummels
> Postdoctoral Researcher
> Steward Observatory
> University of Arizona
> http://chummels.org
>
> _______________________________________________
> 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