[yt-users] Grid Transformation Inconsistency

Matthew Turk matthewturk at gmail.com
Thu Sep 12 09:04:17 PDT 2013


Hi Aaron,

Thanks for bringing this up -- I have identified the problem, and it's
two fold.  I've uploaded a notebook demonstrating the correct behavior
now, although note that imshow displays the image slightly differently
than the OffAxisSlicePlot.  I've also adjusted the notebook to use the
IsolatedGalaxy dataset.

http://hub.yt-project.org/nb/3e78d0

I've pushed a fix to the main repository:

https://bitbucket.org/yt_analysis/yt/commits/5d426da7bdb0fc4769b4e613de81a9f169d98a2c

The issues were that 1) the arbitrary_transform code, as you note,
references the obsolete attribute gridLevels.  I fixed this to
reference grid_levels, but that highlighted the second problem, which
was that grid_levels is of shape (Ng,1), and argsort will sort along
the second axis by default.  So it was returning 0 everywhere, and
only the first grid was being considered for interpolation.

Let me know if this does or doesn't work now -- and sorry for the trouble!

-Matt

On Wed, Sep 11, 2013 at 8:54 PM, Wienkers, Aaron F. <wienkers1 at llnl.gov> wrote:
> Hello yt users,
>
>    I am having a bit of trouble with a coordinate transformation using
> arbitrary_regrid.
> As a bit of background of my goal, I am trying to transform the coordinates
> of a data object to be parallel to the $\hat{z}$ direction, and then extract
> a uniformly-spaced grid from that. By defining a new, rotated meshgrid for
> use in arbitrary_regrid I've tried to accomplish this transformation;
> however, when making a mid-plane face-on slice through the regridded object,
> it (and the regridded but not rotated object) is not consistent with an
> OffAxisSlicePlot taken through the same mid-plane.
>
>    I would greatly appreciate any comments if you have experience with
> arbitrary_regrid (which it seems is not used much), or any doubts with my
> methods.
>
>
> Thank you!
>
>        Aaron Wienkers
>
> _______________________________________________
> 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