[yt-dev] Field parameters and covering grids in 3.0

Nathan Goldbaum nathan12343 at gmail.com
Thu Jan 30 22:01:47 PST 2014


Hi all (particularly Matt, I suspect),

I'm having an issue doing isocontour flux extraction on a disk in
yt-3.0.  I'm using this script:

from yt.mods import *

pf = load('HiResIsolatedgalaxy/DD0044/DD0044')

dd = pf.h.disk('c', [0,0,1], (20, 'kpc'), (3, 'kpc'))

radii = (np.arange(100)+1)/100.*20
fluxes = []

for r in radii:
    iso = pf.h.surface(dd, 'Radiuskpc', r)
    print iso['Density']

This produces the following traceback: http://paste.yt-project.org/show/4263/

The issue seems to be that the "center" field parameter isn't being
passed down to the grid object that is generating the covering grid.

Right now it looks as if the `retrieve_ghost_zones` method attached to
the grid object expects to find entries in the grid patch object's
field_parameters dict.  It seems as if I could update the grid patch
with the field parameters from the disk object before the call to
`_extract_isocontours_from_grid`.

This makes me think that there might be a reason why it's not already
set up like that.  Has the way we handle field parameters changed much
in the 3.0 codebase?

Thanks for your help,

Nathan



More information about the yt-dev mailing list