[yt-users] Particle filters and subsequent particle deposition

Cameron Hummels chummels at gmail.com
Sun Jul 13 19:22:47 PDT 2014


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([filter.name]) is called, however, it
doesn't appear that the infrastructure for creating fields in the "deposit"
namespace is ever called from this.

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?

http://nbviewer.ipython.org/gist/StewardObservatory/918ff0246f1132ef585b

Cameron


On Sat, Jul 12, 2014 at 4:55 AM, Matthew Turk <matthewturk at gmail.com> wrote:

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



-- 
Cameron Hummels
Postdoctoral Researcher
Steward Observatory
University of Arizona
http://chummels.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140713/d9c426b3/attachment.html>


More information about the yt-users mailing list