Before the first iteration, the restored array is initialised either to the array given by Parameter START, or, if no array is given, to the difference between the mean value in the input data array and the mean value in the background (specified by Parameters BACK and BACKVAL). Simulated data are then created from this trial array by smoothing it with the supplied PSF, and then adding the background on. The value describing the deviation of this simulated data from the observed data are then found and displayed. If the required is not reached by this simulated data, the first iteration commences, which consists of creating a new version of the restored array and then creating new simulated data from this new restored array (the corresponding value is displayed). Repeated iterations are performed until the required is reached, or the iteration limit is reached. The new version of the restored array is created as follows.
For further background to the algorithm, see L.B. Lucy, Astron.J. 1974, Vol 79, No. 6.
where the sum is taken over the entire input array (excluding the margins used to pad the input array), n is the number of values summed, is the observed data value, is the simulated data value based on the current version of the restored array, is the variance of the error associated with , and is the value of Parameter CHIFAC. Using 0 for CHIFAC results in the standard expression for . However, the algorithm sometimes has difficulty fitting bright features and so may not reach the required normalised value. Setting CHIFAC to 1 (as is done by the LUCY program in the STSDAS package within IRAF) causes larger data values to be given less weight in the calculation, and so encourages lower values. [1.0]
The numerical value given for WLIM specifies the minimum total weight associated with the good pixels in a smoothing box required to generate a good output pixel (weights for each pixel are defined by the normalised PSF). If this specified minimum weight 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. WLIM=0 causes a good output value to be created even if there is only one good input value, whereas WLIM=1 causes a good output value to be created only if all input values are good. Values less than 0.5 will tend to reduce the number of bad pixels, whereas values larger than 0.5 will tend to increase the number of bad pixels.
This threshold is applied each time a smoothing operation is performed. Many smoothing operations are typically performed in a run of LUCY, and if WLIM is larger than 0.5 the effects of bad pixels will propagate further through the array at each iteration. After several iterations this could result in there being no good data left. An error is reported if this happens. [0.001]
KAPPA --- Kernel Application Package