GraXpert

A bridge to the external GraXpert application for AI gradient removal and denoising. SASpro hands your image to GraXpert's command-line interface, then reads the result back and applies it as an undoable step — your original header and WCS are preserved.

GraXpert is a separate, independent open-source project (graxpert.com) with its own authors and licence. SASpro does not include or reimplement it — it drives the GraXpert program you install, and the gradient-removal and denoise algorithms are entirely GraXpert's.

1. Using the tool

Choose an operation, set its one parameter, and click OK. The run is non-modal and streams GraXpert's own log into a progress window; Cancel stops it. The first time you run it, SASpro asks you to locate the GraXpert executable and remembers it afterward.

ControlWhat it does
Remove gradientRuns GraXpert's background extraction to model and remove the sky gradient.
DenoiseRuns GraXpert's AI denoiser.
Smoothing (0–1)Shown for Remove gradient (default 0.10) — how smooth/loose the background model is.
Strength (0–1)Shown for Denoise (default 0.50) — how aggressively noise is suppressed.
Denoise modelEnabled for Denoise only: Latest (auto) lets GraXpert pick, or pin a specific AI version for reproducibility.
Use GPU accelerationToggles GPU vs CPU; remembered between sessions.
Grip (bottom-left)Drag to the canvas to mint a GraXpert shortcut with the operation, parameter, model and GPU setting, or drop on an image to run it headlessly.
GraXpert must be installed separately. Point SASpro at the executable once (Preferences, or the file picker that appears on first run) and it's remembered; on macOS you can select the .app bundle and SASpro resolves the binary inside it.

2. Technical details

SASpro acts as a front-end to the GraXpert CLI: it exports your image, runs the program, and imports the result — without letting GraXpert's file header overwrite your calibration.

2.1 The round-trip

On OK, SASpro writes the active image to a temporary 32-bit float TIFF (clipped to [0,1]), runs GraXpert on it, then reads back the …_GraXpert.{fits|tif|tiff|png} output and applies it to the document. If the primary loader can't read GraXpert's output, a fallback reader recovers the pixels and normalises them to float32 [0,1].

2.2 The command

The invocation mirrors GraXpert's documented CLI — background extraction vs denoising, with the matching parameter:

GraXpert -cmd background-extraction input.tif -cli -gpu {true|false} -smoothing S GraXpert -cmd denoising input.tif -cli -gpu {true|false} -strength S [-ai_version V] [-batch_size N]

-ai_version is sent only when you pin a model (omitted for “Latest”), and -batch_size is 4 on GPU, 1 on CPU. The process runs with a cleaned environment (SASpro's bundled-Python variables are stripped) so GraXpert launches against its own runtime.

2.3 Executable resolution

2.4 Applying the result