[yt-users] cutting plane not working or changed

Slavin, Jonathan jslavin at cfa.harvard.edu
Wed Mar 15 13:49:30 PDT 2017


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. (Is
that the development branch?)  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.

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
________________________________________________________



More information about the yt-users mailing list