For each child, in each band we create a template, an approximate light distribution for the child (for a star, this template would be simply the PSF). We then assume that in each band
parent = sum_i (weight_i template_i)
and solve for the weights. With these
in hand we can then assign the flux associated with each child in each pixel
according to the value of weight_i template_i, and our task is
complete.
Note that, because the children are associated with the master list of peaks detected in any band, the resulting children are defined consistently in each band so it makes sense to (e.g.) ask questions about their colours.
PEAKs in an
OBJC, and treats each
as the centre of a child. This list was produced by
Measure Objects.
The deblender proceeds as follows:
child_max in the
fpParams.par); if it does
the OBJECT1_NODEBLEND bit is set, and the deblender gives up.
OBJECT1_DEBLENDED_AS_PSF bit in flags is set, the
star is subtracted, and
bits are set in an OBJMASK
that indicate which pixels were modified.
OBJECT1_TOO_LARGE
bit is set and photo gives up on that child.
OBJECT1_EDGE bit is set,
and photo gives up on that child.
OBJECT1_DEBLENDED_AS_PSF bit is set, the template
is taken to be a PSF, centred at the centre of the child. Otherwise, photo
goes through the object looking at pairs of pixels
(rowc + y, colc + x) and (rowc - y, colc - x),
where (rowc, colc) is the centre of the child. The template
is made up of the smaller of the two pixel values, corrected
for bias by adding 0.56(sky sigma).
For pixels whose `mirror' lies outside the parent object's OBJMASK, the value of the template is taken to be zero. If one of the pixels lies in an area where a PSF has been subtracted (see above), the other pixel's value is used. If both pixels were PSF contaminated, use the average of the two. In all of these cases, no bias correction is applied.
OBJECT1_NOTDETECTED
bit is set and photo gives up on that
OBJECT1.
OBJECT1_DEBLENDED_AS_PSF bit is set to indicate this.
We achieve this by going through all the children in each band looking for
the smallest eigenvalue; if it is too small, that child is rejected,
and the parent has the OBJECT1_DEBLEND_PRUNED bit set (both
for the OBJC and also for all the OBJECT1s). The least squares procedure
is then repeated, until a solution is reached. If this solution consists
of only a single child, the parent's OBJECT1_BLENDED bit
is turned off, and the deblender stops.
sum == sum_i (weight_i * template_i). If this is at least 10,
that pixel in the i-th deblended child has value
weight_i * template_i; otherwise we re-evaluate sum
using the smoothed templates. If the resulting sum
is greater than 2, the pixels are given values of
weight_i * smoothed_template_i
otherwise we share the flux equally among all the children. XXX
OBJC as usual, but
with a non-NULL children field which points
at one of its children; in addition its
OBJECT1_BLENDED bit is set, and nchild
is one or more.
Each child has a non-NULL parent field which
points to its parent, and may have a sibbs field too. It
has its
OBJECT1_CHILD bit set.