Firstly, what is Debayering?

Colour CMOS camera sensors usually have four colour channels (two greens, one red and one blue). The sensor has a sensitive layer of pixels which measure the “intensity” of light only, and converts it to numbers. This sensitive surface can be considered “monochrome” or black and white only. It does not record colour information. However, just above this sensitive layer of pixels is a grid of tiny filters, one for each pixel. These filters selectively allow allow red, green or blue light through. So a “green” pixel is the same as a “red” pixel – but the filter above it is red or green. This is referred to as the Bayer Matrix or Bayer Filter (link to Wikipedia).

When using a dedicated astronomy cameras we always capture images or video in RAW mode (for best signal purity), and we stack many sub-frames (or “subs”) to get more detail in the image, to reduce noise, and to improve dynamic range so we can use all sorts of nice processing techniques to show amazing detail. The more subs you stack the better.

Therefore you must manually enter and check the Debayering pattern settings BEFORE stacking your images. You can check if it’s correct by trying to Debayer one RAW image and then running an auto colour balance on it (to remove excess green caused by that extra green sensitivity) and perhaps a stretch to show the detail. If the colour in the image appears normal, then you have the right settings. If not, try again – there are only 4 possible combinations: RGGB, GRBG, GBRG, BGGR.

What is Debayering, and why should I do it before stacking my images? - Altair Cameras for Astronomy