[yt-users] cutting plane not working or changed

Nathan Goldbaum nathan12343 at gmail.com
Wed Mar 15 13:59:41 PDT 2017


On Wed, Mar 15, 2017 at 3:49 PM, Slavin, Jonathan <jslavin at cfa.harvard.edu>
wrote:

> Hi Nathan,
>
> I think this may have to do with pixelization_routines.pyx.  I noticed
> that the version I have (i.e. 3.3.5) differs significantly from that
> under the main yt branch on bitbucket, which seems more recent.


Yes, as I mentioned in my last e-mail, there have been a lot of changes to
these files for yt 3.4.

(Is
> that the development branch?)


Yes, the development branch is named "yt".


> In particular the 3.3.5 version is
> lacking "NOTE ON ROWS AND COLUMNS" in pixelize_off_axis_cartesian and
> associates the width with rows and height with columns:
>
>     px_dx = width / (<np.float64_t> rows)
>     px_dy = height / (<np.float64_t> cols)
>
> In the newer version the argument list is different and instead there is
>
>     px_dx = width / (<np.float64_t> buff.shape[1])
>     px_dy = height / (<np.float64_t> buff.shape[0])
>
> where, I believe buff corresponds to the argument to resolution, so
> resolution should be (h,w) which seems to contrast with the situation
> in the stable branch version.
>

Right, this is made more confusing by the stable branch having a
.transpose() call wherever these functions were actually called. Yi-hao
chen ran into this several months ago:

https://bitbucket.org/yt_analysis/yt/pull-requests/2120

Yi-hao's solution ended up not quite fixing the full issue, so we ended up
going with a solution from Matt which came in as part of this pull request:

https://bitbucket.org/yt_analysis/yt/pull-requests/2245

This pull request made some major changes so we didn't backport it as a
bugfix to the stable branch, which is why it's no included in yt 3.3.5. It
will be included with yt 3.4.0 when we release that.


> Jon
>
>
> On Wed, Mar 15, 2017 at 2:00 PM, <yt-users-request at lists.spacepope.org>
> wrote:
> >
> > Date: Wed, 15 Mar 2017 14:00:17 -0400
> > From: "Slavin, Jonathan" <jslavin at cfa.harvard.edu>
> > To: yt-users at lists.spacepope.org
> > Subject: Re: [yt-users] cutting plane not working or changed
> > Message-ID:
> >         <CACcRS=fo5KiYBdnu3EvEyuq5vA-UGFK4jRK1soPM-5E1LPWa-w at mail.
> gmail.com>
> > Content-Type: text/plain; charset="utf-8"
> >
> > ?Hi Nathan,
> >
> > I finally got around to testing your code on LodegIt that uses the
> > IsolatedGalaxy data.  I ran it as is except I added some plotting
> > statements (using matplotlib) at the end.  I again do get the problem of
> > NaNs:
> >
> > ?In [2]: run slice_prob_test.py
> > Parsing Hierarchy : 100%|??????????????????| 173/173 [00:00<00:00,
> > 23359.45it/s]
> > /export/slavin/python/anaconda/lib/python2.7/site-
> packages/yt/visualization/fixed_resolution.py:546:
> > RuntimeWarning: invalid value encountered in divide
> >   bounds).transpose()
> > (nan g/cm**3, nan g/cm**3)
> > True
> >
> > ?Where the (nan g/cm**3... line is from the print(image.max()...
> > statement.  Also np.any(np.isnan(image)) returns True.  The image that is
> > produced is shown in the attached png file.
> >
> > The RuntimeWarning is apparently associated with this statement:
> > ?buff = pixelize_off_axis_cartesian(
> >                                self.data_source['x'],
> > self.data_source['y'],   self.data_source['z'],
> >                                self.data_source['px'],
> >  self.data_source['py'],
> >                                self.data_source['pdx'],
> > self.data_source['pdy'], self.data_source['pdz'],
> >                                self.data_source.center,
> > self.data_source._inv_mat, indices,
> >                                self.data_source[item],
> >                                self.buff_size[0], self.buff_size[1],
> >                                bounds).transpose()
> >
> > ?which is in the __getitem__ method of ?the ObliqueFixedResolutionBuffer
> > class.  That's about all I could tell you at this point.
> >
> > The package versions I'm using are yt 3.3.5, python 2.7.12, matplotlib
> > 2.0.0 (running on Linux CentOS 6.8 if that matters).
> >
> > ?Regards,
> > Jon?
> >
> >
> >
> > On Fri, Mar 10, 2017 at 4:05 PM, <yt-users-request at lists.spacepope.org>
> > wrote:
> >
> > > Date: Fri, 10 Mar 2017 12:14:55 -0800
> > > From: Nathan Goldbaum <nathan12343 at gmail.com>
> > > To: Discussion of the yt analysis package
> > >         <yt-users at lists.spacepope.org>
> > > Subject: Re: [yt-users] cutting plane not working or changed behavior
> > > Message-ID:
> > >         <CAJXewOmWwY1CU4nrafG5_=GrAScGBnq=VMNxxh3s0OUzDzaGVw@
> > > mail.gmail.com>
> > > Content-Type: text/plain; charset="utf-8"
> > >
> > > Hi Jonathan,
> > >
> > > I'm not able to reproduce the behavior you're seeing with a test
> dataset
> > > (e.g. see http://paste.yt-project.org/show/7080/, this uses a dataset
> from
> > > yt-project.org/data).
> > >
> > > Is there any chance you can share a dataset that triggers this?
> > > Alternatively, can you reproduce this using one of the test datasets on
> > > yt-project.org/data?
> > >
> > > The yt curldrop might be useful to share a dataset that triggers the
> issue
> > > you're seeing, see docs.hub.yt. If you're not comfortable sharing the
> > > dataset publicly, feel free to share it with me off-list.
> > >
> > > -Nathan
> > >
>
>
>
>
>
> --
> ________________________________________________________
> Jonathan D. Slavin                 Harvard-Smithsonian CfA
> jslavin at cfa.harvard.edu       60 Garden Street, MS 83
> phone: (617) 496-7981       Cambridge, MA 02138-1516
> cell: (781) 363-0035             USA
> ________________________________________________________
> _______________________________________________
> 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/20170315/d93938a9/attachment.html>


More information about the yt-users mailing list