This HTML automatically generated with rman for NEMO
Table of Contents


snapmap - map (kriging) a snapshot into a 2D image


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


snapmap "grids" two arbitrary bodytrans(3NEMO) expressions (default: x, and y) of a snapshot into a 2D map, using another bodytrans(3NEMO) expression (default: m) as the map value. The result is an image(5NEMO) , with optional astronomical projection for direct comparision with true astronomical images. There are a number of ways implemented to "grid" the particles: mean value, with or without gaussian or cone weighting, and forms of linear interpolation. These functions are also known as "kriging".

Use snapgrid(1NEMO) instead to grid datacubes (e.g. X-Y-Z), or if you need various styles of line of sight integrations. snapmap is more appropriate to obtain well interpolated maps from irregularly sampled data where the input mapping I(x,y) is still a smooth function, although good results can also be ontained by averaging the values (the default mode) or using a smoothing length svar=.


The following parameters are recognized in order; they may be given in any order if the keyword is also given. Use --help to confirm this man page is up to date.
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. Note that multiple times and/or multiple evar’s will produce multiple images in this file. [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 these are the outer edges, not their cell centers. [default: -2:2].
Range in yvar 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].
Variable(s) to denote the emissivity per particle. Multiple expressions, separated by commas, can be given, each of them generating a separate image in a single multi-image output file. [default: m].
Variable to denote gaussian weighting size in X and Y. Note this is the gaussian sigma, not the FWHM (FMHW = 2.355 * sigma). Only used if mode=mean.
The function/method to used when smoothing/interpolating. Options are gaussian and cone. [Default: gaussian].
Number of pixels along the X axis of the image [default: 64].
Number of pixels along the Y axis of the image [default: 64].
Text used to label the X-axis. By default the xvar expression is used. It may be useful in certain astronomical environment to label the axis with recognized labels like RA---TAN, DEC--SIN, GLON etc.
Same for the Y-axis.
mean (can be optionally with gaussian/cone weighting), linear interpolation [Default: mean].
Should all snapshots from the input file be stacked, or write one image per selected (see times=) time? [default: f].
If a valid projection type (SIN, TAN, ARC, NCP, GLS, MER, AIT) but see also wcs(1NEMO) , the input coordinates are interpreted in angular degrees, and griddes with the appropriate sky projection. Default: no sky projection.
Normally gaussian smoothing gets cut off when the argument to the exponent is larger than emax, to prevent roundoff error and/or contributions from too far away. This equals sqrt(2*emax) times the sigma listed in svar=. [Default: 10]


Sky projections do not guarantee flux conservation, interpolation is done in linear space.


This program was written to create maps with more accurate interpolated velocity fields from models. However, in the default mode it used the same mean pixel value as snapgrid(1NEMO) :
   snapmap  snap101 ccd101 evar=-vz
   snapgrid snap101 ccd102 evar=-vz mean=t
   ccdmath ccd101,ccd102 - %1-%2 | ccdstat -
      Min=0.000000  Max=0.000000
produces the same images ccd101 and ccd102 from the input snapshot snap101

When using multiple evar’s, the multiple images are not in a cube, but separate images. If you want them in a single image cube, use snapmerge(1NEMO) . Here’s a simple example using NEMO’s pipes:

    mkspiral - |\
      snapmap - - m,x,y,vx,vy svar=0.05 |\
      ccdmerge - spiral.ccd

See Also

snapgrid(1NEMO) , snapifu(1NEMO) , snapsmooth(1NEMO) , snapccd(1NEMO) , ccdintpol(1NEMO) , ccdmerge(1NEMO) , ccdsky(1NEMO) , image(5NEMO)

kriging programs such as lmtgridder and gbtgridder take single dish pointings and create a map from them.


Peter Teuben


src/nbody/image      snapmap.c


20-jun-09    V1.0: created    PJT
6-may-11    V1.3: implemented emax= and sfunc=cone    PJT
8-may-11    V2.0: evar=m is now default    PJT

Table of Contents