[yt-users] clobbering projection field data

Matthew Turk matthewturk at gmail.com
Sat Jul 14 10:34:10 PDT 2012


Hi Elizabeth,

Put this at the very top of your script:

from yt.config import ytcfg
ytcfg["yt","serialize"] = "False"

This will disable saving the projections.  I'd very, very much like to
turn off auto-saving of projections in future versions of yt, and make
it a deliberate choice, but I don't know how good an idea that is.  :)

-Matt

On Sat, Jul 14, 2012 at 7:45 AM, Elizabeth Tasker
<tasker at astro1.sci.hokudai.ac.jp> wrote:
> Hi,
>
> I'm creating a series of projections in a loop, where the conditions for the projection change with each iteration:
>
> for v in range(resolution[2]):
>         projection = pf.h.proj(2, 'LOSVelocityRangeDensity')
>
>
> I can't seem to persuade yt to delete the old projection and make a fresh one each sweep. I've tried:
>
> if projection.has_key("LOSVelocityRangeDensity"): del projection["LOSVelocityRangeDensity"]
>
> and
>
> for g in pf.h.grids:
>       if g.has_key("LOSVelocityRangeDensity"): del g["LOSVelocityRangeDensity"]
>
>
> But it's clearly not re-making the projection.
>
> Is there a better way to make it ever forget it has ever produced a projection of this field before and start from scratch with the new loop parameters?
>
> Elizabeth
> _______________________________________________
> 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