Flat Correct script

Yarosia

Member
Hi!
I had trouble with flats since i started to use them with my QHY8L ccd and a flatbox.
They introduced a strong red cast in the image, impossible to correct with BN and CC.
Initially i tried to split RGB channels in my integrated fit, apply linear fit to match histograms, and combine again the channels. That worked, with BN and CC working better. Anyway, a red cast was again present in the image, a lot less visibile, but still there, with blue channel not strong (blue parts of nebulas was really dim).
Talking with a friend i found this is a problem with OSC and broadband filters, (i use PrimaLuceLab LPS, similar in spectral response to the idas LPS) and he was already fighting against that.
What this script attempts is to "boost" the dim channel and avoid that channel to be dominant in the corrected integrated image.
The flats are still working after appling this, if you don't exceed with factor parameter.
Here is an example of the results:


Original Version: Before -> After with an integrated image (20x600sec)
Version B: Flat Frame histogram as shooted
Version C: Flat Frame histogram after script with factor 2 on red plane
Version D: Single 600 sec frame calibrated with original flat frame
Version E: Single 600 sec frame calibrated with corrected flat frame
Version F: Script UI

Vignetting and dust correction, for my images, are preserved.

The script needs to be applied to the bayer image of the master flat frame.
CFA channel is the channel of the matrix that will be multiplied
Factor is the number to multiply the pixels of the channel

You can dim a channel aswell, by choosing a number <1.



This, anyway, is only a compromise. Flat Frames should not be edited this much, but, better than a strong strong red cast...

I would like to thank:
Mike Schuster (mschuster ) for scripting tips and part of ui code
Paolo Zampolini and Edoardo Luca Radice (astroedo) for previous attempts fighting casts with broadband filters and osc cameras.

Hope will help some of you!

Clear Skies,
Michele
 

Attachments

  • FlatCorrectBeta.zip
    3.1 KB · Views: 88
Back
Top