Table of Contents

Name

ccdmom - moment or accumulate along an axis of an image

Synopsis

ccdmom [parameter=value]

Description

ccdmom takes special moments (in position, or image intensity) along an axis of an image/cube. It can optionally also accumulate along the selected axis.

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) .

Parameters

The following parameters are recognized in any order if the keyword is also given:
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=, 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    total emission
1    mean velocity
2    sigma, the velocity dispersion (FWHM = 2.355 * sigma)
3    velocity of peak fit (around the max and the two points on either)
-1    average intensity along the axis
-2    dispersion around the mean intensity along the axis
-3    differentials along an axis
-4    clumping factor (only axis=3 supported now)
30    total emission in the Nth (peak=) peak
31    mean velocity of the Nth peak
32    sigma, velocity dispersion, of the Nth peak
33    h3 (like a skewness) of the Nth peak, 
34    h4 (like a kurtosis) of the Nth peak
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]
** 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.
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.
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=-
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) .

See Also

pvtrace(1NEMO) , ccdsub(1NEMO) , ccdrt(1NEMO) , ccdshape(1NEMO) , snapgrid(1NEMO) , mom2cube(1NEMO) , image(5NEMO)

Caveats

Cannot compute straight moments, e.g. the 2nd moment along an axis, such as e.g. snapgrid can do. This program only computes user friendly numbers (sum, mean, dispersion) and gives special meaning to negative values of mom= and axis=.

Files

src/image/misc/ccdmom.c

Author

Peter Teuben

Update History


09-jun-95    V0.1 Created    PJT
19-oct-95    V0.2 simple implementation of axis=3    PJT
12-dec-98    V0.3 finished mom=0,1,2 for all axes    PJT
31-dec-98    V0.4 added keep=    PJT
21-feb-01    V0.4a added mom=3, and fixed major bugs in computing moments    PJT
25-mar-01    V0.5 added mom=-1    PJT
18-oct-05    V0.6 added mom=-2 and cumulative option     PJT
16-sep-11    V0.8 added clip= and rngmsk= [lost code]    PJT
27-nov-12    V1.0 added oper=    PJT
14-feb-13    V2.0 integrate=t is now the new default for mom=0    PJT
21-jun-2016    V2.4 added mom=30,31,32,33,34    PJT


Table of Contents