producing smooth sliceplots instead of pixelated sliceplot images
Hi People, I was wondering if yt can produce smooth images of zoomed-in sliceplots, where the pixelated AMR grids are not clearly visible. I was interested to see the colors get mixed in smoothly (something like tetrahedralization), is that possible anyway in yt? Best Tazkera
Hi Tazkera, There's not, unfortunately. We have experimented with this in the past, but the results weren't ever satisfactory. You might try a very thin slice with an off-axis projection, which may accomplish the same result. -Matt On Tue, May 30, 2017 at 12:06 AM, tazkera haque <h.tazkera@gmail.com> wrote:
Hi People,
I was wondering if yt can produce smooth images of zoomed-in sliceplots, where the pixelated AMR grids are not clearly visible. I was interested to see the colors get mixed in smoothly (something like tetrahedralization), is that possible anyway in yt?
Best Tazkera
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Assuming these are slices through an AMR simulation, you could try manually plotting the images using matplotlib's imshow command: https://matplotlib.org/devdocs/api/_as_gen/matplotlib.axes.Axes.imshow. html#matplotlib-axes-axes-imshow In particular experimenting with the "interpolation" keyword argument. By default, yt uses "interpolation='nearest'" (see https://github.com/yt- project/yt/blob/master/yt/visualization/base_plot_types.py#L218) as this is the "truest" representation of voxelized data in a pixelized representation. You can see how different interpolation choices look in this example in the matplotlib docs: https://matplotlib.org/examples/images_contours_and_fields/interpolation_met... This choice to use "interpolation='nearest'" in SlicePlot was intentional and I don't think we want to expose the ability to customize the interpolation, but of course you can create your own visualizations outside of SlicePlot using a FixedResolutionBuffer and the manual plotting interface. On Tue, May 30, 2017 at 9:34 AM, Matthew Turk <matthewturk@gmail.com> wrote:
Hi Tazkera,
There's not, unfortunately. We have experimented with this in the past, but the results weren't ever satisfactory. You might try a very thin slice with an off-axis projection, which may accomplish the same result.
-Matt
On Tue, May 30, 2017 at 12:06 AM, tazkera haque <h.tazkera@gmail.com> wrote:
Hi People,
I was wondering if yt can produce smooth images of zoomed-in sliceplots, where the pixelated AMR grids are not clearly visible. I was interested to see the colors get mixed in smoothly (something like tetrahedralization), is that possible anyway in yt?
Best Tazkera
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
On Tue, May 30, 2017 at 9:44 AM, Nathan Goldbaum <nathan12343@gmail.com> wrote:
Assuming these are slices through an AMR simulation, you could try manually plotting the images using matplotlib's imshow command:
https://matplotlib.org/devdocs/api/_as_gen/matplotlib.axes.Axes.imshow.html#...
In particular experimenting with the "interpolation" keyword argument. By default, yt uses "interpolation='nearest'" (see https://github.com/yt-project/yt/blob/master/yt/visualization/base_plot_type...) as this is the "truest" representation of voxelized data in a pixelized representation.
One thing to note that the interpolation matplotlib will apply is not based on the AMR cells, but the regularization of those cells to a fixed buffer. So you'll still see the voxels, but they'll be fuzzy at the very edges.
You can see how different interpolation choices look in this example in the matplotlib docs:
https://matplotlib.org/examples/images_contours_and_fields/interpolation_met...
This choice to use "interpolation='nearest'" in SlicePlot was intentional and I don't think we want to expose the ability to customize the interpolation, but of course you can create your own visualizations outside of SlicePlot using a FixedResolutionBuffer and the manual plotting interface.
On Tue, May 30, 2017 at 9:34 AM, Matthew Turk <matthewturk@gmail.com> wrote:
Hi Tazkera,
There's not, unfortunately. We have experimented with this in the past, but the results weren't ever satisfactory. You might try a very thin slice with an off-axis projection, which may accomplish the same result.
-Matt
On Tue, May 30, 2017 at 12:06 AM, tazkera haque <h.tazkera@gmail.com> wrote:
Hi People,
I was wondering if yt can produce smooth images of zoomed-in sliceplots, where the pixelated AMR grids are not clearly visible. I was interested to see the colors get mixed in smoothly (something like tetrahedralization), is that possible anyway in yt?
Best Tazkera
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Thanks very much for the discussions and suggestions Timothy, Nathan and Matt. I will follow the links and follow up with you. Best Tazkera On May 30, 2017 10:48 AM, "Matthew Turk" <matthewturk@gmail.com> wrote:
Assuming these are slices through an AMR simulation, you could try manually plotting the images using matplotlib's imshow command:
https://matplotlib.org/devdocs/api/_as_gen/matplotlib.axes.Axes.imshow.
On Tue, May 30, 2017 at 9:44 AM, Nathan Goldbaum <nathan12343@gmail.com> wrote: html#matplotlib-axes-axes-imshow
In particular experimenting with the "interpolation" keyword argument. By default, yt uses "interpolation='nearest'" (see https://github.com/yt-project/yt/blob/master/yt/
visualization/base_plot_types.py#L218)
as this is the "truest" representation of voxelized data in a pixelized representation.
One thing to note that the interpolation matplotlib will apply is not based on the AMR cells, but the regularization of those cells to a fixed buffer. So you'll still see the voxels, but they'll be fuzzy at the very edges.
You can see how different interpolation choices look in this example in
the
matplotlib docs:
https://matplotlib.org/examples/images_contours_and_ fields/interpolation_methods.html
This choice to use "interpolation='nearest'" in SlicePlot was intentional and I don't think we want to expose the ability to customize the interpolation, but of course you can create your own visualizations outside of SlicePlot using a FixedResolutionBuffer and the manual plotting interface.
On Tue, May 30, 2017 at 9:34 AM, Matthew Turk <matthewturk@gmail.com> wrote:
Hi Tazkera,
There's not, unfortunately. We have experimented with this in the past, but the results weren't ever satisfactory. You might try a very thin slice with an off-axis projection, which may accomplish the same result.
-Matt
On Tue, May 30, 2017 at 12:06 AM, tazkera haque <h.tazkera@gmail.com> wrote:
Hi People,
I was wondering if yt can produce smooth images of zoomed-in
sliceplots,
where the pixelated AMR grids are not clearly visible. I was interested to see the colors get mixed in smoothly (something like tetrahedralization), is that possible anyway in yt?
Best Tazkera
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (3)
-
Matthew Turk
-
Nathan Goldbaum
-
tazkera haque