← Handbook

Sky Green Rebalance

Reduce a residual, spatially systematic green excess in the sky/background of an otherwise successfully calibrated and stretched image, without recoloring legitimate green, cyan, or teal target structure -- the SPCC-safe alternative to running broad SCNR everywhere.

schema 1 · revision 1

Recognize it

Intended output

A sky/background region with the identified systematic green excess reduced toward a bounded neutral reference, with target and stellar colors in protected regions substantially preserved and no new magenta cast, channel crush, or visible mask boundary introduced. When no qualifying sky excess exists, the step passes the image through unchanged rather than forcing a correction.

Required input state

What NOVA does

seti_astro.sky_green_rebalance() builds a luminance-derived mask: it sigma-clips the luminance distribution to estimate a sky level and noise, ramps from that sky level (lo_sigma=1.5) to a signal transition (hi_sigma=5.0), applies a smoothstep shape, and Gaussian-feathers the boundary (feather=3.0) to get a sky weight W. A strict sky core is W > 0.9; with no such region, the function passes through unchanged (skipped=no-sky). Within that core it self-gates on measured sky G/R against min_gr=1.03, passing through unchanged if already at or below that (skipped=no-excess). Otherwise it Gaussian-smooths the channels (smooth_sigma=6.0), computes the positive excess max(G_smooth-max(R_smooth,B_smooth),0), and subtracts amount (default 0.85) times that excess weighted by sky weight -- the max(R,B) cap means green can be neutralized but never inverted into magenta, unlike an (R+B)/2-style cap. An opt-in signal-region extension (allow_signal_green, default false) applies the same smoothed-excess math inside the signal mask when a p99 green-lead heuristic exceeds signal_trigger=0.06, at signal_amount=0.6 -- gated in production by the target's folio color prior so genuinely teal/OIII-dominant targets are not capped. Runtime diagnostics (amount, gr_before, gr_after, signal_lead, signal_cap, sky_coverage) are returned and should be persisted with any evidence record; candidate ID alone does not capture effective treatment.

Use when

  • The image is already nonlinear and otherwise well calibrated/processed.
  • Residual green is concentrated in sky/background rather than obviously astrophysical target structure.
  • Successful upstream SPCC makes global SCNR undesirable, but a measurable modest sky cast remains.
  • A usable low-luminance sky region exists.

Skip when

  • The inferred "sky" is actually frame-filling faint nebulosity, IFN, galaxy halo, unresolved crowded stars, or mosaic structure.
  • No meaningful sky core exists -- a no-sky skip is the correct behavior, not a failure to work around.
  • Measured sky G/R is already within the configured tolerance.
  • The image is linear and still awaiting physical/catalog color calibration.
  • The target/palette legitimately contains dominant green/teal signal and signal correction has not been independently justified by the target's own color prior.
  • A gradient, pedestal, or calibration failure is the actual cause -- this step should not be used to hide an upstream defect.

Limits

  • This is masked chromatic correction, not calibration: it does not solve camera response or derive a physical white reference. It estimates which pixels are likely background from luminance statistics alone -- not WCS/catalog geometry or trained semantic segmentation -- so faint real nebulosity, IFN, diffuse galaxy halos, and large mosaic structure can all be classified as sky because they are faint, not because they are actually empty.
  • The default self-gate (sky G/R <= 1.03 passes through unchanged) is a 3% engineering trigger, not a confidence interval -- 1.029 is not meaningfully different from 1.031.
  • The correction field is a Gaussian-smoothed excess (max(G_smooth - max(R_smooth, B_smooth), 0)), deliberately not a pointwise green clip, so systematic tint is subtracted rather than one-sidedly clamping green noise -- the wrapper's own comment records that an earlier pointwise version dragged M31's sky median below neutral (1.06 -> 0.93).
  • Experiment Mode's two candidates (sgr_soft, sgr_standard) pass only `amount` and default `allow_signal_green` to false; no P23-specific adaptation function exists in experiments.py. Production autoprocess can separately opt into an additional signal-region green cap gated by the target's folio color prior. These are not the same treatment -- Experiment Mode evidence for sgr_soft/sgr_standard validates only the sky-only parameterization, not the production folio-gated signal extension, and the two should not be pooled.
  • No explicit no-op control exists among the current Experiment Mode candidates -- without an unchanged baseline in that comparison set, an assessor can select the least-damaging active treatment without ever demonstrating that a correction was needed at all.
  • The optional signal-region correction (opt-in, p99 green-lead heuristic above signal_trigger=0.06) is an explicitly heuristic override, not a spectroscopic validation of true target color -- target green cannot be labeled wrong merely because it is locally the strongest channel.

Scientific and aesthetic notes

  • A defensible comparison against global SCNR or between amount settings must use the same parent FITS at the same pipeline state, block by target/object morphology, broadband vs. LP/dual-band/palette state, SPCC success vs. fallback state, stretch engine and parameters, background-neutralization state, and starless vs. recombined state -- pooling across those states treats different problems as the same experiment.
  • gr_before/gr_after alone is incomplete evidence: a favorable number can arise from a wrong mask. Always pair it with sky coverage and a mask-plausibility review, and check target-region and matched-star color ratios separately.
  • A neutral-looking sky in this context is a rendering goal, not proof of physical photometry -- it can be affected by airglow, residual gradients, calibration state, and palette-mapping choices.
  • Historical M31/M42 examples reduced reported sky G/R while preserving object/star color, but are condition-specific artifact evidence, not a controlled repeated validation series.

Evidence and measurements

MeasurementsAcceptance criteria
  • Robust G/R and B/R medians in the exact sky mask used for evaluation, not whole-frame medians.
  • gr_before/gr_after paired with sky_coverage from the runtime diagnostics.
  • Per-channel sky median shifts, to detect neutralization achieved by crushing one channel rather than correcting a tint.
  • Target-region channel ratios on independently defined target masks, before and after.
  • Matched unsaturated star color changes.
  • Local spatial maps of channel-ratio residuals, not only one aggregate number.
  • A no-op paired comparison on the exact same parent input.
  • A valid evaluation sky region exists and is not obviously dominated by real target signal.
  • Sky G/R moves toward the declared target/tolerance without overshooting into a red/magenta bias, and without channel collapse.
  • Protected target regions and matched unsaturated stars show materially smaller color change than the sky correction region.
  • No visible mask boundary, chromatic halo, clipping, or banding is introduced.
  • Effective parameters, mask coverage, upstream calibration state, and signal-cap state are recorded -- meeting these criteria is single-run artifact evidence, not universal validation.

Cross-tool matrix

Tool EquivalenceExpected resultEvidence
novaExact replayReduced sky G/R with protected target/star regions materially unchanged, or an unchanged pass-through when no qualifying excess or sky core exists.nova-sky-green-rebalance-source, nova-m31-m42-sky-green-rebalance-history
pixinsightFunctional alternativeWhole-frame green neutralization toward the chosen reference.pixinsight-resources-p23
sirilFunctional alternativeWhole-frame green suppression toward the chosen reference.siril-scnr-p23
sasproFunctional alternativeWhole-frame green neutralization toward the chosen reference.nova-sky-green-rebalance-source

NOVA Python pipeline ontology current; NOVA-original NumPy/SciPy implementation, not a SASpro or PixInsight process

  1. Record gr_before, gr_after, signal_lead, signal_cap, and sky_coverage for every run used as evidence -- candidate ID alone is not sufficient provenance.
  2. Do not generalize Experiment Mode sgr_soft/sgr_standard results to production's folio-gated signal-extension behavior; they are different treatments.
  3. Inspect the effective sky mask, not only the final image, before accepting a result on a frame-filling or extended target.

Controls and starting ranges

sgr_soft
amount=0.60; gentler alternative
sgr_standard
amount=0.85; current reference parameterization
min_gr
1.03 self-gate; skip if sky already at or below this
allow_signal_green
false by default; production gates opt-in via folio color prior

Mask behavior: Built-in luminance-derived sky/signal mask with smoothstep shaping and Gaussian feathering.

Failure modes

  • Faint real target structure misclassified as sky and desaturated.
  • Magenta/red overshoot from an inappropriate reference or excessive correction.
  • Legitimate OIII/teal signal suppressed by an inappropriately enabled signal cap.

Recovery

  • Revert to the parent input; disable the signal cap; tighten or inspect the mask; accept a no-sky/no-excess pass-through as a valid outcome.

PixInsight-family SCNR SCNR (global selective-color neutralization); not this step's algorithm

  1. Treat global SCNR as a conceptually related but not equivalent alternative -- it corrects wherever green exceeds a neutral reference across the whole frame, not only in an estimated sky region.
  2. Record the exact effective mode/amount/preserve-lightness settings if using SCNR as a comparison point; adapted settings under upstream calibration failure can collapse nominally different presets into the same effective treatment.

Controls and starting ranges

mode
Average-Neutral or Maximum-Neutral; whole-frame, not sky-masked

Mask behavior: No sky-specific mask -- whole-frame by design.

Failure modes

  • Crushing an already-correct near-black sky pedestal or breaking a linked white balance after successful SPCC.

Recovery

  • Prefer the sky-selective step or a no-op after successful calibration.

Siril SCNR SCNR (green removal); exact version not independently confirmed in this repo

  1. Treat Siril's SCNR as the same conceptual family as global SCNR elsewhere -- whole-frame green suppression, not a sky-masked correction.
  2. Record the exact effective settings used if comparing against the sky-selective step.

Controls and starting ranges

green removal
whole-frame, not sky-masked

Mask behavior: No sky-specific mask -- whole-frame by design.

Failure modes

  • Crushing an already-correct sky pedestal or recoloring legitimate green/teal target structure after successful calibration.

Recovery

  • Prefer the sky-selective step or a no-op after successful calibration.

Seti Astro Suite Pro SCNR SCNR; exact effective mode/amount semantics belong to the separate SCNR article's own source audit, not re-derived here

  1. Treat SASpro's SCNR as the same whole-frame conceptual family, not this step's spatially selective algorithm.
  2. Record the effective mode and amount if used as a comparison point; this step's smoothed-excess masked math is a different, NOVA-original algorithm, not a SASpro wrapper.

Controls and starting ranges

mode
whole-frame selective-green neutralization, not sky-masked

Mask behavior: No sky-specific mask -- whole-frame by design.

Failure modes

  • Crushing an already-correct near-black sky pedestal or breaking a linked white balance after successful SPCC.

Recovery

  • Prefer the sky-selective step or a no-op after successful calibration.

Validation status

Not yet Jeff-validated. Use this as sourced guidance, not a certification.

Sources

Related evidence

The M66 recipe and Jeff-validation ledger will link here when their static exports are available. Until then, this article remains explicitly unvalidated.