Hi Britton,

I think this solution may work, but may also be tricky.  To implement a data selector, these methods are needed:

select_sphere
select_point (a special case of sphere with radius zero)
select_bbox
select_cell (degenerate with select_bbox)

Selectors get called by a variety of cutout methods; one possibility, which we use for the Grid selector, is to special-case the IO routines for Halo selectors.  If the particles can be read in individually, that would work.  Selecting bbox and cell would allow you to then compute things like deposited mass or something, if that's useful, and could be done by identifying if any particles are within a given bbox.

-Matt


On Thu, May 7, 2015 at 9:57 AM, Britton Smith <brittonsmith@gmail.com> wrote:
Hi everyone,

Myself and one other who should be joining this list soon are interested in implementing some new functionality and I would like to solicit some advice.

What we have are halo catalog datasets that, for the most part, are already loadable in yt.  They are loadable in that each individual halo is a particle such that querying the mass field returns the mass of each halo.  However, these datasets also store the particles from the simulation snapshot that are the members of each halo.  We currently do not have the machinery to query them and this is what we would like to add.

It seems the most sensible idea is to create a halo data container such that something like the following returns the mass of all the particles in a halo:

my_halo = ds.halo(some_id)
my_halo["particle_mass"]

This is somewhat different from the existing data containers as it is not geometric.  The member particles are explicitly known.  I don't have much experience with making data containers so I can't tell if this makes things easier or harder.  Anyway, this is the plan.

If anyone has reasons this may be too difficult or simply not work, I would appreciate hearing them.  Any general advice or other ideas for making this functionality work would also be welcome.

Thanks!

Britton

_______________________________________________
yt-dev mailing list
yt-dev@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org