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
is the simulated data value based on the current version of the restored array,
is the variance of the
error associated with ,
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
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
FALSE. If a null (
!) value is supplied, the value used is an estimate of the noise based on the difference between adjacent pixel values in the observed data.
TRUEthen the variance of the observed data sample is added to both the numerator and denominator when evaluating the correction factor for each data sample. This is the modified form of the R-L algorithm used by the LUCY program in the STSDAS package within IRAF.
!) value means using the title of the input NDF.
TRUE, then the variance of each input data sample will be obtained from the VARIANCE component of the input NDF. An error is reported if this option is selected and the NDF has no VARIANCE component. If
FALSE, then a constant variance equal to the square of the value given for Parameter SIGMA is used for all data samples. If a null (
!) value is supplied, the value used is
TRUEif the input NDF has a VARIANCE component, and
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.
!) value is supplied, the value used is the middle pixel (rounded down if there are an even number of pixels per line).
!) value is supplied, the value used is the middle line (rounded down if there are an even number of lines).
The convolutions required by the R-L algorithm are performed by the multiplication of Fourier transforms. The supplied input array is extended by a margin along each edge to avoid problems of wrap-around between opposite edges of the array. The width of this margin is about equal to the width of the significant part of the PSF (as determined by Parameter THRESH). The application displays the width of these margins. The margins are filled by replicating the edge pixels from the supplied input NDFs.
The R-L algorithm works best for arrays which have zero background. Non-zero backgrounds cause dark rings to appear around bright, compact sources. To avoid this a background array should be created before running LUCY and assigned to the Parameter BACK. The SEGMENT and SURFIT applications within Kappa can be used to create such a background array.
All non-complex numeric data types can be handled. Arithmetic is performed using single-precision floating point.