Overview of a general flat-fielding problem and description of its solution by Munipack.
Munipack implements its own flat-field algorithm on base of the standard photometry calibration rather than commonly used methods (they uses of median of scaled flat-fields). The presented approach enables to reach the maximal possible precision which is limited by only statistical noise of light. The approach is unique and has been not found in any available literature.
Although a correct flat-field is the crucial tool for reaching suitable photometry precision of observations, the care of acquiring and processing of flat-fields is not appropriate. This is especially true for any flat-field post-processing.
A capacity of common semi-conductor detectors is limited on values, say, 100k counts per pixels. A good flat-field has its mean level about 50k counts which gives its relative precision on value √50k / 50k ≈ 0.004 per pixel, if Poisson distribution can by considered. So for a star which occupy about ten pixels (3×3), one will have a relative precision over 0.01 magnitude due to the flat-field. A small error in flat-field determination leads to measurable deviations of results.
To improve the precision, some increase of a capacity of detectors can help, but it have technical limitations. Also, it will not suppress different light sensitivity of pixels including all the optical path. In this case, the feasible way is averaging of frames as provides Munipack flat utility.
Mean levels of flat-fields, captured using of an unstable light source (during twilight), are unequal. As a consequence, a direct average of that flat-fields is impossible.
A common solution of the trouble is normalisation of flat-fields on an unique intensity level preparatory to an averaging. The problem of the approach is determination of a mean level of every frame. Its values has no Normal distribution which is leading to a poor definition of the average level.
The main difficulty comes due to the folded surface of flat-fields. While it is possible to compute a mean level, the estimate will not be optimal or accurate due to blending of statistical distributions: the light noise and the surface of flat-field itself.
The crucial point of Munipack approach is decomposition of flat-field frames on single, independent pixels. These pixels, with the same position but collected over all frames, can be considered as sources of light like stars and similar procedure as the star calibration can be used. Reference sources are initially unknown, but can be estimated by iterations.
Munipack is using two-phase algorithm which determine a rough flat-field during the first phase (equivalent to common practice). The second phase determines the mean level against to the rough flat followed by averaging. The approach makes the second phase to be work with Normally distributed data giving precise and reliable results.
The developed algorithm solves a non-linear implicit equation for both levels and all pixels of the resultan flat-field. The approach is a variant of photon calibration where the reference photon sources are iterative established during the computation.
There is a list of rules, summarising of my long time experiences with flat-fielding, which I recommends for flat-fielding:
Flat-field manual, Photometry corrections. Standing on the shoulders of giants.