<div dir="ltr">So I used pdb to try to track the process of creating a filtered particle type.  After the particle filter type namespace is created, all of the particle fields are added to it and added to the derived_field_list, and then that _setup_particle_types([<a href="http://filter.name">filter.name</a>]) is called, however, it doesn't appear that the infrastructure for creating fields in the "deposit" namespace is ever called from this.<div>

<br></div><div>I've confirmed that added particle fields are not propagated to "deposit" for either gadget or enzo datasets in the following notebook.  Since it's unclear to me how to initiate the deposit field infrastructure (no docs or docstrings), I'm not sure how to fix this problem.  Any thoughts from others more experienced with writing this code?  Matt?  Britton?</div>

<div><br></div><div><a href="http://nbviewer.ipython.org/gist/StewardObservatory/918ff0246f1132ef585b">http://nbviewer.ipython.org/gist/StewardObservatory/918ff0246f1132ef585b</a><br></div><div><br></div><div>Cameron</div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jul 12, 2014 at 4:55 AM, 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">Hi Cameron,<br>
<div class=""><br>
On Sat, Jul 12, 2014 at 2:52 AM, Cameron Hummels <<a href="mailto:chummels@gmail.com">chummels@gmail.com</a>> wrote:<br>
> Hi John,<br>
><br>
> That is what I figured as well, but it doesn't appear to automatically<br>
> create those deposit fields when you add the particle field after<br>
> initialization of the dataset.  Yes, it creates other deposit fields for the<br>
> particle namespaces (e.g. Gas, Stars, DarkMatter) that are defined at<br>
> initialization. However, when I create a particle filter which makes its own<br>
> set of fields after initialization, these are not automatically added as<br>
> deposit fields.<br>
<br>
</div>Hmm.  _setup_filtered_type is called by add_particle_filter, and then<br>
it in turn calls _setup_particle_types([<a href="http://filter.name" target="_blank">filter.name</a>]), which should<br>
eventually create the derived fields.  I would suggest trying to<br>
figure out at what point the process stops, and then we can figure out<br>
why it thinks it shouldn't add the deposit fields.<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> I can add a notebook demonstrating this if it is easier.  I just thought<br>
> someone might know of a way to force the generation of the deposit fields<br>
> for newly derived fields not generated at initialization of a dataset.<br>
><br>
> Cameron<br>
><br>
><br>
> On Fri, Jul 11, 2014 at 6:51 PM, John Wise <<a href="mailto:jwise@physics.gatech.edu">jwise@physics.gatech.edu</a>> wrote:<br>
>><br>
>> Hi Cameron,<br>
>><br>
>> If the particle filter name is called "bh", you can use the field<br>
>> ("deposit", "bh_cic").  You can also use the other deposit fields, like<br>
>> "bh_count", "bh_density", "bh_mass".<br>
>><br>
>> Cheers,<br>
>> John<br>
>><br>
>><br>
>> On 07/11/2014 08:16 PM, Cameron Hummels wrote:<br>
>>><br>
>>> I'm playing with the new particle filter functionality in yt-3.0, but<br>
>>> I'm running into some problems.  I can successfully create a particle<br>
>>> filter, but how do I get those fields to be subsequently deposited on<br>
>>> the grid (like the other fields in the "deposit" namespace)?<br>
>>><br>
>>> Is there a command for forcing a particle field deposition on to the<br>
>>> grid?<br>
>>><br>
>>> Thanks!<br>
>>><br>
>>> Cameron<br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Cameron Hummels<br>
>>> Postdoctoral Researcher<br>
>>> Steward Observatory<br>
>>> University of Arizona<br>
>>> <a href="http://chummels.org" target="_blank">http://chummels.org</a><br>
>>><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>
>> --<br>
>> John Wise<br>
>> Assistant Professor of Physics<br>
>> Center for Relativistic Astrophysics, Georgia Tech<br>
>> <a href="http://cosmo.gatech.edu" target="_blank">http://cosmo.gatech.edu</a><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>
><br>
><br>
> --<br>
> Cameron Hummels<br>
> Postdoctoral Researcher<br>
> Steward Observatory<br>
> University of Arizona<br>
> <a href="http://chummels.org" target="_blank">http://chummels.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>
><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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Cameron Hummels<div>Postdoctoral Researcher</div><div>Steward Observatory</div><div>University of Arizona</div><div><a href="http://chummels.org" target="_blank">http://chummels.org</a></div>


</div>