This HTML automatically generated with rman for NEMO
Table of Contents


snapgridsmooth - grid a snapshot into a 3D image cube with adaptive smoothing


snapgridsmooth in=snapshot out=image [parameter=value]


snapgridsmooth grids three arbitrary bodytrans expressions (default: x, y and z) of a snapshot into a datacube with adaptive smoothing based on a bodytrans variable. Unlike snapgrid(1NEMO) , which handles 2D projections and certain types of line-of-sight processing, this program simply accumulates the emission in each cell, and optional smoothing, normalization and periodicity.


The following parameters can be given in any order if the keyword is also passed with it:
input file, must be in snapshot(5NEMO) format. Multiple snapshots can be stacked uses the times= keyword: see stack= below. [no default].
output file, will be in image(5NEMO) format. Depending on the use of times=, stack= and evar= (see below) one more multiple cubes can be output. [no default].
Selection of the times of snapshots to be selected for gridding. For stack=t all snapshots will be co-added into one image, however selecting stack=f or selecting multiple evar’s one can request multiple output images. [Default: all].
Range in xvar to bin. Note that all particles outside this grid will be discarded, even if periodic=t (see below). [default: -2:2].
Range in yvar to bin [default: -2:2].
Range in zvar to bin [default: -2:2].
The value of x-expression is gridded along the X axis. [default: x].
The value of y-expression is gridded along the Y axis. [default: y].
The value of z-expression is gridded along the Z axis [default: z].
Variable to denote emissivity (density if you wish) per particle. You can select more than 1 expression, in which case different images will be written out (only in stack=f mode) [default: m].
Variable to denote gaussian smoothing
Number of pixels along the X axis of the cube [default: 64].
Number of pixels along the Y axis of the cube [default: 64].
Number of pixels along the Z axis of the cube [default: 64].
Should all snapshots from the input file be stacked, or write one image per selected (see times=) time? [default: f].
If set true, smoothing results will be applied on a periodic grid. Particles that fell outside the x,y,z grid, however, are discarded and never smoothed/aliased into the visible grid. [Default: f]
If set, and if gaussian smoothing is applied (see svar=), the emission (evar=) is normalized as to conserve it. [Default: t]


The following example ...


This program was cloned from snapgrid(1NEMO) , and the keywords stack= and multiple values for evar= have not been tested out.

Unlike snapgrid(1NEMO) , this program is meant to use the 3 gridding variables in the same units. The snapgridsmooth an x-y-vz cube is tricky.

With normalized smoothing and no periodic boundaries, the normalization factor for particles near the edge the normalization factor is lower, since it still wants to preserve the total emission.


Units are maintained in the same way as in snapshots, they don’t have a specific name, but carry their normal meaning ’length’, ’velocity’ and ’mass’. Since snapgridsmooth calculates space densities, its units are formally ’mass’ per cubic ’length’

See Also

snapgrid(1NEMO) , uns_2dplot(1NEMO) , tsf(1NEMO) , snapshot(5NEMO) , image(5NEMO)


Peter Teuben


src/nbody/image      snapgridsmooth.c

Update History

1-nov-06    V0.1: Created    PJT/ES
6-nov-06    V0.3: added normalize= and fixes for that    PJT

Table of Contents