[yt-dev] Issue #677: Wrong scale in fixed_resolution_buffer (yt_analysis/yt)

Kacper Kowalik issues-reply at bitbucket.org
Fri Oct 18 08:41:14 PDT 2013


New issue 677: Wrong scale in fixed_resolution_buffer
https://bitbucket.org/yt_analysis/yt/issue/677/wrong-scale-in-fixed_resolution_buffer

Kacper Kowalik:

Following code:

```
#!python

import yt
from yt.mods import load
from matplotlib.pyplot import figure

# bbox = [[-1.5, 1.5], [-1.0, 1.0], [-1.0, 1.0]]
# density blob: radius = 0.25, r_0 = [-0.5, 0.0, 0.0]
pf = load('blob.h5')

if yt.__version__.startswith('2'):
    proj = pf.h.proj(2, "denn")
else:
    proj = pf.h.proj("denn", 2)
frb = proj.to_frb(1.0, (200, 200), center=[-0.5, 0, 0])

fig = figure()
ax = fig.add_subplot(111)
ax.imshow(frb['denn'])
fig.savefig('proj_%s.png' % yt.__version__[:3])
```
yields different results for 2.x: 
![blob in 2.x](http://i.imgur.com/nXn3T8O.png)
and 3.0:
![blob in 3.0](http://i.imgur.com/ptUbIyK.png)





More information about the yt-dev mailing list