Table of Contents

Name

snapifu - take spectra from a snapshot at a set of specified grid points

Synopsis

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

Description

snapifu computes spectra, or reduces this to moments, in a number of predefined gridpoints, very simular to snapgrid(1NEMO) . The model behind this is Integral Field Units such as DensePak, SparsePak and Sauron.

The output image is written in standard image(5NEMO) format, where the X coordinates enumerates the grid points, the Y axis is dummy, and the Z axis the spectrum.

Parameters

The following parameters are recognized:
in=in-file
input file, must be in snapshot(5NEMO) format. Multiple snapshots can be stacked uses the times= keyword: see stack= below. [no default].
out=out-file
output file, will be in image(5NEMO) format [no default].
times=t1:t2,t3,..
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].
xgrid=x-positions
A set of X (see xvar=) positions where spectra are taken. Use tabcols(1NEMO) if the grid points are hidden in a columns in a table. Default: 0.
ygrid=y-positions
A set of Y (see yvar=) positions where spectra are taken. Default: 0.
size=
Size of the grid point. The shape of the point is circular, and the size is the diameter of this point. For square/recangular shapes, use snapgrid(1NEMO) .
xvar=x-expression
The value of x-expression is gridded along the X axis. [default: x].
yvar=y-expression
The value of y-expression is gridded along the Y axis. [default: y].
zvar=z-expression
The value of z-expression is gridded along the Z axis (nz>1), or moments taken off (nz=1). [default: -vz].
evar=emissivity
Variable to denote emissivity 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].
tvar=tau
Variable to denote the optical depth of a particle. [Default: 0]
dvar=depth
Variable to denote the line of sight. [Default: z]
zrange=xb:xe
Range in zvar to bin, or take moments of [default: -infinity:infinity].
nz=z-pixels
Number of pixels along the Z axis of the cube. If one pixel is choosen, moments can be taken (see below), else a simple gridding is used. [default: 1].
moment=number
Order of the Z-gridding. Most commonly choosen are: 0 (total intensity), 1 (velocity zvar weighted intensity) and 2 (velocity square weighted intensity), where ’intensity’ should really be read as surface density per square unit length. Special values of -1 and -2 can be used to directly compute the mean and the dispersion from the mean. [default: 0].
mean=t|f
Should the emission in a cell be averaged? This also controls the units of the gridding. For mean=f (the default) a surface-density is computed (emission per area), whereas for mean=t the average per
pixel is computed of the units of emission. [Default: f].
stack=t|f
Should all snapshots from the input file be stacked, or write one image per selected (see times=) time? [default: f].

Units

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 snapifu calculates (surface/space) densities, its units are formally ’mass’ per square ’length’ times ’velocity’ to the power moment. Notice the mean= keyword, which prevents division by the (fiber) cellsize.

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.

Bugs

Combinations of large snapshots and large images may run into memory problems since both the snapshot and the image(s) must fit into memory to obtain turbo speeds. Use non-negative moments to avoid having to allocate one or two extra images in addition to the snapshot and the image.

Examples

If the grid points are hidden in the columns of an ASCII table, the tabcols(1NEMO) can be used to extract them directly into the xgrid= and ygrid= keyword, albeit perhaps somewhat ugly looking. Here is an example of taking a spectrum around each star in a 10-body Plummer sphere,
   mkplummer p10 10 seed=123
   snapprint p10 x,y > p10.tab
   set x=(‘tabcols p10.tab 1‘)
   set y=(‘tabcols p10.tab 2‘)
   snapifu p10 p10.ccd xgrid="$x" ygrid="$y"

Currently the spectra are written to a CCD image where the 2nd axis is a dummy axis. There are least two ways to view these data. With ccdfits(1NEMO) you can write a fits(5NEMO) file and ignore the dummy axis, and then display it in your favorite display program

  snapifu p10 p10.ccd xgrid="$x" ygrid="$y" zrange=-2:2 nz=32
  ccdfits p10.ccd p10.fits dummy=f
  nds9 p10.fits
or use ccdsub(1NEMO) to reduce this axis for data that want a 2D image in the first two dimensions:
  ccdsub p10.ccd p10a.ccd dummy=f
  ccdplot p10a.ccd
  ccdprint p10a.ccd x= y=

See Also

snapgrid(1NEMO) , snaprotate(1NEMO) , snapslit(1NEMO) , snapccd(1NEMO) , ccdsub(1NEMO) , ccdprint(1NEMO) , image(5NEMO)

Author

Peter Teuben

Files


src/nbody/image      snapifu.c

Update History


8-apr-09    V1.0: Created    PJT


Table of Contents