One of the most frustrating aspects of astrophotography is dealing with uneven sky backgrounds. You spend hours capturing data, stack it carefully, and then discover your image has a bright side and a dark side. That gradient steals contrast from your target and makes the final image look flat.
The culprit is almost always light pollution. Streetlights, nearby cities, even the Moon can create gradients across your frame. The good news is that Siril has a powerful tool to fix this, and it works surprisingly well.
What Causes Gradients?
Your camera sees more than just your target. It also records the sky background, which is rarely uniform. Light pollution from a nearby town creates a bright glow on one side of your image. The Moon adds its own wash of light. Even the angle of your camera relative to the ground can introduce uneven illumination.
These gradients become obvious when you stretch your image. What looked like a uniform black background suddenly reveals itself as a bright band running across the frame.
The Siril Solution
Siril offers a Background Extraction tool that analyzes your image, builds a model of the sky background, and subtracts it from your data. The tool provides two methods, both effective for different situations.
RBF Interpolation
The Radial Basis Function method is the modern approach. It builds a smooth model of your sky background using sample points you place across the image. The key advantage is flexibility. RBF can handle complex gradients that change direction or vary in intensity across the frame.
You start by placing sample points on the sky background, avoiding stars and your target object. Siril then calculates a smooth surface that passes through all those points. The result becomes your synthetic sky background, which gets subtracted from your original image.
The smoothing parameter controls how rigid or flexible this surface is. A higher value creates a smoother gradient, ideal for large uniform variations. A lower value allows the model to follow smaller local changes.
Polynomial Interpolation
This is the classic method. It fits a polynomial equation to your sample points. The degree of the polynomial determines complexity. Degree 1 handles simple linear gradients. Degree 4 can model complex variations but risks overcorrection.
Polynomial interpolation works best on individual frames before stacking. If you have strong gradients that vary between frames, applying degree 1 correction to each sub can improve your final stack.
Step by Step
Open your stacked image in Siril. Navigate to Image Processing, then Background Extraction. Switch to Histogram Equalization view to make the gradient visible. You will immediately see where the problem areas are.
Generate a sample grid automatically or place points manually. For RBF, you only need a few dozen well placed samples. Avoid stars and nebula regions. The tool will warn you if a sample lands on something bright.
Click Compute Background to preview the correction. Toggle the before and after views to judge the result. If dark spots remain, some samples probably landed on faint stars. Remove those samples and try again.
When satisfied, click Apply. The gradient disappears, leaving a neutral background that reveals the true contrast in your target.
Tips for Best Results
Always inspect your image in autostretch or histogram view before starting. This reveals the true shape of the gradient. Use false color mode for an even clearer picture of problem areas.
Start with the default smoothing value of 0.5. Adjust gradually. Too low creates artifacts between sample points. Too high fails to correct complex gradients.
For mosaic panels, correct each panel individually before stitching. This ensures seamless blends without gradient mismatches.
If you see color banding after correction, enable the Add dither option. This adds subtle noise that breaks up posterization artifacts.
When to Use Background Extraction
This tool works best on stacked images as a processing step. However, you can also apply it to individual frames before stacking. This helps when your subs have varying gradients due to changing conditions throughout the night.
Do not confuse gradients with vignetting. Vignetting comes from your optics and is best corrected with flat frames. Background extraction can help reduce vignetting, but flats remain the proper solution.
Example
The Heart Nebula mosaic shown here required careful gradient removal. As a two panel mosaic captured across five nights, each panel had slightly different background levels. Siril background extraction evened out these differences, allowing the panels to blend seamlessly.
The result speaks for itself. A uniform black background makes the nebula pop, with detail visible from edge to edge.
Final Thoughts
Gradient removal is one of those processing steps that transforms a good image into a great one. Siril makes it accessible to everyone, regardless of skill level. The tool is fast, intuitive, and produces professional results.
Next time you see an uneven sky background in your images, do not despair. Open Siril, place some samples, and watch the gradient vanish. Your targets will thank you.
Equipment Used: Orion 8″ f4.9 Newtonian, Orion Atlas EQ-G mount, Canon T3i (full spectrum mod)
Software: N.I.N.A 3.1 for acquisition, Siril 1.4.0 for processing
Target: Heart Nebula (IC 1805) – Two panel mosaic, 85 x 180sec integration
Clear skies.
