Removes defects from a substantially flat one-, or two-, or three-dimensional
NDF FFCLEAN
The defects are flagged with the bad value. The defects are found by looking for pixels that deviate from the spectrum or image’s smoothed version by more than an arbitrary number of standard deviations from the local mean, and that lie within a specified range of values. Therefore, the data array must be substantially flat. The data variances provide the local noise estimate for the threshold, but if these are not available a variance for the whole of the data array is derived from the mean squared deviations of the original and smoothed versions. The smoothed version of the data array is obtained by block averaging over a rectangular box. An iterative process progressively removes the outliers from the data array.
[]
[3.0, 3.0, 3.0]
TRUE
, the noise level implied by the deviations from the local mean over the
supplied box size are stored in the output VARIANCE component. This noise level
has a constant value over the whole NDF (or over each section of the NDF if
the NDF is being processed in sections–-see Parameter AXES). This constant
noise level is also displayed on the screen if the current message-reporting
level is at least NORMAL
. If GENVAR is FALSE
, then the output variances will be
copied from the input variances (if the input NDF has no variances, then the
output NDF will not have any variances either). ). [FALSE]
!
, is given, then
there is no limit on the data range. [!]
!
) value means using the title of the input NDF.
[!]
By default, a null (!
) value is used for WLIM, which causes the pattern of bad pixels
to be propagated from the input image to the output image unchanged. In this case,
smoothed output values are only calculated for those pixels which are not bad in the
input image.
If a numerical value is given for WLIM, then it specifies the minimum fraction of good
pixels which must be present in the smoothing box in order to generate a good output
pixel. If this specified minimum fraction of good input pixels is not present, then a
bad output pixel will result, otherwise a smoothed output value will be calculated.
The value of this parameter should lie between 0.0 and 1.0 (the actual number
used will be rounded up if necessary to correspond to at least one pixel).
[!]
There are different facts reported, their verbosity depending on the current message-reporting level set by environment variable MSG_FILTER. When the filtering level is at least as verbose as NORMAL, the application will report the intermediate results after each iteration during processing. In addition, it will report the section of the input NDF currently being processed (but only if the NDF is being processed in sections–-see Parameter AXES).
This routine correctly processes the AXIS, DATA, QUALITY, VARIANCE, LABEL, TITLE, UNITS, WCS, and HISTORY components of an NDF data structure and propagates all extensions.
Processing of bad pixels and automatic quality masking are supported.
All non-complex numeric data types can be handled. Arithmetic is performed using single- or double-precision floating point as appropriate.