[yt-users] Particles on projections

Jeremy Ritter jritter at astro.as.utexas.edu
Thu Jun 5 10:47:54 PDT 2014


Hello YT,

When using annotate_particles() on a ProjectionPlot, it does not seem to respect the width field. I get a very thin slab when plotting a 2kpc x 2kpc image. The cookbook implies that a width of 1.0 would correspond to the entire 2kpc line-of-sight domain (e.g. http://yt-project.org/docs/2.6/cookbook/complex_plots.html#plotting-particles-over-fluids ). It is definitately only a thin slab (about 10pc wide) regardless of whether I use width=1.0 or width=2000.0. The slab thickness seems to be the same as in a slice plot. What would be the correct way to plot the entire 2kpc cube of particles in projection?

Here are some comparison plots from YT (metallicity projection and slice) and VisIt (metallicity slice).

YT Projection (Width 2kpc):
http://grapenut.org/code/yt/paper/project/project_particles_175300_Projection_z_Metallicity_Density.png

YT Slice:
http://grapenut.org/code/yt/paper/slice/slice_particles_175300_Slice_z_Metallicity.png

Visit (10pc slab on 2kpc x 2kpc slice):
http://grapenut.org/code/yt/paper/particle_slab_0000.png

YT example source:
plot = ProjectionPlot(pf, 'z', nfield, center=star_center, width=star_width, axes_unit=axunit, weight_field='Density', fontsize=32)
plot.annotate_particles(1.0, ptype=1.0, col='white')

Cheers,
-Jeremy


More information about the yt-users mailing list