<p dir="ltr">Hey Rick.</p>
<p dir="ltr">Indeed, since RAMSES does not really differentiate between it's particles. You will have to apply a filter.</p>
<p dir="ltr">Lets say that you have created a projection plot object ( in your case p ) created from the data set "halo_sphere". If you add a particle filter to it to filter for stars by particle age ( in RAMSES dark matter has age = 0.. so this is a good way of filtering for stars).</p>
<p dir="ltr">First, you need to define your filter function early on in your script (or in another script and import it from that)</p>
<p dir="ltr">This is the filter function I typically use</p>
<p dir="ltr">def star_filter(pfilter,data):     <br>
    filter = np.logical_and(data["particle_age"] != 0, data["particle_age"] != None)<br>
     return filter</p>
<p dir="ltr">                                                  <br>
add_particle_filter("stars", function=star_filter, filtered_type="all",  requires=["particle_age"])<br>
halo_sphere.ds.add_particle_filter("stars")</p>
<p dir="ltr">And with your plot object, you can use the key word "ptype" to plot the stars (or any other combination of particles/stars as you please)</p>
<p dir="ltr">plt.annotate_particles((radius,units),ptype="stars",p_size=10.0,col="m",marker="*")</p>
<p dir="ltr">And you should be able to annotate your star particles to your plot.</p>
<p dir="ltr">Please don't copy and paste the code above directly since I am reaponding to this on my phone and is probably got unequal indentation.</p>
<p dir="ltr">For more info about the overplot particles, see</p>
<p dir="ltr"><a href="http://yt-project.org/doc/reference/api/generated/yt.visualization.plot_modifications.ParticleCallback.html#yt.visualization.plot_modifications.ParticleCallback">http://yt-project.org/doc/reference/api/generated/yt.visualization.plot_modifications.ParticleCallback.html#yt.visualization.plot_modifications.ParticleCallback</a></p>
<p dir="ltr">And</p>
<p dir="ltr"><a href="http://yt-project.org/doc/visualizing/callbacks.html#overplotting-particle-positions">http://yt-project.org/doc/visualizing/callbacks.html#overplotting-particle-positions</a></p>
<p dir="ltr">Hooe this helps</p>
<p dir="ltr">Ben<br></p>
<div class="gmail_quote">On 17 Jan 2015 00:55, "Rick Sarmento" <<a href="mailto:rsarment@asu.edu">rsarment@asu.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">So I’m trying to “p.annotate_particles” with RAMSES star particles (over a temperature projection plot) …. But everything in RAMSES is a particle, so when I do <div><br></div><div>p.annotate_particles</div><div><br></div><div>I end up with a solid black plot… How do I tell annotate_particles to just use the particles with ID < 0 (these are the star particles)??</div><div><br></div><div>Thx!</div><div><br><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="font-size:15px"><i>Cheers,</i></div><div style="font-size:15px"><i><br></i></div><div style="font-size:15px"><i>Rick Sarmento</i></div><div><a href="mailto:earnric@gmail.com" target="_blank">earnric@gmail.com</a></div></div></div></div>
</div>
<br></div></div><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div>