StellarPix
← Back to Learn
ProcessingPublic tutorial · No membership required12 min read

Gradient Correction with DynamicBackgroundExtraction (DBE)

Build a background model from carefully chosen samples, test a subtraction correction, and protect faint sky structure. Use DBE on linear monochrome masters or RGB data when a matching MARS reference is unavailable or another method is needed.

Sources reviewed October 25, 2026

When to choose DBE

DynamicBackgroundExtraction fits a background model using locations you identify in the image. Unlike MGC, it does not need MARS reference data, a sky solution, or SPFC metadata. Its reliability depends on your ability to identify background that is not part of the object.

DBE is an alternative when the installed MARS DR2 data has no matching band or lacks coverage of your field. For example, if no genuine S II reference is available, do not substitute Hα or broadband red simply because the master will become SHO red. Test DBE on a fresh copy of that S II integration instead.

A reference-free method still has limits. Diffuse emission, dust, and galaxy halos can resemble gradients. If there is no identifiable background in the field, stop rather than forcing a flat result. Missing reference data does not make automatic sample placement trustworthy.

1. Choose the linear checkpoint

Begin with a calibrated, registered, integrated master from WBPP. Preserve the original and make a working duplicate. For monochrome RGB, SHO, or HOO, correct each filter master before combining channels. For one-shot-color broadband data, use the already debayered RGB integration.

Keep stars present and avoid permanent stretching, star removal, sharpening, or creative palette work for this exercise. Use STF to inspect the linear data. A screen stretch changes the display, not the pixels used to fit the model.

Trim uncovered stacking borders first, keeping a common crop across monochrome masters intended for combination. Name the checkpoint clearly, for example Target_SII_before_DBE.xisf. A new DBE trial should always start from this same source, not from the last corrected result.

Inspect calibration quality. Dust rings, strong vignetting, reflections, or light leaks may require better flats or acquisition changes. This lesson addresses an additive sky-background gradient; it is not a prescription to repair every illumination defect.

2. Find believable background areas

Examine the full field under a useful STF, then zoom into candidate areas. Look beyond the brightest nebula or galaxy: faint outer emission and dust may extend much farther than the obvious subject. The darkest patch can be real absorbing dust rather than an empty measurement of sky background.

Compare the source with a deeper image or survey of the same field when available, accounting for orientation and filter differences. Use that comparison to recognize structures, not to force your colors or background level to match someone else’s processing.

Mark candidate regions across the frame, including near different sides of the unwanted brightness slope where genuine background exists. Do not use only one small corner and expect the model to be well constrained everywhere else.

3. Place and inspect samples

Open DynamicBackgroundExtraction through All Processes and activate the working image by clicking in its view. Start with a modest, deliberate set of samples. Each sample is a claim about the background, not just a marker that fills a grid.

  1. Reset a reused configuration. Choose a sample radius that covers enough sky pixels for a useful estimate while fitting inside the chosen clean region. Inspect the entire sample footprint at a suitable zoom; a clean center is insufficient if its edges include a star or filament.
  2. Place samples in the background regions you identified, avoiding stars, halos, galaxies, nebulosity, dust features, and invalid borders. Include a range of positions that can describe the broad gradient without forcing samples into the subject.
  3. If using Generate for an initial grid, inspect every generated sample and delete or move unsuitable ones. Automatic generation does not establish that a point is free of faint emission. More samples do not automatically produce a better model.
  4. Check the selected-sample readout and any invalid or rejected sample indicators using the installed help. Tolerance and sample-weight settings affect how samples are evaluated; do not raise tolerance merely to make every marker acceptable.
  5. Keep model settings at a conservative baseline for the first attempt. Save a DBE process instance with its sample positions before execution so you can revise the trial. Record the image geometry it belongs to.

4. Make a subtraction trial

Subtraction is appropriate for the additive sky-gradient exercise here. Division addresses multiplicative effects and requires a different justification; it is not a stronger version of subtraction. Consult the installed documentation before changing the correction type.

  1. In Target Image Correction, choose Subtraction. Check that the selection is not None or Division.
  2. Leave Replace target image off so the corrected result is created separately. Leave Discard background model off so you can inspect the estimated background. Check any Normalize option in your version: it affects the retained background level and is not a sample-quality or color-calibration control. Record its state and hold it constant across comparisons.
  3. Execute the dynamic process with its execution control. Verify which new view is the corrected result and which is the background model rather than assuming their names.
  4. Save the result and model with trial identifiers, for example Target_SII_DBE_trial01.xisf and Target_SII_DBE_model01.xisf. Keep the pre-correction checkpoint available.

5. Judge the model and corrected image together

Compare source and corrected result at the same framing, zoom, and STF settings. Independently auto-stretching both can obscure brightness changes. After that comparison, refresh the corrected image’s STF to inspect faint structure on its own too.

Display-stretch the model. Look for a plausible broad component, then compare it with the actual subject. Recognizable filaments, galaxy outskirts, or dust patterns in the model warrant investigation: they may be real signal being treated as background. A smooth model alone does not prove correctness.

Inspect the corrected image for dark bowls around the subject, ripples, colored patches, star halos, and weakened faint structures. Check the edges and corners as well as the center. Do not select a trial solely because the sky became darker or more uniformly black.

For RGB, inspect spatial color changes separately from the overall cast. Later broadband SPCC can establish color balance, but it cannot restore structure removed by an incorrect background model. For grayscale data, avoid comparing separately auto-stretched filters as though their screen brightness measured the same sky signal.

6. Refine one cause at a time

Return to a fresh source duplicate for each trial. First revisit sample locations and footprints near suspect areas. If a sample includes real emission, adjusting smoothness is not a substitute for relocating it.

If sampling is sound, compare a small change to the smoothing setting, keeping other choices fixed. Too flexible a fit can follow unwanted local detail; too smooth a fit can leave genuine background variation. Inspect the model and result after every change instead of adopting one numerical preset for every target.

Save each candidate separately and retain the simplest correction that clearly improves the unwanted gradient without damaging the subject. If no trial is convincing, keep the uncorrected master and reassess the background assumptions or seek a more suitable reference or method.

7. Repeat appropriately across monochrome filters

Review R/G/B or S II/Hα/O III separately. A location that appears empty in S II may contain strong Hα emission, so copied sample coordinates are only a starting point to inspect, even when the images are registered. Different filters can need different sample placements and model settings.

If MGC works well on one filter and DBE is needed on another, retain a separate documented correction for each. Compare alternatives from the same original filter master. Do not run DBE automatically after every MGC result.

Save accepted outputs as filter-specific linear masters with common geometry. Combine corrected R/G/B for RGB, or assign corrected S II/Hα/O III to red/green/blue for SHO. For HOO, use corrected Hα as red and the same accepted corrected O III master for both green and blue.

Inspect the combination for residual color slopes, edge problems, and misregistration. Revisit the responsible input rather than immediately applying another global correction. Continue with broadband color calibration where appropriate, or the narrowband palette workflow before stretching and finishing.

Quick troubleshooting and completion checks

No corrected image appears: verify the correction type, output options, target association, and any console errors. A generated model is not itself the corrected target.

Samples are rejected or the model fails: inspect their locations, size, valid pixels, and the current evaluation controls. Read the help before relaxing tolerances; a marker being accepted does not prove it measures background.

Dark holes or lost nebulosity: inspect samples on or near real structure and compare the model with the source. Return to the original checkpoint instead of trying to brighten the damaged region afterward.

Rings or severe vignetting persist: review flats, optical reflections, and calibration. Do not switch to division without identifying a multiplicative problem and validating that workflow.

The field is full of emission: do not manufacture background by placing samples in the faintest visible nebulosity. A conservative partial correction or no correction can be preferable to removing real signal.

Before moving on, save the original, accepted corrected master, model, and DBE instance. Record the sample strategy, correction type, normalization state, and parameter changes. Keep the output linear until its later processing stage.

This is an original beginner exercise. The linked authors provide worked examples and background concepts; their older screenshots are not current defaults. Use PixInsight’s installed process help for control definitions. This guide does not claim a hands-on test of every control in the latest build.