[yt-dev] Issue #854: Different dimensions for coordinates and fields in `smoothed_covering_grid` (yt_analysis/yt)
John ZuHone
issues-reply at bitbucket.org
Tue Jul 8 16:34:34 PDT 2014
New issue 854: Different dimensions for coordinates and fields in `smoothed_covering_grid`
https://bitbucket.org/yt_analysis/yt/issue/854/different-dimensions-for-coordinates-and
John ZuHone:
This script:
```
#!python
import yt
import numpy as np
pf = yt.load("GasSloshing/sloshing_nomag2_hdf5_plt_cnt_0150")
L = 617. # width in kpc
dx = 2.*pf.index.get_smallest_dx().in_units("kpc").v
nx = int(L/dx)
le = pf.arr([-0.5*nx*dx]*3, "kpc").in_units("code_length").v
dims = np.array([nx]*3)
cube = pf.smoothed_covering_grid(pf.index.max_level-1, le, dims)
print cube["x"].shape
print cube["density"].shape
```
Gives this output:
```
#!python
(131, 131, 131)
(132, 132, 132)
```
So the shapes of the coordinates and the fields have gotten out of sync somehow. This only happens for certain values of `L` and `nx`, setting `L = 600.` results in both dimensions being the same.
More information about the yt-dev
mailing list