<div dir="ltr">Ok, so we should probably remove that field from the code base since it is not really doing the right thing.  It doesn't seem to be in use anywhere.  Does anyone have any thoughts on removing this? +-1?<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 10, 2013 at 4:49 PM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, May 10, 2013 at 4:44 PM, Britton Smith <<a href="mailto:brittonsmith@gmail.com">brittonsmith@gmail.com</a>> wrote:<br>

> Hi all,<br>
><br>
> I am seeing something odd with a field called "IsStarParticle".  This is an<br>
> Enzo field defined in the following way:<br>
><br>
> def _IsStarParticle(field, data):<br>
>     is_star = (data['creation_time'] > 0).astype('float64')<br>
>     return is_star<br>
><br>
> When I do the following:<br>
> print pf.h.grids[0]['IsStarParticle']<br>
><br>
> I get the expected field of 1s and 0s.<br>
><br>
> When I do this:<br>
> all_data = pf.h.all_data()<br>
> print all_data['IsStarParticle']<br>
><br>
> I get the values that correspond to the creation_time field.  It does not<br>
> matter in what order I do this.  Whenever I try to access the field from a<br>
> geometric object, I get the actual creation time and not the field I expect.<br>
> Whenever I access it from a grid object, I get the right thing.<br>
><br>
> Does anyone know what's going on here?<br>
<br>
</div></div>No, not really.  But there is one thing that I should note, which is<br>
that it may be getting caused by using "IsStarParticle" as a boolean<br>
index.  Which would not work correctly, and would just return the 0th<br>
and 1st values of whatever array it's being used as an index into.  I<br>
think.<br>
<br>
-Matt<br>
<br>
><br>
> Britton<br>
><br>
> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><br></div>