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

Nathan Goldbaum nathan12343 at gmail.com
Fri Jul 19 06:52:39 PDT 2013


Hi Latif,

Yes, although you'll have to do it manually.  Take a look at the
ParticleCallback in yt/visualization/plot_modifications.py, which does this
work for single panel plots.  You'll have to be careful if any of your
particles are effected by periodic boundary conditions.

-Nathan


On Fri, Jul 19, 2013 at 6:48 AM, Latif <latifne at gmail.com> wrote:

> Hi all,
> Is there any way to annotate particles to the multi-plot
> porjections/slices? I am using the following recipe from the webpage.
>
> http://yt-project.org/doc/cookbook/multi_plot_slice_and_proj.py
>
> thanks in advance,
>
> Cheers
> Latif
>
>
> On Thu, Jul 4, 2013 at 9:43 PM, Latif <latifne at gmail.com> wrote:
>
>> HI Matt,
>> Thank you for a prompt and precise response.
>> Cheers
>> Latif
>>
>>
>>
>> On Thu, Jul 4, 2013 at 7:04 PM, Matthew Turk <matthewturk at gmail.com>wrote:
>>
>>> 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
>>> >
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users at lists.spacepope.org
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>
>>
>>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20130719/5151a77e/attachment.htm>


More information about the yt-users mailing list