[yt-users] Comparing AMR slices or projections with a Fixed Resolution Array

Matthew Turk matthewturk at gmail.com
Thu Nov 12 07:17:25 PST 2015


Hi Carla,

One immediate thing to try out is specifying the interpolation as
nearest, like so:

plt.imshow(cube[0,:,:], interpolation='nearest', origin='lower')

The other is that it may be the case that either there's a
righthand/lefthand issue, or the origin is not what you might expect.
The origin='lower' will set it so that 0,0 is lower left, instead of
upper left.

On Thu, Nov 12, 2015 at 8:57 AM, Carla Bernhardt
<carla.j.bernhardt at gmail.com> wrote:
> Dear yt users,
>
> I am trying to visually compare a unigrid data cube produced with
> smoothed_covering_grid to my AMR enzo Slice (or projection) produced with
> SlicePlot (or ProjectionPlot). Using numpy, I converted the fixed resolution
> array from the smoothed_covering_grid to a data array and displayed via
> imshow, but the results look similar but significantly different to the AMR
> enzo Slices or Projections. Part of code below:
>
> cg=ds.smoothed_covering_grid(1,[0,0,0], ds.domain_dimensions*2**1)
> data=cg['density']
> cube = np.array(data)
> plt.imshow(cube[0,:,:])
> plt.savefig('unigrid.png')
>
> Suggestions?
>
> Thanks,
> Carla Bernhardt
> PhD Student
> Institut für Theoretische Astrophysik
> Universität Heidelberg
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list