I forgot to mention that another way to do this is making a derived field that adds the stellar density to the gas density. However this doesn't look good when particles are in coarse grids, when they should be point sources in the image. def _RelativeDensityStars(field, data): return (data["Density"] + data["star_density"])/dma add_field("RelativeDensityStars", function=_RelativeDensityStars, take_log = False) where dma is a scaling variable. I'm uploading my stand-alone script if you want to try to decipher it, although I tried to comment it some. http://paste.enzotools.org/show/1475/ Also I uploaded the colormap based on B-V colors that I ripped from partiview to http://www.astro.princeton.edu/~jwise/temp/BminusV.h5 John On 01/06/2011 11:14 AM, John Wise wrote:
Hi Libby,
I'm afraid that there isn't a good solution for rendering stars, at least to my knowledge!
You can add them as pixels after you've determined the pixel numbers (as in Andrew's email) of the particles with the splat_points() routine in the image_writer module.
I wrote my own stand-alone splatter to put Gaussian splats for particles, but I never incorporated it into yt. I meant to a few months back when I wrote it but never did! It will produce these types of splats
http://www.astro.princeton.edu/~jwise/research/GalaxyBirth_files/combine.png
I had to manually blend the gas volume rendering and star splats afterwards to produce that image.
I hope I can make something that looks as good as partiview soon. This is the same dataset but with partiview.
http://www.astro.princeton.edu/~jwise/research/GalaxyBirth_files/stars_only....
I'll see if I can make time (first I have to find the code!) to incorporate my splatter into yt.
John
On 01/06/2011 09:15 AM, Elizabeth Harper-Clark wrote:
Hi all,
Thanks for all your help over the last couple of days. One more question: - Can I plot particles on a volume rendered image? I have stars and I want to show where they are!
Thanks,
Libby
-- Elizabeth Harper-Clark MA MSci PhD Candidate, Canadian Institute for Theoretical Astrophysics, UofT Sciences and Engineering Coordinator, Teaching Assistants' Training Program, UofT
www.astro.utoronto.ca/~h-clark <http://www.astro.utoronto.ca/%7Eh-clark> h-clark@cita.utoronto.ca <mailto:h-clark@cita.utoronto.ca> Astronomy office phone: +1-416-978-5759
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org