[yt-users] Find clumps - callback

David Collins dcollins at physics.ucsd.edu
Fri Nov 13 10:29:08 PST 2009


Hi Libby (and everyone else)

I've added a new module called  yt.extensions.clump_tools to the
trunk.  This module has three functions that should make it easier to
visualize your clumps.

So Britton's Clump attaches the clump hierarchy to whatever you call
find_clumps on.  This is somewhat like what Rosolowsky et al 2008 do
with their Dendrograms.  Two of these functions (return_all_clumps and
return_bottom_clumps) return flatten arrays of clumps from what
find_clumps does.  The third function in the module (clump_list_sort)
sorts the list for ease of plotting.

So first you'll do something like
region = pf.h.sphere( radius = 0.1, center = [0.5]*3)
base = Clump(region, *args)
find_clumps(base, *args)

base then has children, each of which then also have children, etc.
This second generation of children is more fun because you don't have
to feed them but you still get to buy them fun toys.

To plot the entire hierarchy, you'd do something like this
all_clumps = clump_tools.return_all_clumps(base)
sorted = clump_tools.clump_list_sort(all_clumps)
p.modify["clumps"](sorted)

If you only want to plot the single objects, more akin to what one
would find from CLUMPFIND, then use
clump_tools.return_bottom_clumps

return_all_clumps also adds a number, parentnumber, and level to each clump.

There are two additional routines in the module, which are the
recursive functions.  Ignore them, just call the wrapper.

Hope this helps!
d.


On Mon, Nov 9, 2009 at 11:44 AM, Elizabeth Harper-Clark
<h-clark at cita.utoronto.ca> wrote:
> Hi Guys,
>
> I am (trying) to use the find_clumps routine to identify clumps in my data
> and I would then like to visualize it. How do I get the data from the
> find_clumps routine into the callback:  p.modify["clumps"]() so I can put it
> on projections/slices? What should it then look like?
>
> Many thanks,
>
> Libby
>
> --
> Elizabeth Harper-Clark MA MSci
> PhD Candidate, Astrophysics, UofT
>
> www.astro.utoronto.ca/~h-clark
> h-clark at cita.utoronto.ca
> AIM: edphc1
> MSN: edphc1 at hotmail.com
> Skype: eharperclark
> Office phone: 416-978-5759
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>



-- 
Sent from my Stone Tablet and carried by my Pterodactyl.



More information about the yt-users mailing list