Color Calibration
Step: Linear
White balance for the linear image. The module multiplies the red, green and blue channel by one factor each so that stars come out neutral. In Stars mode it measures the factors on the stars in your image; in Manual mode you set them yourself. Use it when the image has an overall color cast from the optics, the filter or the sensor that the sky background alone does not explain.
The module needs a color image. A mono image, or a Bayer mosaic that has not been debayered, is rejected.
Parameters
| Parameter | Range | Default | Effect |
|---|---|---|---|
| Mode | Stars, Manual | Stars | Stars measures the factors on the stars of the image. Manual uses the three factors below. |
| Red factor (Manual only) | 0.1…10 | 1 | Multiplier of the red channel. Used only in Manual mode. |
| Green factor (Manual only) | 0.1…10 | 1 | Multiplier of the green channel. Used only in Manual mode. |
| Blue factor (Manual only) | 0.1…10 | 1 | Multiplier of the blue channel. Used only in Manual mode. |
When to use it
Use it on the linear image, before any stretch. Recommended order:
- Gradient Removal, if the sky has a gradient.
- Background Neutralization.
- Color Calibration.
- Background Neutralization once more, if the calibration tinted the sky.
The factors multiply the whole channel, the sky included. A sky that was neutral before can pick up a slight tint from the new factors, so neutralizing the background again afterwards puts it right. Neutralizing first matters as well: the star measurement subtracts the sky around each star, so it works either way, but the result is easier to judge on a neutral background.
Stars mode needs at least five usable stars. Stars that are clipped (a pixel at or above 0.95 in any channel), too close to the border or to pixels without data are left out. If the module reports too few stars, make sure the image has not been stretched and has unsaturated stars, or use Manual mode.
How it works
In Stars mode:
Find the stars. The module detects the stars on the mean of the three channels, as Star Reduction does.
Measure each star in each channel. This is aperture photometry: the sum of all pixels within a circle of twice the star's FWHM around the star, minus the median of a ring just outside the circle, once for every pixel in the circle. The ring measures the local sky separately for each channel, so a tinted sky does not disturb the star color.
Leave out unusable stars. Stars with a pixel at or above 0.95 in any channel are clipped, and their color is wrong. A star can clip in one channel only (typically red or blue in a strong cast), so this is checked per channel, not on the mean. Stars with no positive flux in some channel are left out too.
Combine. For every star the module forms the ratios red ÷ green and blue ÷ green. The median of each ratio over all stars is the color of the average star; the median is not moved by a few unusually red or blue stars or by one badly measured star.
Factors. The factors are
red = 1 / median(red ÷ green) green = 1 blue = 1 / median(blue ÷ green)Green stays unchanged and the other two channels are brought to its level, so the average star ends up neutral. The overall brightness follows the factors; the module does not renormalize it.
In Manual mode the three factors you set are used as they are. With all three at 1 nothing changes.
Every pixel is then multiplied by the factor of its channel. Pixels without a value stay without a value. The file information (exposure time, filter and so on) is kept.
The idea is that the light of many stars of all spectral types adds up to a spectrum without a dominant color, so the average star is a "white reference" — the same reasoning as white balance on a gray card in photography. It works best on star fields with many stars; a field with few stars or a large, strongly colored nebula can bias it. Aperture photometry with a background ring is the standard method in astronomical image analysis (S. B. Howell, Handbook of CCD Astronomy, 2nd edition, Cambridge University Press, 2006, chapter on photometry). A calibration against the known star colors of a catalog (photometric color calibration) would be more exact; it needs a plate solution and a catalog and may follow as a later step.
Errors
- Color calibration needs a color image. The image has one channel. If it is a mosaic from a one-shot-color camera, run Debayer first.
- Only N usable stars found, at least 5 are needed. Stars mode did not find enough unsaturated stars. Use Manual mode, or calibrate an image with more stars.