[yt-users] Particles on projections

Nathan Goldbaum nathan12343 at gmail.com
Thu Jun 5 11:30:50 PDT 2014


Hi Jeremy,

I haven't tested this, but I think the issue is due to unit conversions and
possibly some misleading text in the docs. From my reading of the code, I
think width is in code units rather than normalized units as the docs seem
to indicate.

I'm not sure which simulation code you're using, but if it uses CGS units
then the width you're specifying would be 1.0 cm.  The docs page you link
to uses an Enzo simulation - in Enzo 1.0 code length units corresponds to
the entire domain.

-Nathan


On Thu, Jun 5, 2014 at 10:47 AM, Jeremy Ritter <jritter at astro.as.utexas.edu>
wrote:

> 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
> _______________________________________________
> 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/20140605/229682d9/attachment.htm>


More information about the yt-users mailing list