Good point Geoff,
However. having now had three hour's sleep, I can visualise things more clearly . . . in fact, with 2s Flats, you could virtually get away with no calibration whatsoever.
If you had acquired enough flats (and, at 2s exposure times, there is little reason not to do so) then simply Integrating these would effectively smooth out the 'background' readout noise.
It doesn't really matter if you now have a non-zero 'noise floor' - in fact the creation of a Master Flat should actually avoid any 'zero' (or even 'very close to zero') values altogether. Remember the application of Flats to an Image is a 'division' process, and zero-values don't fit well into that scenario.
I actually prefer to establish the MAX value of all pixels in a Master Flat, and then to ADD a constant value to the Master Flat such that the 'brightest' pixel is then always at a value of '1' (remember, irrespective of any actual ADU values. PI scales each and every image into the REAL domain, between 0 and 1 (inclusive).
Notice that the process I have described is purely 'additive' so, in theory, all pixel values should shift - by the same amount - 'up' and 'away' from zero.
Now, when this 'ScaledMasterFlat' is used to calibrate a raw image, the brightest areas of the flat will have little (or no) effect on the raw data, because you are 'dividing by 1' (or, pretty close to 1). In other words, the original raw image - now calibrated - won't get any 'brighter'. However, for those areas in the flat data where pixel values are close to zero (your dust donuts, vignetting, etc.), the division process will 'upscale' the raw data as required, making those specific areas 'brighter'.
You actually don't 'need'(or 'have') to do this though, the PI code neatly traps 'division by zero' errors and rescales the final output back into the 0.000... to 1.000... range automagically. However, I describe my methods because I use an OSC imager - if I apply my algorithm to the extracted CFA channels (individually, and then use these to reconstruct my ScaledMasterFlat) then the result of FlatCalibration routine produces images that have little, or no, added colour cast.
Remember, the illumination of your imager during Flat acquisition might not be using a 'perfect white' light source. On a Mono imager, with filters (including Ha, etc.) the problem doesn't really apply - beacuse you have to acquire a set of raw Flats for each and every filter that you use.
But, you have to take into consideration that a Flat image is used to correct for 'defects' in your optical chain. If you change that chain in any way, for example by changing to a different filter, then you need to acquire a new set of Flats - unless you are confident that Flats acquired as a 'batch', using all your filters (this batch probably being acquired either pre- or post-session) is 'statistically repeatable' as you perhaps change filters during an imaging session. This is why I gave up on mono imaging, preferring to use the OSC approach - we just don't get the weather-windows here in Scotland that allow for all the complexities and nuances of mono data acquisition.
Anyway, I realise that this is slightly OT, but hope that it helps somenone, somewhere, anyway (or even causes someone to think about 'my' methods and then call them into question - that's the only way to learn, "by your mistakes")
![smile :)](http://pixinsight.com/forum/Smileys/default/smile.gif)