If a constant value is used to replace magic values (which will be the case if Parameter SIGMA is given the value zero), then the same replacement value is used for both the data and variance arrays when COMP="All". If the variance is being processed, the replacement value is constrained to be non-negative.
Magic values are replaced by random values if the Parameter SIGMA is given a non-zero value. If both DATA and VARIANCE components are being processed, then the random values are only stored in the DATA component; a constant value equal to SIGMA squared is used to replace all magic values in the VARIANCE component. If only a single component is being processed (whether it be DATA, VARIANCE, or Error), then the random values are used to replace the magic values. If random values are generated which will not fit into the allowed numeric range of the output NDF, then they are discarded and new random values are obtained instead. This continues until a usable value is obtained. This could introduce some statistical bias if many such re-tries are performed. For this reason SIGMA is restricted so that there are at least 4 standard deviations between the mean (given by REPVAL) and the nearest limit. NOMAGIC notifies of any re-tries that are required.
The last of the options forces substitution of bad pixels in both the data and variance arrays. This parameter is ignored if the data array is the only array component within the NDF. ["Data"]
KAPPA --- Kernel Application Package