skylevelfactor – Sky level relative to histogram peak. Default of 6% (0.06) seems to work well in most cases. Lowering can help improve zero sky color shift at the risk of not finding zero sky levels. Higher levels might be needed when zero sky levels are not found.
zeroskyred, zeroskygreen, zeroskyblue – Zero sky levels for respective rgb channels (0 – 25000). These values are set to 4096 as default, which works well in most cases. However, for dark sky levels that exhibit color shift from not finding a good black point, these parameters can be adjusted. Using the box_method described below can help in finding a dark sky region to optimize black point.
setmin – Set to true to perform a set minimum in the rgb data. This brings up the base level using scaling to assure there are no really dark pixels.
setminr, setming, setminb – Minimum values used for respective rgb channels. Defaults for each channel are set to 4096.
rgbskyzero_method – Method for determining image area for setting zero sky levels.
0 – full_area: Use the entire image area for setting the zero sky levels.
1 – restricted_area: Use a restricted window of the darkest area defined by win_width and win_height for setting the zero sky levels.
win_width – Width of box area in pixels for auto-scan for darkest region
win_height – Height of box area in pixels for auto-scan for darkest region
win_frac – Set from 1 – 10. Window steps for sliding window defined by win_width x win_height across and down the image during auto-scan for the darkest region.
Use of the rgbskyzero_method:
In most images the results from using the full image area or a restricted dark area will be virtually identical. Using the full area rgbskyzero_method = 0 is faster and usually preferred as it does not include the added step of scanning the full image for the darkest area.
In cases where there is significant light pollution or a background bias, stretching to bring out faint details can exaggerate zero sky errors set by the estimated channel zero sky values. This will usually manifest in the dark areas as color shifts. Just running using a restricted dark sky area alone, though, will not likely improve such images. Adjustment of the individual zero sky parameters (zeroskyred, zeroskygreen, zeroskyblue) is needed.
To help in doing this, setting rgbskyzero_method = 1 will auto-scan the full image for the darkest area contained in the window specified by win_width x win_height in increments specified by win_frac . In addition to the normal output file, this will generate a file of just the isolated dark area as well as one of the entire image showing a box around where the dark area was found. Histograms of the original input file as well as those of the zero sky subtracted full image and dark sky area will also be written to the selected path.
The image of the selected dark region can then be evaluated as is or stretched for easier identification of dark region color shifts. Program astro-color-stretch can be used to do the stretch (with parameter rgbskyzero_method = 0) or it can be hand stretched in a post processor. The zero sky parameters can then be iteratively adjusted to find a better black point. Since astro-color-stretch runs very fast (< 1s for small dark region images), multiple runs can be done quickly to determine the optimal setting.
Choosing a win_width and win_height depends on the image. Too small an area compared to the full image results in a pixelated image with less information. Too large, and the area will likely pick up too much overall image sky glow, defeating the purpose of using a smaller dark region. By observing the general shape and size of the area that might be darkest in a given image is the best guide in determining the best size and aspect ratio. I usually start with something at least in the neighborhood of 700 pixels on a side for a full-frame 45.6 MP image.
For the auto-scan, a win_frac = 1 steps the full window across image without any overlap. This is the fastest and least accurate scan but works well in images with larger dark areas relative to the window size. Setting win_frac = 10 increments the window scan by 1/10 of the window height and width. This is more accurate for finding the darkest area but takes a little longer. In practice this still scans very quickly for even large 45.6MP full frame images.