Jump to content
  • Correcting Flat Field Errors in PI

    Reggie Jones

    There are times when your flat field calibration frames are not adequate to correct all the flat field errors contained in your stacked and integrated sub exposures. You readily see these errors in your integrated image, some of which can get quite ugly. What are your options then? I’ve used a process I learned some time ago to help correct these problems when they occur. Here is an outline of a basic process you can use when (not if) you run into this issue. The first image is an image of M3 I took recently and you can see some of the flat field problems this image has such as partial donuts in the background.

    Not a huge issue here but it’s quite annoying since you’re trying to get the best image you can create from you’re hard earned data.  I exclusively use PixInsight to process astro imaging data, and the process I’m about to describe is specific to this program.

    My first step is to clone the original image and rename the cloned image to Star_Support.  You’re going to create a star mask using Multiscale Median Transform (MMT) with the settings shown:  Your Star_Support image should then look something like the 2nd image posted.

    Set this image aside and create another cloned image from the original image. Rename this new clone, Flat.  Now using the Pixel Math process, we will apply the Star_Support image to the image named Flat using:

    $T - Star_Support

    Your new Flat image should look something like the 3rd image posted.  Please note that I renamed the Flat image to FlatRGB as I will need to apply this process to the luminance data as well.  Renaming these files will help keep things organized.  We now apply MMT to the FlatRGB image using the MMT settings in the 4th image posted.

    The 5th image posted is what the now revised FlatRGB image should look like.

    Next, we use the Clone Stamp tool to clean up any artifacts in the FlatRGB image to make the image as uniform as possible. After cleaning everything up, my FlatRGB image looks like the 6th image posted.

    The final step is to use Pixel Math to apply the synthetic FlatRGB image we created to the original image to clean up the flat field errors. The Pixel Math equation to use in this is:

    $T * mean (FlatRGB) / FlatRGB

    If you have the master dark frame, you can also use the following equation to properly apply the synthetic Flat to your original image:

    $T-Dark) / (FlatRGB) * med(FlatRGB)

    In the end, my original image was corrected (last image posted).  Remember, you will need to use this same process to correct the integrated luminance image.

    You’ll find there are variations on this process for creating a synthetic flat and the MMT settings might be different for a particular situation to be successful but this basic process is a good place to start correcting a flat field problem you may be having in your integrated data.

    TL 1FlatErrorsImage.jpg

    TL MMT1appliedStarSupport.jpg

    TL MMT1StarSupportApplied.jpg

    TL MMT1StarSupportPost.jpg

    TL MMT1StarSupportPostFlat.jpg

    TL MMT2appliedtoFlatRGB.jpg

    TL MMT2appliedtoFlatRGBPost.jpg

    TL MMT2appliedtoFlatRGBPostFinal.jpg

    TL PixelMathFinalApplied.jpg

    TL PixelMathFinalAppliedComplete.jpg

    User Feedback

    Recommended Comments

    There are no comments to display.

  • Create New...

Important Information

By using this site you agree to our Guidelines