<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Oct 2, 2014 at 12:37 PM, Britton Smith <span dir="ltr"><<a href="mailto:brittonsmith@gmail.com" target="_blank">brittonsmith@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi Kacper, Matt,<div><br></div><div>Yes, that fixes the problem, although I am rather confused as to why.  The nuclei density fields depend on the species fields, so I would have thought that the species fields need to be added first.  Can someone explain what is happening here?</div></div></blockquote><div><br></div><div>If species list is empty (calling add_nuclei_dens... will do that), there's a fallback that adds ["H", "He"] at  yt/fields/species_fields.py:123.</div><div>I should be clear that what I've suggested was merly a workaround.</div><div><br></div><div>Cheers,</div><div>Kacper</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><span class=""><font color="#888888"><div>Britton</div></font></span></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, Oct 2, 2014 at 9:10 AM, Kacper Kowalik <span dir="ltr"><<a href="mailto:xarthisius.kk@gmail.com" target="_blank">xarthisius.kk@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><span><div>On Thu, Oct 2, 2014 at 9:03 AM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>></span> wrote:<br></div></span><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Britton,<br>
<div><div><br>
On Thu, Oct 2, 2014 at 8:34 AM, Britton Smith <<a href="mailto:brittonsmith@gmail.com" target="_blank">brittonsmith@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> There seems to be an issue accessing the nuclei density fields.  These are<br>
> derived fields that give the total number density of an element with names<br>
> like "H_nuclei_density."  At some point, these have stopped working and I am<br>
> trying to debug this.  To reproduce this, one can do the following:<br>
> ds = yt.load("enzo_cosmology_plus/DD0046/DD0046")<br>
> ad = ds.all_data()<br>
> ad["H_nuclei_density"]<br>
><br>
> I have traced this as far as the following.  In the call to<br>
> create_field_info, a YTFieldNotFound exception is raised on line 137 of<br>
> yt/fields/species_fields.py.  Here, the nuclei density field function is<br>
> trying to access a number density field that should exist, but doesn't seem<br>
> to at the moment.  Later on it does, but not at this moment.  Does anyone<br>
> have any advice for where to look next?<br>
<br>
</div></div>It might have to do with the order of field addition.  When does the<br>
field actually get added?  Can you insert pdb calls into add_field<br>
whenever the field you're looking for is added, and see when it occurs<br>
compared to when the other one does?<br></blockquote><div><br></div></span><div>Hi Britton,</div><div>it's just as Matt suggested. Creating nuclei fields prior to species fields fixes the issue:</div><div><br></div><div><a href="http://paste.yt-project.org/show/5143/" target="_blank">http://paste.yt-project.org/show/5143/</a></div><div><br></div><div>Cheers,</div><div>Kacper </div></div></div></div>
<br></div></div><span class="">_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></span></blockquote></div><br></div>
<br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br></div></div>