[yt-dev] particle filter example

Matthew Turk matthewturk at gmail.com
Mon Dec 2 07:21:40 PST 2013


Hey Britton,

On Mon, Dec 2, 2013 at 10:15 AM, Britton Smith <brittonsmith at gmail.com> wrote:
> Hi all,
>
> Can someone point me to an example (docs, notebooks, emails, whatever) of
> defining a custom particle filter for yt-3.0?  I'm trying to do this and I
> know I've seen discussion of this before, but I can't find where.
>

Yup.  Here's an example:

http://nbviewer.ipython.org/url/hub.yt-project.org/notebooks/534fd19b933e4a3fa002db91f58fb817.ipynb

Looks like the nbviewer is down though.

Sorry I haven't done much documenting of this.  Particle filters and
particle unions are two really cool things that are currently only in
example form.  Here's another example of how to define one:

https://bitbucket.org/mornkr/agora-analysis-script/src/1200830cd1e8d7dc60f66c8f1dc7c09764ca3276/script-Flagship-DM.py?at=default#cl-33

and you have to add this by name to each pf you open up:

https://bitbucket.org/mornkr/agora-analysis-script/src/1200830cd1e8d7dc60f66c8f1dc7c09764ca3276/script-Flagship-DM.py?at=default#cl-57

Note that you have to specify *all* the required filtering fields in
the constructor for the function.

-Matt

> Thanks,
> Britton
>
> _______________________________________________
> yt-dev mailing list
> yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>



More information about the yt-dev mailing list