Hi Colin,
as expected, the red channel is severely clipped in the calibrated flat frame (as it is in the MasterFlat), see the appended image "Cal_Flat_Statistics". Nearly 25 % of the pixels have zero intensity, this is virtually the complete red channel. So the fault occurred during calibration of the flat frames.
Take a look at the FITS Header of the calibrated flat frame (see appended image "Cal_Flat_FITS_Header"). You calibrated 4-s flat frames with MasterBias and the 240-s MasterDark, using the following settings:
'Master Bias' section enabled; "bias-BINNING_1.xisf", 'Calibrate' checked (*)
'Master Dark' section enabled; "dark-BINNING_1_EXPTIME_240.xisf", 'Calibrate' checked, 'Optimize' unchecked
'Master Flat' section disabled
[(*) It is not reasonable to enable 'Calibrate' for the MasterBias, because you don't use Overscan calibration, so there is no calibration of the MasterBias. This setting is not causing any trouble though.]
These settings result in subtracting the 240-s MasterDark from each of the 4-s flat frames. Of course this is not a correct calibration of the flat frames.
There are 3 posibilities to make it better:
1) Use dark frame optimization.
In the first step of the calibration, the MasterBias will be subtracted from the flat frames. In the second step, the SCALED difference (MasterDark - MasterBias) will be subtracted from the flat frames. Settings:
'Master Bias' section enabled; "bias-BINNING_1.xisf", 'Calibrate' unchecked
'Master Dark' section enabled; "dark-BINNING_1_EXPTIME_240.xisf", 'Calibrate' checked, 'Optimize'
checked'Master Flat' section disabled
2) Use only the MasterBias for flat frame calibration.
The corresponding settings are:
'Master Bias' section enabled; "MasterBias", 'Calibrate' unchecked
'Master Dark' section
disabled'Master Flat' section disabled
3) Use a MasterFlat-Dark for flat frame calibration.
In this case you capture dark frames with the exposure time of the flat frames (here: 4 s) and integrate them to the MasterFlat-Dark. The flat frames are calibrated with the following settings:
'Master Bias' section
disabled'Master Dark' section enabled; "MasterFlat-Dark", 'Calibrate'
unchecked, 'Optimize'
unchecked'Master Flat' section disabled
Case 3) is preferable. If you follow that route, you'll need no bias frames at all. For light frame calibration, use the following settings:
'Master Bias' section
disabled'Master Dark' section enabled; "MasterDark", 'Calibrate'
disabled, 'Optimize'
disabled'Master Flat' section enabled; 'Calibrate'
disabledBy the way, this subject is described in detail in my Guide to PI's ImageCalibration,
https://pixinsight.com/forum/index.php?topic=11968 .
-----
As I expected, your flat frames are way underexposed, see appended image "Uncal_Flat_Histogram". The peaks should be about in the middle of the horizontal axis of the histogram.
I have still one question: what is the mean of your MasterBias (see ImageStatistics)?
Bernd