Hi,
I took the liberty of contacting Mischa Schirmer, one of the developers of Theli, to ask him about how exactly Theli handled bayered data, and how significant was the effects of pixel noise weighting in the final result. He kindly answered with a detailed and clear response, which I thought interesting and worthwhile sharing in this thread, with his permission.
"
>Specifically, at what point in the process are the raw images debayered (split into rgb colors)?
After they have been calibrated by the flat-field.
The flat-field itself is "homogenized" for detectors with a bayermatrix.
For each individual flat exposure, Theli calculates an average "RGGB"
2x2 pixel cluster, and then divides all such clusters in the flat by
this average cluster. In this way I remove the variation in spectral
sensitivity between color pixels, i.e. the tri-modal histogram becomes a
unimodal histogram, from which one can calculate meaningful statistical
values. Otherwise the image statistics can become highly unstable
causing problems at various places later on.
If you look at the combined master flat, you will see that the
characteristic Bayer pattern is largely suppressed.
This method also has another advantage: The debayering itself of the
target images (once they are flat-fielded) works better. Imagine you
took a twilight flat field (which is rather blue), then the red pixels
would have very low (and thus noisy) values. When you then flat-field
your target exposures, the red pixels may get very high values (because
they are divided by a low number), which can mess with various
debayering algorithms. I haven't done this analysis myself, but two of
my long-term users with DSLR cameras and color CCDs have spent a lot of
time investigating this. They also wrote the debayering program using
latest optimized algorithms, which I have implemented in Theli.
This master flat also becomes the global weight. It is difficult to
define a meaningful weighting process for Bayer data. Ideally, the
weight should reflect the relative sensitivities of pixels to each
other, responding to the same source of light. However, this is not the
case for color detectors, as the pixels are individually filtered and
thus are no longer comparable. The homogenization process as described
above removes most of this spectral dependence, and should e.g. reflect
a vignetting in your data nicely in the weight maps.
One might certainly argue about better weighting schemes for bayered
data, i.e. treat all red, green and blue pixel groups independently, but
that would create a hell of a lot of rewriting for all subsequent
software that uses the weights (object detection, resampling,
coaddition). In my experience the effect of the weight maps is usually
not much visible in a typical amateur astronomer picture, unless e.g.
vignetting is very significant and a large mosaics has been made.
Should you have any further ideas about this I'll be happy to discuss
them, but presently I think the weighting for Bayer data cannot be
improved much beyond this point.
> Is it split into rgb colors too, and applied independently to each color channel?
Theli did that a long time, together with a lot of other trial and error
for bayered data, but the approach as shown above appears to yield best
results.
>mischa
"
My conclusions from his response are that the effects of weighting maps are "not much visible in a typical amateur astronomer picture", and that there is value in "homogenizing" a master flat with a color cast (I usually do this thru a special function in Fitsworks, although I am not sure if its done as Mischa described here.)
cheers
Ignacio