[yt-users] Particles on projections

Jeremy Ritter jritter at astro.as.utexas.edu
Thu Jun 5 12:42:39 PDT 2014


Hi Nathan,

This is FLASH data using the stable version of YT. If it's cgs units as in the data file, then a 1.0 should show nothing rather than a 10pc slab. It seems that lowering the width doesn't have any effect either. For slices, we are trying to plot fewer particles than the 10pc slab. Values of 0.5, 1.0 and 2000.0 all give the same number of particles. 

I've even modified the code directly to use 1/10 of the specified width 

        LE[zax] = data.center[zax] - self.width*0.05
        RE[zax] = data.center[zax] + self.width*0.05

instead of

        LE[zax] = data.center[zax] - self.width*0.5
        RE[zax] = data.center[zax] + self.width*0.5

and they both seem to plot the exact same number of particles as well. Is there some sort of minimum slab thickness imposed elsewhere? The maximum grid resolution is less than 1 parsec, so that should not be a limiting factor.

Thanks!
-Jeremy

On Jun 5, 2014, at 1:30 PM, Nathan Goldbaum wrote:

> 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
> 
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org




More information about the yt-users mailing list