Table of Contents

For datacubes that need to produce velocity
fields a number of alternate options (gaussian fit, envelope tracing etc.)
are available via *pvtrace(1NEMO)*
.

To get the intensity weighted shape of
an object using the moments of inertia, use *ccdshape(1NEMO)*
.

Continuum subtraction is needed for reliable moments where applicable.

If moments needs to be
taken across many images, like cubes with axis=4, use *ccdmoms(1NEMO)*
.

**in=**- Input image file. No default.
**out=**- Output image file. No default.
**axis=**- Axis to take moment along (1=x 2=y 3=z). Unless
**keep=t**, this axis will be reduced. [Default:**3**] **mom=**- Moment to take along the selected axis.
For convenience referring to the selected axis as "
*velocity*" we have the following moments:

0

The mom=30,31,32,33,34 computes moments based on the "single profile near the peak", useful for smooth high S/N profiles. For a description of the h3 and h4 see S2.4 in van der Marel & Franx (1993ApJ...407..525V) [Default:**0**]. **keep=t|f**- Boolean value if to keep the moment axis. If you keep the axis (instead
of compressing it), the values are replaced with the computed moment. This
can be useful if you want to subtract an cube/image with the mean value
along a certain axis. Only in this case (but see also
**cumulative=t**below) will the output image have the same shape and dimension as the input image. [Default:**f**]. **cumulative=t|f**- Boolean value if the values should accumulate
instead along the selected axis. The
**mom=**keyword is ignored, and the input and output datasets will now have the same shape and dimension. [Default:**f**] **oper=**- If supplied, this is an extra operator supplied to the input file
and output file, to create the final output file. This is to prevent having
to type two commands such as

ccdmom map0 tmp0 axis=1 mom=-1 keep=t ccdmath map0,tmp0 map1 %1-%2

instead of

ccdmom map0 map1 axis=1 mom=-1 oper=-

**peak=N**- For
**mom=3,30-34**where it finds the peak, this allows you to find the N-th peak instead of the first. This is achieved by visiting each peak, and assigning a peak membership downwards from the peak and then finding the next one. **clip=**- Exclude pixels with values in the range -clip to clip. Default: 0
**rngmsk=t|f**- Don’t assign a 1st moment if the value results in a value outside the range of the axis. This can easily happen for noisy data. Default: false.
**abs=t|f**- Use absolute values of the intensities for weights to a moment analysis. This is useful for low S/N data where at the wings a sign change can bias the moments. It is assumed the data have been continuum subtracted.
**zero=t|f**- Mask out values below zero for mom=30,31,32 (**experimental**) [f]
**contsub=t|f**- Fake a continuum subtraction for mom=30,31,32 (**experimental**) [t]
**integrate=t|f**- When using mom=0 the signal is summed along an axis, you
can either just sum the numbers (this used to be the old default), or integrate,
ie. multiply the sum by the cell-size along that axis. This is now the default,
to make it more consistent with the new units in
*snapgrid(1NEMO)*. **pos=***[ix0,iy0]*- If used, this should contain two (zero-based) pixel coordinates, at which
position a spectrum is printed to stdout. Currently only implemented along
the Z direction, hence X and Y. At some future time it may also support
spectra along Y or X, but most advanced features are only implemented along
axis=3. Default: none

1% ccdgen "" cube1 noise spar=0,1 size=100,100,1000 seed=123 # intrinsic dispersion 2% ccdmom cube1 - mom=-2 | ccdstat - qac=t QAC_STATS: - 0.999886 0.0224798 0.922334 1.08579 9998.86 1 # dispersion of the adjacent differences 3% ccdmom cube1 - mom=-3 | ccdmom - - mom=-2 | ccdstat - qac=t QAC_STATS: - 1.4138 0.0388857 1.28338 1.55915 14138 1 # dispersion of a hanning smoothed cube % ccdsmooth cube1 - dir=z | ccdmom - - mom=-2 | ccdstat - qac=t QAC_STATS: - 0.611611 0.0191999 0.541171 0.685092 6116.11 1

09-jun-95V0.1 CreatedPJT 19-oct-95V0.2 simple implementation of axis=3PJT 12-dec-98V0.3 finished mom=0,1,2 for all axesPJT 31-dec-98V0.4 added keep=PJT 21-feb-01V0.4a added mom=3, and fixed major bugs in computing momentsPJT 25-mar-01V0.5 added mom=-1PJT 18-oct-05V0.6 added mom=-2 and cumulative optionPJT 16-sep-11V0.8 added clip= and rngmsk= [lost code]PJT 27-nov-12V1.0 added oper=PJT 14-feb-13V2.0 integrate=t is now the new default for mom=0PJT 21-jun-2016V2.3 added mom=30,31,32,33,34PJT 10-may-2017V2.4 force q&d cont subtraction on mom=30,31,....PJT 15-jun-2017V2.5 add pos= optionPJT 21-jun-2017V2.6 add abs= optionPJT