GradientCorrection
GradientCorrection (GC) builds a smooth model of the background gradient and subtracts it from the linear image. Structure protection prevents nebula structures from being treated as gradient.
Purpose
| Task | Setting |
|---|---|
| remove light pollution and moon gradients | defaults, structure protection |
| remove large-scale colour gradients across the whole image | additionally Simplified Model |
| keep structure out of the model | Protection Threshold and Amount |
Principle
- GC judges by smoothness: everything large-scale and smooth counts as gradient. Real large-scale emission (Milky Way, extended nebulae) can therefore partly end up in the model – structure protection or Corrects gradients using a reference map of the sky (MARS) and can therefore distinguish real large-scale signal from gradients. For broadband data; requires SPFC. Open fundamentals → help against this.
- Whatever is in the model is subtracted from the image. The model must be smooth and must not contain nebula shapes.
- Gradients differ per filter (light pollution is not spectrally neutral, moonlight is stronger in blue). For mono data correct each master separately, before combining; afterwards the gradients would be merged into colour gradients.
- Correct before colour calibration: a gradient would distort background estimation and white balance.
Parameters
| Parameter | Effect | Typical choice |
|---|---|---|
| Automatic convergence | iterates until the model is stable | enabled |
| Structure protection | protects detected structures from the model | enabled |
| Protection Threshold | what counts as structure; lower = faint structures too | 0.05–0.1 |
| Protection Amount | how strongly protected, i.e. how far the model is decoupled from the image there | 0.5 to start |
| Generate gradient model | outputs the model as an image | enabled |
| Generate protection masks | outputs the protection masks (one per channel for RGB) | enabled |
| Low / High threshold and tolerance | exclude unusually dark or bright areas (stars) from the model | defaults 0.20 / 0.50 / 0.05 / 0.00 |
| Scale | size scale of the model | default 5.00 |
| Smoothness | smoothing of the model | default 0.40 |
| Simplified Model / Model degree | additional polynomial for the large-scale gradient | off; degree 1 if needed |
| Amount | Effect | Risk |
|---|---|---|
| too low | structures barely protected | nebula signal ends up in the model and is subtracted |
| about 0.5 | balanced | – |
| too high | gradient under and next to structures barely captured | residual gradient, blotchy background near the nebula |
Operation
- Crop first (DynamicCrop): remove stray-light streaks, stacking borders and other artefacts. Otherwise GC tries to model them as gradient and distorts the surrounding background.
- Apply to the linear image with threshold 0.05–0.1 and amount 0.5.
- Check protection masks, model and result (see below); adjust only if a check reveals a problem.
Typical applications
Extended emission, weak channels
When nebula fills large parts of the image (narrowband, Milky Way fields): keep the Protection Threshold low so that faint outer parts count as structure. Be especially careful with weak channels (OIII, SII) – there the structure lies only just above the background.
Large-scale colour gradient
Wide-field images often show a gradient across the whole frame (e.g. reddish on one side, greenish on the other).
- Correct without Simplified Model first.
- If an even gradient remains: Simplified Model, model degree 1, correct again and compare.
- Higher degrees only for clearly curved gradients.
Adjusting the model
| Observation | Remedy |
|---|---|
| residual gradient visible | lower Scale and Smoothness step by step; the model must not pick up nebula structure |
| model shows nebula or filament shapes | raise Scale or Smoothness; Amount 0.6–0.7 |
| halos around filaments or bright stars in the result | protection too strong → lower Amount slightly |
| almost the whole image protected, residual gradient remains | raise the threshold slightly (e.g. 0.1) |
Bright star in the field
The halo of a bright star must not be modelled as gradient. Check the model for rings or bright patches around the star.
Alternative: DynamicBackgroundExtraction
DBE with few samples (10–20), only in clearly nebula-free areas and not in the halo of bright stars. Why few: every sample on nebula pulls the model up and subtracts nebula signal.
What a good result looks like
Typical errors
| Observation | Cause | Remedy |
|---|---|---|
| Faint nebula weaker than before | nebula in the model | lower the threshold, raise Amount, check the model |
| Rings or patches around a bright star in the model | halo captured as gradient | adjust protection; with DBE no samples in the halo |
| Streaks remain in the result | artefacts not removed before correction | crop, correct again |
| Colour gradient towards the edges remains | large-scale part not captured | Simplified Model, degree 1 |
| Blotchy background near the nebula | Amount too high | lower Amount |
When to use it – and when not
| Good for | Better another tool |
|---|---|
| gradients in broadband and narrowband data | distinguishing real large-scale emission → Corrects gradients using a reference map of the sky (MARS) and can therefore distinguish real large-scale signal from gradients. For broadband data; requires SPFC. Open fundamentals → (broadband, with reference data) |
| a quick, robust correction without reference data | targeting individual problem areas → DBE with few samples |
HaLRGB workflow · MultiscaleGradientCorrection (MGC) · Narrowband workflow (HOO/SHO) · OSC workflow with a quad band-pass filter · WeightedBatchPreprocessing (WBPP)