[yt-users] Test for field
Elizabeth Tasker
tasker at astro1.sci.hokudai.ac.jp
Sat Feb 23 00:07:42 PST 2013
Hi,
I want to test if a data set at particles. I thought:
pf.has_key("particle_type")
would work, but oddly it doesn't since:
In [17]: pf.has_key("particle_type")
Out[17]: False
yet:
In [4]: dd = pf.h.all_data()
In [5]: dd["particle_type"]
yt : [INFO ] 2013-02-23 17:00:43,826 Getting particle_type using ParticleIO
Out[5]: array([11, 11, 11, ..., 11, 11, 11])
Shouldn't pf.has_key("particle_type") be true in this case?
Elizabeth
More information about the yt-users
mailing list