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

Matthew Turk matthewturk at gmail.com
Fri Jan 31 07:48:54 PST 2014


Hi Nathan,

Thanks for bringing this up.

The way that field_parameters work is consistent if chunking is used;
I think with retrieve_ghost_zones, though, we aren't using that.  So
I'll take a look at this today.

Incidentally, I think this is related to the issues you and Jeff were
both seeing with slices of GZ-requiring fields.  I'm looking into that
further today, but it looks like Jeff's issue arises from using the
slice as the base for spatial fields, which means we're excluding some
grids from being selected.  I have to think through how that's
happening.

-Matt

On Fri, Jan 31, 2014 at 1:01 AM, Nathan Goldbaum <nathan12343 at gmail.com> wrote:
> 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
> _______________________________________________
> yt-dev mailing list
> yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org



More information about the yt-dev mailing list