[yt-users] clobbering projection field data

Elizabeth Tasker tasker at astro1.sci.hokudai.ac.jp
Sat Jul 14 07:45:01 PDT 2012


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


More information about the yt-users mailing list