[yt-users] Field extraction from arbitrary grids

Carla Bernhardt carla.j.bernhardt at gmail.com
Tue Jul 11 03:42:04 PDT 2017


Dear yt-users,

I am trying to extract a unigrid data cube within a specific region and
specified dimensions, thus I am using arbitrary_grid(), however,
beyond the example
given in the docs
<http://yt-project.org/doc/analyzing/objects.html#arbitrary-grid>, my field
extractions all fail. I would like to extract temperature, HI_Density and
HII_Density. Here is a snippet from my code:

obj = ds.arbitrary_grid(left_edge, right_edge, dims=[256, 256, 256])
print(obj["deposit", "all_density"])
print(obj["temperature"])
print(obj["HI_Density"])

The line print(obj["deposit", "all_density"]) works, but the two lines
after both fail. Here is the traceback from the temperature
<https://pastebin.com/BusfAeKh>, and I even tried out deposited temperature
<https://pastebin.com/me9uKMHP> and deposited HI_Density
<https://pastebin.com/BxPJj7B0>. Am I formatting this incorrectly, or is
there a different way to extract the fields?

Kind regards,
Carla Bernhardt
PhD Student
ZAH Institut für Theoretische Astrophysik
Universität Heidelberg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20170711/1b7280ca/attachment.htm>


More information about the yt-users mailing list