I am getting this with just "DarkMatter" and "CenOstriker", which are not exactly filters (or maybe they are), but the particle types as they are stored on disk by Enzo-3.0.


On Mon, Dec 2, 2013 at 3:30 PM, Matthew Turk <matthewturk@gmail.com> wrote:
On Mon, Dec 2, 2013 at 10:29 AM, Britton Smith <brittonsmith@gmail.com> wrote:
> Hi Matt,
>
> Thanks, that's very helpful.
>
> I have an additional question.  When I do:
> ad = pf.h.all_data()
> ad['particle_mass'] or
> ad['all', 'particle_mass']
>
> I get numbers that are ~1e44, which sounds about right if it's in grams.
> However, when I do:
> ad['DarkMatter', 'particle_mass']
>
> I get numbers that are ~1e-5, which I am guessing is the unconverted
> particle_mass straight out of the file.  How can get the filtered particles
> in proper units as well?
>

Hm, that looks like a bug to me.  What's your filter look like, so I
can reproduce this here?

> Thanks again,
> Britton
>
>
> On Mon, Dec 2, 2013 at 3:21 PM, Matthew Turk <matthewturk@gmail.com> wrote:
>>
>> Hey Britton,
>>
>> On Mon, Dec 2, 2013 at 10:15 AM, Britton Smith <brittonsmith@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@lists.spacepope.org
>> > http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>> >
>> _______________________________________________
>> yt-dev mailing list
>> yt-dev@lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
>
>
> _______________________________________________
> yt-dev mailing list
> yt-dev@lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
_______________________________________________
yt-dev mailing list
yt-dev@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org