Re: [yt-users] cutting plane not working or changed
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 / (
Date: Wed, 15 Mar 2017 14:00:17 -0400 From: "Slavin, Jonathan"
To: yt-users@lists.spacepope.org Subject: Re: [yt-users] cutting plane not working or changed Message-ID: 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,
wrote: Date: Fri, 10 Mar 2017 12:14:55 -0800 From: Nathan Goldbaum
To: Discussion of the yt analysis package Subject: Re: [yt-users] cutting plane not working or changed behavior Message-ID: 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@cfa.harvard.edu 60 Garden Street, MS 83 phone: (617) 496-7981 Cambridge, MA 02138-1516 cell: (781) 363-0035 USA ________________________________________________________
On Wed, Mar 15, 2017 at 3:49 PM, Slavin, Jonathan
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 / (
rows) px_dy = height / ( cols) In the newer version the argument list is different and instead there is
px_dx = width / (
buff.shape[1]) px_dy = height / ( 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,
wrote: Date: Wed, 15 Mar 2017 14:00:17 -0400 From: "Slavin, Jonathan"
To: yt-users@lists.spacepope.org Subject: Re: [yt-users] cutting plane not working or changed Message-ID: 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-
gmail.com> 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,
wrote: Date: Fri, 10 Mar 2017 12:14:55 -0800 From: Nathan Goldbaum
To: Discussion of the yt analysis package Subject: Re: [yt-users] cutting plane not working or changed behavior Message-ID: 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@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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (2)
-
Nathan Goldbaum
-
Slavin, Jonathan