PixInsight 1.5

The Officially Unofficial Reference Guide

Rev.0.1 – 3/29/2010

Section 1: Background Modelization

PixInsight provides two specific tools to build synthetic background models: DynamicBackgroundExtraction (or DBE for short), and AutomaticBackgroundExtractor (or ABE). DBE is a highly interactive tool, while ABE works automatically without user intervention. While ABE can do a great job for relatively simple problems, DBE is the preferred tool for difficult cases.

AutomaticBackgroundExtractor

As its name says, ABE does its work in a completely automatic fashion: you provide a source image, a number of parameters controlling ABE's behavior, and you get another image with the generated background model. That model can be applied to the original image by subtraction or division, depending on the type of uneven illumination problems to correct for. Additive phenomena like light pollution gradients should be corrected by subtraction. Multiplicative effects like vignetting should be fixed by a division, though in this case a correct image calibration (flats) is the correct procedure.

Sample Generation and Rejection

Sample Generation

Box Size: This is the length in pixels of a background sample box. Too large sample boxes can be inadequate to reproduce local background variations. Too small sample boxes can be too dependent on small-scale variations, such as noise and stars.

Box separation: This is the distance in pixels between two adjacent background sample boxes. This parameter is useful to control the density of generated sample boxes. A relatively sparse sample distribution can be helpful to make the background mode less dependent on strong local variations. The number of samples can also have a strong repercussion over computation times.

Global Rejection

Deviation: Tolerance of global sample rejection, in sigma units. This is the maximum dispersion allowed for background samples, with respect to the median of the target image. By decreasing this value, ABE will be more restrictive to select background samples that differ too much from the mean background of the whole image. This is useful to avoid inclusion of large-scale structures, such as extended nebular regions, in the generated background model.

Unbalance: Shadows relaxation factor. This parameter multiplies the deviation parameter when used to evaluate dispersion of dark pixels (i.e. pixels below the global median of the target image). This allows to include more dark pixels in the generated background model, while more restrictive criteria are used to reject bright pixels.

Use Luminance Limits: Enable this option to set a high-low limit to determine what is a background pixel or not. When enabled, Shadows indicates the minimum value of background pixels. Likewise, Highlights determines the maximum value allowed for background pixels.

Local Rejection

Tolerance: This parameter indicates the tolerance of local sample rejection, in sigma units. This is the maximum dispersion allowed for background sample pixels. By decreasing this value, background samples will reject more outlier pixels with respect to the median of each sample box. This is useful to make background samples immune to noise and small-scale bright structures, such as relatively small stars.

Minimum valid fraction: It sets the minimum fraction of accepted pixels in a valid sample. By decreasing this value, ABE will be more restrictive to accept valid background samples.

Draw sample boxes: If this option is selected, ABE will draw all background sample boxes on a newly-created 16-bit image, which we call sample boxes image. A sample boxes image is very useful to adjust ABE parameters by controlling the regions of the image that are being used to sample the background.

In a sample boxes image, each sample box is drawn with a pixel value proportional to the inverse of the corresponding sample background value.

Just try samples: If this option is selected, ABE will stop after extracting the set of the background samples, just before generating the background model. Normally you'll want to select this option along with the Sample boxes option. In this way, ABE will create a sample boxes image that you can use to evaluate the suitability of the current ABE parameters.

Interpolation and Output

Function degree: Degree of the interpolation polynomials. ABE uses a linear least squares fitting procedure to compute a set of 2-D polynomials that interpolate the background model. Higher degrees may be necessary to reproduce local background variations, especially in presence of wildly varying sky gradients, but they can also lead to oscillations. In general, the default value (4th degree) is appropriate in most cases. If necessary, this parameter must be adjusted by careful trial-error work.

Downsampling factor: This parameter specifies a downsampling ratio for generation of the background model image. For example, a downsampling value of 2 means that the model will be created with one half the sizes of the target image.

Background models are by definition extremely smooth functions. For this reason, a background model can usually be generated with downsampling ratios between 2 and 8 without problems, depending on the variations of the sampled background. A downsampled model greatly reduces the required calculation times for background model interpretation.

Model sample format: This parameter defines the format (bit depth) of the background model.

Evaluate background function:When enabled, ABE generates a 16-bit image that you can use to quickly evaluate the suitability of the computed background model. The comparison image is a copy of the target image to which the model is applied by subtraction. The Comparison factor parameter is a multiplying factor applied to exaggerate the irregularities in the resulting comparison image.

Target Image Correction

Correction: The generated background model can be applied to produce a corrected version of the target image. The background model must be subtracted to correct for additive effects, such as gradients caused by light pollution or by the Moon. Multiplicative phenomena, such as vignetting or differential atmospheric absorption for example. Must be corrected by division.

Normalize: If this option is selected, the initial median value of the image will be applied after background model correction. If the background model is subtracted, then the median will be added; if the background model is applied by division, the resulting image will be multiplied by the median. This tends to recover the initial color balance of the background in the corrected image.

If this option is not selected (as by default), the above median normalization will not be applied and – if the background model is accurate – the resulting corrected image will tend to have a neutral background.

Discard background model: Dispose the background model after correction of the target image. If this option is left unselected, the generated background model will be provided as a newly created image window.

Replace target image: Perform an in-place background correction. With this option selected, the process will replace the target image with the corrected image. When this option is not selected, the corrected image is provided as a newly created image window, and the target view is not modified in any way. The latter is the default state of this option.

Identifier: If you wish to give the corrected image a unique identifier, enter it here. Otherwise PixInsight will create a new identifier, usually adding _ABE to the identifier of the target image.

Sample format: Define the format (bit depth) of the corrected image.

DynamicBackgroundExtraction

DBE is a dynamic PixInsight process. Dynamic processes allow a high degree of user interaction in the PixInsight graphical user interface. Basically, the user defines a number of samples over free sky background areas, and the DBE process builds a background model by three-dimensional interpolation of the sampled data.

Selected Sample: x of z

This section provides data and parameters related to individual samples.

Sample #: Current sample index.

Anchor X: Horizontal position of the current sample's center in the image coordinates.

Anchor Y: Vertical position of the current sample's center in the image coordinates.

Radius: The radius of the current sample, in pixels.

R/K, G, B: RGB values for the current sample.

Fixed: Enable this option to force a constant value for the current DBE sample. This fixed value will be taken as the median of the sample pixel values for each channel of the image.

Wr, Wg, Wb: Statistical sample weight for the red, green and blue channel respectively. A weight value of one means that the current sample is fully representative of the image background at the sample's location. A value of zero indicates that the sample will be ignored to model the background, since it has no pixels pertaining to the background. Intermediate weights correspond to the probability of a sample to represent the background of the image at its current location.

Symmetries

DBE uses a system to control the symmetrical behavior of the samples, either horizontally, vertically or in diagonal. When a sample has one of these options enabled, it will automatically generate duplicates around the center of the image. This function is particularly useful when for example we have an image with vignetting but we cannot access the background pixels because they are “covered” by pixels defining a celestial object, such as a nebula.

The user then can define a sample where there is no background available and utilize the symmetrical properties to add identical background values around the center of the image, assumed to be the symmetrical center of the vignetting.

H, V, D: Enabling any of these parameters will enable horizontal, vertical or diagonal symmetry.

Axial: Enables axial symmetry. The value indicates the number of axis.

Activating this button will show the active symmetries for all samples, not just the selected sample.

Model Parameters (1)

This section provides data and parameters related to individual samples.

Tolerance: This parameter is expressed in sigma units, with respect to the estimated mean background value. Higher tolerance values will allow for more permissive background estimations. Increasing this value favors inclusion of more pixels in the background model, but at the risk of including also pixels that don't pertain to the true background of the image. Decreasing tolerance will cause a more restrictive pixel rejection; however, too low tolerance values lead to poorly sampled background models.

Shadows relaxation: Increasing this parameter allows for the inclusion of more dark pixels in the generated background model, while more restrictive criteria can be applied to reject bright pixels (as specified by the tolerance parameter). This helps to achieve a better sky background modelization without inclusion of relatively bright and large objects, as extended nebulae.

Smoothing factor: This parameter controls the adaptability of the 2-D surface modeling algorithm used to build the background model. With a smoothness value of 0, a pure interpolating surface spline will be used, which will reproduce the values of all DBE samples exactly at their locations. Moderate smoothness values are usually desirable; excessive smoothness can lead to erroneous modelization.

Unweighted: By selecting this option, all statistical sample weights will be ignored (actually, all of them will be considered as having a value of one, regardless of their actual values). This can be useful in difficult or unusual cases, where DBE's automatic pixel rejection algorithms may fail due to too wild gradients. In such cases, you can manually define a (usually quite reduced) set of samples on strategic locations and tell the background modeling routines that you know what you're doing – if you select this option, they will trust you.

Model Parameters (2)

Symmetry center X / Symmetry center Y: As explained in the Symmetries section above, sample symmetries can be useful to deal with illumination irregularities that possess symmetric distributions. These two parameters define the horizontal and vertical axis of symmetry, respectively, in image coordinates.

Minimum sample fraction: This parameter indicates the minimum fraction of non-rejected pixels in a valid DBE sample. No sample with less than the specified fraction of background pixels will be generated. Set to zero to take into account all samples regardless of their calculated representativeness of the background.

Continuity order: Derivative order of continuity for the 2-D surface spline generator. Higher continuity orders van yield more accurate models (accuracy here means adaptability to local variations). However, higher orders also may lead to instabilities and rippling effects. The recommended value is 2; you usually should not need to change this parameter.

Sample Generation

This section is used to define and generate the automatic creation of background samples.

Default sample radius: The radius for newly created background samples, in pixels.

Resize All: Click here to resize all existing background samples to the value specified in the “Default sample radius” box.

Samples per row: Number of DBE samples in a row of automatically generated samples.

Generate: Click here to generate the automatically defined samples based on the parameters in this section.

Minimum sample weight: Minimum statistical weight for generated DBE samples. This parameter only applies to automatically generated DBE samples. No samples will be generated with statistical weights below the specified value.

Sample color, Selected sample color, Bad sample color: These are the colors used to draw the sample boxes on the target image.

Model Image

Identifier: If you wish to give the background model image a unique identifier, enter it here. Otherwise PixInsight will create a new identifier, usually adding _background to the identifier of the target image.

Downsample: This parameter specifies a downsampling ratio for generation of the background model image. For example, a downsampling value of 2 means that the model will be created with one half the sizes of the target image.

Background models are by definition extremely smooth functions. For this reason, a background model can usually be generated with downsampling ratios between 2 and 8 without problems, depending on the variations of the sampled background. A downsampled model greatly reduces the required calculation times for background model interpretation.

Sample format: This parameter defines the format (bit depth) of the background model.

Target Image Correction

Correction: The generated background model can be applied to produce a corrected version of the target image. The background model must be subtracted to correct for additive effects, such as gradients caused by light pollution or by the Moon. Multiplicative phenomena, such as vignetting or differential atmospheric absorption for example. Must be corrected by division.

Normalize: If this option is selected, the initial median value of the image will be applied after background model correction. If the background model is subtracted, then the median will be added; if the background model is applied by division, the resulting image will be multiplied by the median. This tends to recover the initial color balance of the background in the corrected image.

If this option is not selected (as by default), the above median normalization will not be applied and – if the background model is accurate – the resulting corrected image will tend to have a neutral background.

Discard background model: Dispose the background model after correction of the target image. If this option is left unselected, the generated background model will be provided as a newly created image window.

Replace target image: Perform an in-place background correction. With this option selected, the process will replace the target image with the corrected image. When this option is not selected, the corrected image is provided as a newly created image window, and the target view is not modified in any way. The latter is the default state of this option.

Identifier: If you wish to give the corrected image a unique identifier, enter it here. Otherwise PixInsight will create a new identifier, usually adding _DBE to the identifier of the target image.

Sample format: Define the format (bit depth) of the corrected image.

Differences between ABE and DBE

Besides the fact that ABE is automatic and DBE requires user interaction, ABE and DBE use different interpolation algorithms. ABE performs a linear least squares fit, and DBE uses 2-D surface splines, which are more adaptable. DBE also uses a sophisticated system based on statistical sample weights that also produces very robust background models. ABE can outperform DBE in relatively simple cases, where there are many free background areas, because its interpolation scheme is very robust. However, DBE is preferred for difficult cases because nothing can beat the human brain to decide where to put samples into a rich field plenty of nebulae and milky way condensations.

Back to the Index | Copyright Note