[yt-users] How ot overplot star particles on density projections

Matthew Turk matthewturk at gmail.com
Thu Jul 4 10:04:33 PDT 2013


Hi Latif,

The callback you're looking for is "particles" and you can specify a
"ptype" argument for specifying the type of particles.  (If you're
using Enzo, this should be the number in the "particle_type" field you
are selecting.)  Note also that annotate_particles accepts a width
argument, in code units, which says how wide the selected region will
be around the center of the slice or the center of the box for
projections.  So if you are using a projection and you want the whole
box, you can do 1.0/pf['unitary'] to get the full domain.

Here is an example:

s = SlicePlot(pf, "x", "Density")
s.annotate_particles(1.0/pf['kpc'], p_size = 1.0, ptype = 1)

which will choose particle_type = =1.

-Matt

On Thu, Jul 4, 2013 at 10:20 AM, Latif <latifne at gmail.com> wrote:
> Hi all,
> I want to overplot star particles on density projections/slices. It is
> probably a very simple question but could not figure out how to do it.  Can
> I also get information about their position and velocities as well?
> thanks in advance,
> Cheers
> Latif
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list