[yt-users] Is pc.add_projection("Density", ax) a valid statement ?

Agarwal, Shankar sagarwal at ku.edu
Thu Nov 26 10:57:17 PST 2009


Hi, In the following code, I am getting an error when I use pc.add_projection("Density", ax). But If I specifically use pc.add_projection("Density", 0) then it runs fine. Any idea ?


Code...

from yt.mods import *
pf = load("RedshiftOutput0002")
pc = PlotCollection(pf)
for ax in range(3):
    p = pc.add_projection("Density", ax)
    p.modify["hop_circles"](halos, max_number=None, annotate=True, min_size=0, max_size=100000000, font_size=8, print_halo_size=True, print_halo_mass=True, width=None)
pc.save()



Error....

Traceback (most recent call last):
  File "hop_yt.py", line 20, in <module>
    p = pc.add_projection("Density", ax)
  File "/autohome/u118/agarwa23/enzo1/src/yt/yt/raven/PlotCollection.py", line 262, in add_projection
    return self._add_projection(PlotTypes.ProjectionPlot, *args, **kwargs)
  File "/autohome/u118/agarwa23/enzo1/src/yt/yt/raven/PlotCollection.py", line 285, in _add_projection
    center=center, **kwargs)


Shankar
KU cosmology



More information about the yt-users mailing list