Preparing Master Flat Frames

Flat-field frames are used to correct for lens vignetting and some other lens and sensor defects. They can be captured at any time and processed into a master flat frame. A single master flat frame can be suppled to any of Starry Landscape Stacker, Starry Sky Stacker or Long Exposure Stacker when processing images captured with the same

as the flat-field frames were captured with.

In practice most photographers will need only a small number of master flat frames.

To prepare a master flat frame, you must first capture a set of flat-field frames and (optionally) a set of dark frames exposed identically to the flat-field frames. Then these frames must be processed with Starry Landscape Stacker, Starry Sky Stacker or Long Exposure Stacker into a master flat frame.

Capturing flat-field frames

The most important and difficult thing about about capturing flat-field frames is finding something that is sufficiently evenly illuminated with a very wide viewing angle. You want something that if photographed with a perfect lens and camera, every pixel would have exactly the same value. For lenses with a narrow field of view this is not too hard, but for very wide lenses as are typically used with Starry Landscape Stacker and sometimes used with Long Exposure Stacker, finding something this evenly illuminated is difficult. 

I tried the display on my iMac (and several other displays) but the viewing angle was not wide enough. If you view the display from straight on it is much brighter than if you view it at an angle. I use a lens with a diagonal field of view of 126°, so I need a surface that is evenly illuminated when viewed 63° off axis. Very few displays support a viewing angle this large. So I went to a local plastics retailer and bought several pieces of translucent white acrylic sheet from their scrap bin for one dollar each. They all seem to work well as diffusers when placed over the display on my iMac.

I make a bright white rectangle with a drawing program that is about the same size as the acrylic sheet I am using and make the rest of the display black. I tape the acrylic sheet over the white rectangle. I make the room dark. The dark room and black display around the white rectangle are necessary to reduce reflections and shadows on the acrylic sheet.

I set the focal length, focus distance, aperture and ISO to those that I want to prepare a master flat-field  frame for. Then I set the shutter speed so that I see a centered peak in the histogram. Then I capture many exposures while holding then lens very close to the acrylic sheet and moving slightly during and between exposures to try to mask any defects in the acrylic sheet or display behind it. My current thinking is that 50 exposures is a reasonable number. 

It might help to have dark frames to go with the flat-field frames. With the versions of Starry Landscape Stacker, Starry Sky Stacker and Long Exposure Stacker released in the summer of 2020, 10 to 20 dark frames should be enough. The dark frames must use exposure settings identical to the flat-field frames and are used only when making the master flat--they should not be used with light frames.  (If you are making multiple master flats with different lens settings but identical exposure settings, you can make a master dark from a single set of master darks to save some time).

Processing flat-field frames into a Master Flat

You can process RAW files directly, or first convert your RAW files to TIFF files. Using RAW files directly is a better approach for most users as it allows the apps to track orientation information to automatically rotate the master  flat to work with light frames in any orientation. TIFF files do not contain enough information to support this rotation. If you are going to convert your RAW files to TIFFs with a RAW converter, import your RAW flat-field frames and the matching dark frames into your RAW converter (e.g., Lightroom, ACR). You should apply exactly the adjustments that you apply to light frames, with the exception of exposure. In particular, if you change the contrast with your light frames, you must make the same contrast adjustment to your flat-field frames. 

Start Starry Landscape Stacker, Starry Sky Stacker or Long Exposure Stacker and open either the RAW files or the 16-bit TIFF files you made. Open all the flat-field frames and the matching dark frames. The app will detect that you are making a master flat and will do everything automatically. When it is done you will be prompted to save the master flat. I change the name of the master flat to something that tells me the camera body, lens, focal length, aperture and ISO since I need to match this information with the similar settings in my light frames in order to find the correct master flat to apply.

If there is a problem and the app does not automatically make a master flat, it is likely because the flat-field frames were not recognized as flats. To correct this problem, re-open your files, but check the box at the bottom of the open panel labelled "Display the image classification table after opening", before clicking on "Open". This will allow you to be sure that all the frames have been correctly classified.

Last updated January, 2024