HTML automatically generated with rman
Table of Contents
snapccd - top view integrated velocity moment ccd-like image
in=snapshot out=image [parameter=value]
snapccd makes a ccd
frame from an N-body snapshot, by binning the (projected) x-y coordinates
of all stars on a regular rectangular (square) grid and assigning a mean
integrated ’surface density’ (integrated along z-axis, i.e. the line of sight,
The ccd frame is written to a standard Image(5NEMO)
output file, and can
be accessed by various other programs for smoothing, display etc.
astronomers refer to this type of 2-d histogram as a "Hess diagram" when
it is used to plot a color-magnitude diagram of stars.
snapccd can also
create channel maps, where only signal near a specified velocity is copied.
See the vrange and moment keywords below. One can use either an exact velocity
window, or a gaussian beam in velocity space.
Note that the radial velocity
has the astronomical convention. The observer is located at infinity at
the positive Z-axis: a positive z velocity (vz) means stars are approaching,
i.e. negative radial velocity.
has to be used first to do
any other than a top-view, probably the more general version snapgrid(1NEMO)
should be used.
A better alternative is snapgrid(1NEMO)
, and for more interpolation
(as opposed to gridding) style is snapmap(1NEMO)
following example makes (three) CCD frames from an N-body snapshot, smoothes
the three moment maps and combines them into an ’intensity’ (int), ’mean velocity’
(vel) and ’velocity dispersion’ (sig) map.
- input file, must be in SnapShot(5NEMO)
format [no default].
- output file, will be in Image(5NEMO)
format [no default].
origin (x,y) of the center of the ccd [default: 0,0].
- Full size
of the CCD frame in ’physical’ units. Note that the picture is forced to
be square [default: 4.0].
- Cell- or pixel size. Again they will be
square. For a 2D matrix this value will be set by the header of that dataset.
- vrange=vmin:vmax | vmean,vsig
- Range in (astronomical) radial
velocity (-vz) to be used only while binning the data. One can also give
a mean and dispersion in velocity space to weigh the data with. In this
case the range in velocity space is somewhat arbitrarely taken from vmean-3*vsig:vmean+3*vsig.
This last procedure is somewhat more realistic for astronomical applications,
unless the package where the data will be transported to has decent smoothing
utilities in velocity space also. The default of this keyword is to take
all data along the vz axis. It does not make sense to select data along
the z-axis when the moment (see below) is non-zero. [default: -infinity:infinity].
- Order of the velocity moment: must be a non-negative number.
Most commonly choosen are: 0 (total intensity), 1 (velocity weighted intensity)
and 2 (velocity square weighted intensity), where ’intensity’ should really
be read as surface density per square unit length. [default: 0].
Note that the moment maps must
be smoothed before they can be combined to the proper velocity and dispersion
% snapccd in=nbody.dat out=map0 moment=0
% snapccd in=nbody.dat out=map1 moment=1
% snapccd in=nbody.dat out=map2 moment=2
% ccdsmooth in=map0 out=map00 gauss=0.1
% ccdsmooth in=map1 out=map11 gauss=0.1
% ccdsmooth in=map2 out=map22 gauss=0.1
% mv map00 int
% ccdmath in=int,map11 out=vel fie=%2/%1
% ccdmath in=int,vel,map22 out=sig fie="sqrt(%3/%1-%2*%2)"
% rm map11 map22
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 snapccd calculates surface densities, its units are formally ’mass’
per square ’length’ times ’velocity’ to the power moment.
When channel maps
are produced (moment=0), the data are not normalized w.r.t. the convolving
velocity beam. For a rectangular beam (vrange=vmin:vmax) the data should
formally be divided by (vmax-vmin), for a gaussian beam (vrange=vmean,vsig)
by vsig*sqrt(2*pi). Also remember that a gaussian beam has FWHM = 2.355*sigma.
’s function is rather similar to that of snapplot(1NEMO)
except of plotting the position of the stars, its bins the data. It would
be a nice idea to combine both programs.
If smoothing is followed
after gridding, the resulting beam is actually slightly larger than the
The program gracefully allows the user to use nonzero
moment and a non-infinite vrange. No warnings here.
src/nbody/image snapccd.c, snapccd.1
17-Jun-87 V1.0: Created PJT
25-jun-87 V1.1: grayscale possibility added PJT
29-jun-87 V2.0: image-format + three programs: ccd, smooth, look PJT
30-Jun-87 V2.1: improved ’struct’ filestructure PJT
1-Jul-87 V2.2: added velocity-moments option PJT
8-jul-87 V2.4: proper defn. of cell position PJT
9-Mar-88 V3.0: added data history PJT
1-jun-88 V4.0: new filestruct, renamed programname PJT
22-dec-88 V4.1: channel maps can be produces, keyword vrange PJT
30-jan-89 V4.2: vel is now Zmin, also proper dimensions PJT
Table of Contents