<div dir="ltr"><div>Hi Carla,</div><div><br></div><div>You could use the ('enzo', 'HI_Density') and ('enzo', 'HII_Density') fields.</div><div><br></div><div>The reasons there aren't 'gas' fields for those field names is that yt has a different internal naming convention for species fields. If you take a look at ds.derived_field_list, I bet you have ('gas', 'H_p0_density') and ('gas', 'H_p1_density') fields. These are the "universal" alias fields for the Enzo fields you are looking for.</div><div><br></div><div>-Nathan</div><div dir="auto"><br></div><br><div class="gmail_quote"><div>On Fri, Jul 21, 2017 at 6:13 AM Carla Bernhardt <<a href="mailto:carla.j.bernhardt@gmail.com" target="_blank">carla.j.bernhardt@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi Matthew,<div><br></div><div>Thank you for the suggestion. That works much better for the temperature field. I also need, however, HI_Density and HII_Density and these do not seem to be within the "gas" (<a href="https://pastebin.com/CKHsXDd5" target="_blank">here is the Traceback</a> from when I try that). <a href="https://pastebin.com/44ZtK8JU" target="_blank">This is the field list</a> from my data, do you have any suggestions for how I could also extract the HI_Density and HII_Density successfully?</div><div><br></div><div>Thanks,</div><div>Carla</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-07-20 16:38 GMT+02:00 Matthew Turk <span><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Carla,<br>
<br>
It's possible that it's writing out the particle values.  If you<br>
explicitly ask for ["gas", "temperature"] it may write that value out.<br>
You can control how the values are deposited on the grid by specifying<br>
smoothed, deposited, etc fields.<br>
<br>
On Thu, Jul 20, 2017 at 5:03 AM, Carla Bernhardt<br>
<div class="m_-8015603175057021365m_-5843398646662373362HOEnZb"><div class="m_-8015603175057021365m_-5843398646662373362h5"><<a href="mailto:carla.j.bernhardt@gmail.com" target="_blank">carla.j.bernhardt@gmail.com</a>> wrote:<br>
> Hi yt-users,<br>
><br>
> I was able to get the arbitrary grid working by updating yt to the newest<br>
> version. I am quite confused, however, by the output. If I extract my<br>
> arbitrary grid:<br>
><br>
> obj = ds.arbitrary_grid(left_edge, right_edge, dims=[256, 256, 256])<br>
><br>
> and extract the desired fields:<br>
><br>
> temp = obj["temperature"]<br>
> HIdens = obj["HI_Density"]<br>
><br>
> (which all works successfully), I then want to write this to a file and<br>
> would expect that such a file would have 256^3 = 16777216 lines, but I not<br>
> only don't get this number of lines for my outputs, I even get different<br>
> number of lines for different fields. Here is the part of my code that<br>
> writes the file. Ideas? Thanks in advance.<br>
><br>
> Cheers,<br>
> Carla<br>
><br>
> 2017-07-12 12:35 GMT+02:00 Carla Bernhardt <<a href="mailto:carla.j.bernhardt@gmail.com" target="_blank">carla.j.bernhardt@gmail.com</a>>:<br>
>><br>
>> Hi Matthew,<br>
>><br>
>> Thank you for your reply. I was using yt Version 3.2.3 and am working out<br>
>> some installation issues on our server with version 3.3.5. As for the type<br>
>> of data, I have an enzo simulation with static nested grids as well as up to<br>
>> 6 levels AMR grids. I will have to get back to you once I get past the<br>
>> issues with the newest installation of yt.... Thanks for the initial<br>
>> pointers.<br>
>><br>
>> Cheers,<br>
>> Carla<br>
>><br>
>><br>
>> 2017-07-11 14:15 GMT+02:00 Matthew Turk <<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>>:<br>
>>><br>
>>> Hi Carla,<br>
>>><br>
>>> Interesting.  It's possible, for the call to "temperature" (which<br>
>>> raises NotImplementedError) that the version of yt you're on doesn't<br>
>>> yet support mesh fields in arbitrary grids; that was added reasonably<br>
>>> recently.  For the others, I'm not totally sure why it's breaking --<br>
>>> which version of yt are you using, and what type of data?  It may just<br>
>>> be that they aren't deposit fields.  In that case, try explicitly<br>
>>> stating obj["gas","temperature"] or obj["gas","HI_Density"].  It may<br>
>>> also be that the aliasing is getting in the way, in which case instead<br>
>>> of "HI_Density" you might need to try "Hp0_density".<br>
>>><br>
>>> On Tue, Jul 11, 2017 at 5:42 AM, Carla Bernhardt<br>
>>> <<a href="mailto:carla.j.bernhardt@gmail.com" target="_blank">carla.j.bernhardt@gmail.com</a>> wrote:<br>
>>> > Dear yt-users,<br>
>>> ><br>
>>> > I am trying to extract a unigrid data cube within a specific region and<br>
>>> > specified dimensions, thus I am using arbitrary_grid(), however, beyond<br>
>>> > the<br>
>>> > example given in the docs, my field extractions all fail. I would like<br>
>>> > to<br>
>>> > extract temperature, HI_Density and HII_Density. Here is a snippet from<br>
>>> > my<br>
>>> > code:<br>
>>> ><br>
>>> > obj = ds.arbitrary_grid(left_edge, right_edge, dims=[256, 256, 256])<br>
>>> > print(obj["deposit", "all_density"])<br>
>>> > print(obj["temperature"])<br>
>>> > print(obj["HI_Density"])<br>
>>> ><br>
>>> > The line print(obj["deposit", "all_density"]) works, but the two lines<br>
>>> > after<br>
>>> > both fail. Here is the traceback from the temperature, and I even tried<br>
>>> > out<br>
>>> > deposited temperature and deposited HI_Density. Am I formatting this<br>
>>> > incorrectly, or is there a different way to extract the fields?<br>
>>> ><br>
>>> > Kind regards,<br>
>>> > Carla Bernhardt<br>
>>> > PhD Student<br>
>>> > ZAH Institut für Theoretische Astrophysik<br>
>>> > Universität Heidelberg<br>
>>> ><br>
>>> > ______________________________<wbr>_________________<br>
>>> > yt-users mailing list<br>
>>> > <a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
>>> > <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
>>> ><br>
>>> ______________________________<wbr>_________________<br>
>>> yt-users mailing list<br>
>>> <a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
>>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
>><br>
>><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
><br>
______________________________<wbr>_________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
</div></div></blockquote></div><br></div>
______________________________<wbr>_________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
</blockquote></div></div>