Next: Frame offset detection
Up: Sky background estimation
Previous: Poisson offset generation
Sky combination is a method used to filter out low-frequency sky
variations from a set of jittered images. The algorithm is based on a
non-linear filtering of pixels along time. One estimated sky frame is
estimated per input raw frame.
The method is iterating on each pixel position on the detector
along a time line. The algorithm can be described for each pixel
position as:
- Loop on all planes. For each plane, do the following:
- Loop on all pixel positions on the detector. For each position,
do the following:
- Extract an array of
pixel values in time around
the current pixel (this brings up to 2h+1 values).
- Scale (divide) each pixel in the array by the (filtered) average
value of the plane it was extracted from.
- Sort this scaled array by increasing pixel value.
- Reject the rmin and rmax pixel values in the sorted array.
- Average the remaining pixel values and assign the result to
the same pixel position in the same current plane in the output cube.
Notice that if
rmin = rmax = h this method is equivalent to a running
median filter: only the central sorted value is kept. Do not use such
settings for rmin and rmax though, since it would leave edge planes
with undefined values.
Edge effects are not negligible: the first and last h planes do not
use 2h+1 raw planes for sky estimation, but between h+1 and 2h+1.
This lower amount of information is propagated to a less precise sky
estimation and thus more noise in the subtracted frames.
User-provided parameters are:
- h the halfwidth of the running time filter. Setting too small a
value makes the filter useless. On the opposite, too high a value would
prevent taking into account the temporal sky background variations and
thus skew the results. Setting this value automatically would require to
take into account the exposure time and sky temporal variation
statistics in the current wavelength. It is not yet implemented. The
default value is 7, which means that in the best cases 15
time values (minimum 8) are used for each pixel to estimate sky
variations.
- rmin and rmax, the number of rejected upper and lower pixels.
Their sum shall not exceed h. Rejecting low-valued pixels compensates
for very noisy values. Rejecting high-valued pixels is the mechanism
which extracts the astronomical signal. The default for both values is
currently set to 3.
This method is sensitive to an initial assumption: namely, when a
pixel position sees mostly an object signal and not a sky background
variation, it becomes difficult (if possible) to discriminate sky from
object signal. This is the case for extended and bright objects: when
jittered around, the offsets are never big enough to prevent skewed
estimations. The resulting artefacts are usually dark crowns surrounding
bright objects in the final image. They are directly affecting
photometry and signal-to-noise measurements.
Next: Frame offset detection
Up: Sky background estimation
Previous: Poisson offset generation
Nicolas Devillard
1999-06-21