CCG_SM3x

Combines data lines using a sigma clipped median

Description:

This routine accepts an array consisting a series of (vectorised) lines of data. The weighted mean and standard deviation of each input column in STACK is then used to estimate the range of values which represent the required sigma clipping. The standard deviation is derived from the population of values at each position along the lines (cf. each image pixel). Values outside of this range are then rejected and the resulting output mean values are returned in the array RESULT.

Note that clipping will not be used when only two or three values are available (unless in the case of 3 values NSIGMA is less than 1.0).

Invocation

CALL CCG_SM3x( NSIGMA, NPIX, NLINES, STACK, VARS, MINPIX, RESULT, WRK1, WRK2, POINT, USED, NCON, NBAD, STATUS )

Arguments

NSIGMA = REAL (Given)
The number of sigma at which to reject data values.
NPIX = INTEGER (Given)
The number of pixels in a line of data.
NLINES = INTEGER (Given)
The number of lines of data in the stack.
STACK( NPIX, NLINES ) = ? (Given)
The array of lines which are to be combined into a single line.
VARS( NLINES ) = ? (Given)
The variance to to used for each line of data. These are used as inverse weights when forming the mean and do not need to be real variances, as they are not propagated.
MINPIX = INTEGER (Given)
The minimum number of pixels required to contribute to an output pixel.
RESULT( NPIX ) = ? (Returned)
The output line of data.
WRK1( NLINES ) = ? (Returned)
Workspace for calculations.
WRK2( NLINES ) = ? (Returned)
Workspace for calculations.
POINT( NLINES ) = INTEGER (Returned)
Workspace to hold pointers to the original positions of the data before extraction and conversion in to the WRK1 array.
USED( NLINES ) = LOGICAL (Returned)
Workspace used to indicate which values have been used in estimating a resultant value.
NCON( NLINES ) = DOUBLE PRECISION (Returned)
The actual number of contributing pixels from each input line to the output line.
NBAD = INTEGER (Returned)
The number of bad values in the output array created while forming the statistics. It excludes those bad values whose corresponding values along the collapse axis are all bad.
STATUS = INTEGER (Given and Returned)
The global status.

Notes: