Quick answer: To remove a gradient in GraXpert, load your stacked linear image (FITS, TIFF or XISF), pick a stretch preview so the gradient is visible, choose AI or the new Sample-free method, set correction to Subtraction, click Calculate Background, check the Background view, and save the Processed image as 32-bit FITS or TIFF. Use RBF with sample points only when the automatic methods fail.
As an Amazon Associate, Midwest Astronomy earns from qualifying purchases.
Almost every deep-sky stack has a gradient: a smooth change in brightness or color across the frame from light pollution, moonlight, airglow or imperfect flats. Gradients hide faint detail and make color calibration and stretching much harder. GraXpert is a free, open-source program built for one main job, removing those gradients, and it does it well enough that many imagers use it even when they own paid software.
This tutorial covers GraXpert 4.0.0 “Charon”, released in October 2026, which added a Siril-style, sample-free automatic background extraction alongside the existing AI and interpolation methods. Menu names and defaults below come from the 4.0 release notes and source code as of November 2026.

What GraXpert does (and does not do)
GraXpert builds a smooth model of the sky background, then removes it from your image. Everything depends on that model following the background and not your target. A model that hugs a faint nebula will erase it; a model that is too stiff leaves gradient behind.
As of version 4.0, GraXpert offers:
- Background extraction with five methods: RBF, Splines, Kriging, Sample-free and AI.
- AI denoising of linear images, with a strength control.
- A command-line interface for scripting background extraction and denoising.
GraXpert 3.1 release candidates added AI deconvolution models, but the 4.0 release disables deconvolution in both the interface and the command line; a comment in the source code says this was due to insufficient model quality. If a tutorial mentions a Deconvolution panel, it was written for a 3.1 test build.

GraXpert is not a stacker or a full processing suite. You still need software such as Siril, PixInsight or Astro Pixel Processor to stack and finish the image. Our comparison of astrophotography stacking software covers those options.
Where GraXpert fits in your workflow
Background extraction works best on linear data: the stacked image before any stretch. The usual order is:
- Calibrate and stack (darks, flats, bias or dark flats).
- Crop away stacking edges.
- Remove gradients in GraXpert.
- Color calibrate (for color data).
- Denoise (GraXpert’s AI denoise also works on linear data).
- Stretch and finish.
Cropping first matters. Stacking artifacts and black borders confuse every background model. Gradient removal is also not a substitute for flats: vignetting and dust shadows multiply your signal and should be corrected with calibration frames. Our guide to taking flat frames explains why.
Step 1: Install GraXpert
Download GraXpert from the official site (graxpert.com) or the project’s GitHub releases page. Version 4.0 system requirements per the release notes:
| Platform | Requirement (GraXpert 4.0) |
|---|---|
| Windows (64-bit) | Windows 10 and later (tested on Windows 11) |
| macOS Apple silicon | macOS 14 or later |
| macOS Intel | macOS 15; the Intel build is now deprecated |
| Linux (64-bit) | GPU acceleration for AI models requires CUDA 13 |
The AI models are not bundled with the program. GraXpert downloads the model you select the first time you use it, so run it once with an internet connection before heading to a remote site. On Windows, Defender may warn about an unrecognized app the first time; the documentation says to click “More info” and then “Run anyway”.
Step 2: Load the image and make the gradient visible
Click Load Image and choose your stacked file. GraXpert opens FITS, TIFF, XISF, PNG, JPEG and BMP, but use 32-bit float FITS, TIFF or XISF from your stacker whenever possible. An 8-bit JPEG has already lost the faint data you are trying to recover.
A linear stack looks almost black, so use the Stretch Options menu to preview it: No Stretch, 10% Bg 3 sigma, 15% Bg 3 sigma, 20% Bg 3 sigma or 30% Bg 2 sigma. The stretch is for display only and does not affect what you save. A stronger stretch makes gradients easier to judge.
If you did not crop in your stacker, use the Crop step now to trim edges.
Step 3: Choose a background extraction method
Open Background Extraction and choose an interpolation method. This choice matters more than any slider.
| Method | Needs sample points? | Best for | Watch out for |
|---|---|---|---|
| AI | No | Most images; fast first attempt | Can occasionally soften very large, faint nebulosity |
| Sample-free (new in 4.0) | No | Automatic extraction with control over scale and structure protection | Too small a scale can follow real structure |
| RBF | Yes | Precise manual control around large nebulae | Points on nebulosity get subtracted |
| Splines | Yes | Simple, smooth gradients | Less flexible with complex gradients |
| Kriging | Yes | Statistically smooth models | Slower; rarely better than RBF |
A practical approach: try AI first. If it removes faint nebulosity you know is real, try Sample-free. If both struggle, fall back to RBF with carefully placed points.
AI background extraction
Choose AI, leave smoothing low at first, and click Calculate Background. The model has been trained to recognize sky background versus astronomical structure, so it needs no sample points. Use the Background view to inspect what it removed. The background model should be smooth and featureless. If you can see the shape of your nebula in it, the method is eating signal.
Sample-free background extraction (GraXpert 4.0)
The sample-free method, contributed for the 4.0 release, models background automatically at multiple scales. Its settings and defaults:
- Scale (1-10, default 5): the size of structures treated as background. Higher values give a broader model and protect smaller structures.
- Smoothness (default 1): extra smoothing of the final model. Higher values suppress small variations but may miss rapidly changing gradients.
- Structure protection (on by default), with Threshold (default 0.05) and Amount (default 0.5): detects bright structures and excludes them from the fit. Lower thresholds protect fainter structures; Amount controls how far protection extends around them.
- Simplified model (on by default) with Polynomial degree (1-6, default 1): fits a polynomial to the large-scale gradient first, then models smaller variations. Higher degrees allow more curvature but risk following real structure.
- Downsampling (1, 2, 4 or 8; default 4, under Advanced settings): internal calculation resolution. Higher is faster but less accurate for small-scale variations.
For a frame filled with nebulosity, raise the scale and keep structure protection on. For a simple light pollution gradient on a galaxy field, the defaults usually work.
RBF, Splines and Kriging with sample points
The classic methods fit a surface through sample boxes that you place on empty sky.

- Set Points per row (4-25, default 15) and Grid Tolerance (-2 to 10, default 1.0).
- Click Create Grid. GraXpert places a grid and rejects boxes brighter than a threshold set by the tolerance. Lower tolerance rejects more boxes; higher tolerance keeps more.
- Inspect every box. Delete any that sit on nebulosity, galaxy halos or bright stars, and add boxes in empty sky by clicking. Flooded generation can add points automatically based on the brightness of a point you place.
- Set Smoothing (0-1). GraXpert’s tooltip explains the trade-off: too little smoothing can over- and undershoot between points, while too much may not follow strong gradients.
- Click Calculate Background.
For RBF, the Advanced settings offer the kernel (thin plate, quintic, cubic or linear); thin plate is the default and a good choice. Points in every corner and along every edge matter most, because extrapolation beyond the outermost points is where models go wrong.
Step 4: Choose subtraction or division
The Correction setting (Subtraction or Division) lives in the Advanced settings, and Subtraction is the default.

- Subtraction removes additive light: light pollution, moonlight, airglow. This is the right choice for almost all gradient removal.
- Division removes multiplicative effects such as vignetting. It can rescue data without flats, but proper flat frames do this job far better, because they also correct dust shadows and pixel-to-pixel differences.
Step 5: Inspect, iterate and save
Switch the display between Original, Processed and Background. A good result has:
- An even, neutral background with no bright or dark corners.
- No dark “holes” around your target, which signal over-subtraction.
- A background model with no trace of your target’s shape.
If the result is not right, change one thing at a time: move or delete sample points, raise the sample-free scale, or adjust smoothing. A second pass on an already corrected image can catch residual gradients, but stop as soon as the background is flat.
To save, choose a format under Saving: 16-bit or 32-bit TIFF, FITS or XISF. Keep 32-bit for linear data you will process further; FITS headers are preserved when you start from a FITS file. Leave Save Stretched off unless you are finished with linear processing. You can also save the background model itself, which is useful for checking what was removed.
Step 6: AI denoising (optional)
GraXpert’s Denoising step uses an AI model trained on linear data. Set Denoise Strength (0-1; 0.5 is the default) and click Denoise Image. Start around 0.3-0.6 and compare with the original at 100 percent zoom. Too much strength smears faint stars and gives a plastic look.
Denoising never replaces data. Doubling the signal-to-noise ratio takes four times the integration time, as explained in our article on astrophotography exposure time, and walking noise or fixed-pattern noise should be solved at capture with dithering, as described in our guide to walking noise.
Using GraXpert from Siril
Siril 1.4 provides a Python script, GraXpert-AI.py, that runs GraXpert’s AI models from inside Siril. Install it from the Scripts menu (Get Scripts), then set the path to your GraXpert program under Preferences, Miscellaneous. Siril’s documentation notes that the script offers AI background extraction (smoothing and subtraction or division) and AI denoising, but not GraXpert’s classic RBF, Splines or Kriging methods, since Siril already has its own RBF background extraction. A copy of GraXpert is still needed to download the model files.
This makes a fully free workflow possible: stack in Siril, run GraXpert-AI for the background, color calibrate and stretch in Siril. Our narrowband imaging guide covers how to handle each channel when you work with mono data.
Command-line use
GraXpert also runs from a terminal, which is handy for batches. A background extraction call looks like this:
GraXpert -cli -cmd background-extraction stacked.fits -output stacked_bge -correction Subtraction -smoothing 0.1 -bg
The executable name and path differ by platform, so adjust the first word for your installation.
Useful options in 4.0:
-interpolationchooses AI, RBF, Kriging, Splines or sample_free (AI by default). The classic methods need a preferences file with saved grid points.-sample_free_scale,-sample_free_smoothnessand the other-sample_free_options override the sample-free settings.-cmd denoisingwith-strengthruns AI denoising;-batch_size(1-32, default 4) controls how many tiles run in parallel, and higher values can run out of memory.-gpu falsedisables GPU acceleration if a graphics driver causes problems.
Run the program with -h to see the full list for your version.
Troubleshooting common GraXpert problems
- Faint nebulosity disappears. The model is following the target. With AI, compare with Sample-free at a higher scale; with RBF, delete points on or near the nebula.
- Dark rings around bright objects. Over-subtraction near the target. Remove nearby sample points or increase smoothing.
- Color blotches in the background. Usually too many or too few points, or a low smoothing value. Increase smoothing slightly and make sure points are spread evenly.
- Gradient remains in the corners. Add points close to the edges and corners, or crop off stacking edges first.
- AI is very slow or crashes. Lower the batch size for denoising, check GPU drivers or disable GPU acceleration.
- Background looks fine but stars have halos. That is not a gradient; check for dew or reflections. Our astrophotography troubleshooting hub covers those causes.
If your gradients are severe every night, address the source as well: a dual-band filter for emission targets, shooting when the target is higher, and good flats. Our Bortle scale guide explains how sky brightness shapes your data, and processing works best on a computer with enough memory; a fast external drive such as a Samsung T7 portable SSD keeps large stacks and GraXpert outputs manageable.
Frequently asked questions
Yes. GraXpert is free, open-source software for Windows, macOS and Linux. It downloads its AI models on first use, so you need an internet connection the first time you run each model.
Try AI first because it is fast and needs no sample points. If it removes faint nebulosity you know is real, try the Sample-free method added in GraXpert 4.0, or use RBF with sample points placed only on empty sky.
Before. Background extraction works best on linear stacked data, after cropping and before color calibration and stretching. The stretch options in GraXpert only change the preview, not the saved image.
Use Subtraction for light pollution, moonlight and airglow, which add light to your image. Division corrects multiplicative effects like vignetting, but flat frames are the proper fix for those.
No. AI deconvolution appeared in the GraXpert 3.1 release candidates, but version 4.0 disables it in both the interface and the command line. Background extraction and AI denoising remain available.
Yes. Siril 1.4 offers the GraXpert-AI.py script, installed from the Scripts menu. Point Siril to your GraXpert program in Preferences, Miscellaneous, and you can run AI background extraction and denoising without leaving Siril.