<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 15, 2017 at 3:49 PM, Slavin, Jonathan <span dir="ltr"><<a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Nathan,<br>
<br>
I think this may have to do with pixelization_routines.pyx. I noticed<br>
that the version I have (i.e. 3.3.5) differs significantly from that<br>
under the main yt branch on bitbucket, which seems more recent.</blockquote><div><br></div><div>Yes, as I mentioned in my last e-mail, there have been a lot of changes to these files for yt 3.4.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">(Is<br>
that the development branch?) </blockquote><div><br></div><div>Yes, the development branch is named "yt".</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In particular the 3.3.5 version is<br>
lacking "NOTE ON ROWS AND COLUMNS" in pixelize_off_axis_cartesian and<br>
associates the width with rows and height with columns:<br>
<br>
px_dx = width / (<np.float64_t> rows)<br>
px_dy = height / (<np.float64_t> cols)<br>
<br>
In the newer version the argument list is different and instead there is<br>
<br>
px_dx = width / (<np.float64_t> buff.shape[1])<br>
px_dy = height / (<np.float64_t> buff.shape[0])<br>
<br>
where, I believe buff corresponds to the argument to resolution, so<br>
resolution should be (h,w) which seems to contrast with the situation<br>
in the stable branch version.<br></blockquote><div><br></div><div>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:</div><div><br></div><div><a href="https://bitbucket.org/yt_analysis/yt/pull-requests/2120">https://bitbucket.org/yt_analysis/yt/pull-requests/2120</a><br></div><div><br></div><div>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:</div><div><br></div><div><a href="https://bitbucket.org/yt_analysis/yt/pull-requests/2245">https://bitbucket.org/yt_analysis/yt/pull-requests/2245</a><br></div><div><br></div><div>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.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Jon<br>
<br>
<br>
On Wed, Mar 15, 2017 at 2:00 PM, <<a href="mailto:yt-users-request@lists.spacepope.org">yt-users-request@lists.<wbr>spacepope.org</a>> wrote:<br>
><br>
> Date: Wed, 15 Mar 2017 14:00:17 -0400<br>
> From: "Slavin, Jonathan" <<a href="mailto:jslavin@cfa.harvard.edu">jslavin@cfa.harvard.edu</a>><br>
> To: <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<span class="gmail-">> Subject: Re: [yt-users] cutting plane not working or changed<br>
</span>> Message-ID:<br>
> <CACcRS=<a href="mailto:fo5KiYBdnu3EvEyuq5vA-UGFK4jRK1soPM-5E1LPWa-w@mail.gmail.com">fo5KiYBdnu3EvEyuq5vA-<wbr>UGFK4jRK1soPM-5E1LPWa-w@mail.<wbr>gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
><br>
> ?Hi Nathan,<br>
<span class="gmail-">><br>
> I finally got around to testing your code on LodegIt that uses the<br>
> IsolatedGalaxy data. I ran it as is except I added some plotting<br>
> statements (using matplotlib) at the end. I again do get the problem of<br>
> NaNs:<br>
><br>
</span>> ?In [2]: run slice_prob_test.py<br>
> Parsing Hierarchy : 100%|??????????????????| 173/173 [00:00<00:00,<br>
<span class="gmail-">> 23359.45it/s]<br>
> /export/slavin/python/<wbr>anaconda/lib/python2.7/site-<wbr>packages/yt/visualization/<wbr>fixed_resolution.py:546:<br>
> RuntimeWarning: invalid value encountered in divide<br>
> bounds).transpose()<br>
> (nan g/cm**3, nan g/cm**3)<br>
> True<br>
><br>
</span>> ?Where the (nan g/cm**3... line is from the print(image.max()...<br>
<span class="gmail-">> statement. Also np.any(np.isnan(image)) returns True. The image that is<br>
> produced is shown in the attached png file.<br>
><br>
> The RuntimeWarning is apparently associated with this statement:<br>
</span>> ?buff = pixelize_off_axis_cartesian(<br>
<span class="gmail-">> self.data_source['x'],<br>
> self.data_source['y'], self.data_source['z'],<br>
> self.data_source['px'],<br>
> self.data_source['py'],<br>
> self.data_source['pdx'],<br>
> self.data_source['pdy'], self.data_source['pdz'],<br>
> self.data_source.center,<br>
> self.data_source._inv_mat, indices,<br>
> self.data_source[item],<br>
> self.buff_size[0], self.buff_size[1],<br>
> bounds).transpose()<br>
><br>
</span>> ?which is in the __getitem__ method of ?the ObliqueFixedResolutionBuffer<br>
<span class="gmail-">> class. That's about all I could tell you at this point.<br>
><br>
> The package versions I'm using are yt 3.3.5, python 2.7.12, matplotlib<br>
> 2.0.0 (running on Linux CentOS 6.8 if that matters).<br>
><br>
</span>> ?Regards,<br>
> Jon?<br>
<div class="gmail-HOEnZb"><div class="gmail-h5">><br>
><br>
><br>
> On Fri, Mar 10, 2017 at 4:05 PM, <<a href="mailto:yt-users-request@lists.spacepope.org">yt-users-request@lists.<wbr>spacepope.org</a>><br>
> wrote:<br>
><br>
> > Date: Fri, 10 Mar 2017 12:14:55 -0800<br>
> > From: Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>><br>
> > To: Discussion of the yt analysis package<br>
> > <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
> > Subject: Re: [yt-users] cutting plane not working or changed behavior<br>
> > Message-ID:<br>
> > <CAJXewOmWwY1CU4nrafG5_=<wbr>GrAScGBnq=VMNxxh3s0OUzDzaGVw@<br>
> > <a href="http://mail.gmail.com" rel="noreferrer" target="_blank">mail.gmail.com</a>><br>
> > Content-Type: text/plain; charset="utf-8"<br>
> ><br>
> > Hi Jonathan,<br>
> ><br>
> > I'm not able to reproduce the behavior you're seeing with a test dataset<br>
> > (e.g. see <a href="http://paste.yt-project.org/show/7080/" rel="noreferrer" target="_blank">http://paste.yt-project.org/<wbr>show/7080/</a>, this uses a dataset from<br>
> > <a href="http://yt-project.org/data" rel="noreferrer" target="_blank">yt-project.org/data</a>).<br>
> ><br>
> > Is there any chance you can share a dataset that triggers this?<br>
> > Alternatively, can you reproduce this using one of the test datasets on<br>
> > <a href="http://yt-project.org/data" rel="noreferrer" target="_blank">yt-project.org/data</a>?<br>
> ><br>
> > The yt curldrop might be useful to share a dataset that triggers the issue<br>
> > you're seeing, see <a href="http://docs.hub.yt" rel="noreferrer" target="_blank">docs.hub.yt</a>. If you're not comfortable sharing the<br>
> > dataset publicly, feel free to share it with me off-list.<br>
> ><br>
> > -Nathan<br>
> ><br>
<br>
<br>
<br>
<br>
<br>
--<br>
______________________________<wbr>__________________________<br>
Jonathan D. Slavin Harvard-Smithsonian CfA<br>
<a href="mailto:jslavin@cfa.harvard.edu">jslavin@cfa.harvard.edu</a> 60 Garden Street, MS 83<br>
phone: <a href="tel:%28617%29%20496-7981" value="+16174967981">(617) 496-7981</a> Cambridge, MA 02138-1516<br>
cell: <a href="tel:%28781%29%20363-0035" value="+17813630035">(781) 363-0035</a> USA<br>
______________________________<wbr>__________________________<br>
______________________________<wbr>_________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
</div></div></blockquote></div><br></div></div>