CLI: Command Line Interface - setiastro/setiastrosuitepro GitHub Wiki
Seti Astro Suite Pro includes a full command-line interface (CLI) for running Cosmic Clarity tools without launching the GUI.
This is ideal for:
- Batch processing
- Automation
- Headless workflows
There are two ways users may be running Seti Astro Suite Pro:
-
Installed Python package (via
pip/ Poetry) -
Frozen application (PyInstaller build:
.exe,.app, Linux binary)
The commands available depend on which one theyβre using.
When installed via pip or Poetry, the following commands are available:
setiastrosuitepro- Launches the GUI by default
- Can also dispatch to CLI tools
cosmicclarity- Direct access to Cosmic Clarity processing
- Recommended for scripting and automation
saspro-export-requirements
saspro-write-build-info
saspro-prime-matplotlib-cacheIn a frozen build, you typically do not have the cosmicclarity command available system-wide.
Instead, you run the CLI via the application executable and the dispatcher:
From a Command Prompt or PowerShell in the folder containing the EXE:
.\setiastrosuitepro.exe cc --helpOr, if itβs installed somewhere like C:\Program Files\...:
"C:\Program Files\SetiAstroSuitePro\setiastrosuitepro.exe" cc --helpThe executable lives inside the app bundle:
/Applications/Seti\ Astro\ Suite\ Pro.app/Contents/MacOS/setiastrosuitepro cc --helpTip: you can make a convenience alias:
alias setiastrosuitepro="/Applications/Seti Astro Suite Pro.app/Contents/MacOS/setiastrosuitepro"
setiastrosuitepro cc --helpIf the binary is in your current directory:
./setiastrosuitepro cc --helpOr if itβs installed on your PATH:
setiastrosuitepro cc --helpβ Summary: Frozen builds use:
setiastrosuitepro cc <command> [options]Seti Astro Suite Pro can launch the GUI and automatically open one or more files by passing file paths as arguments.
This works for:
- pip/Poetry installs
- Frozen builds (Windows/macOS/Linux)
-
Development / venv (
python -m setiastro.saspro ...)
setiastrosuitepro "C:\Users\Gaming\Downloads\my_image.fits"Open multiple files:
setiastrosuitepro "C:\path\img1.fits" "C:\path\img2.tif".\setiastrosuitepro.exe "C:\Users\Gaming\Downloads\my_image.fits"/Applications/Seti\ Astro\ Suite\ Pro.app/Contents/MacOS/setiastrosuitepro "/Users/me/Downloads/my_image.fits"(Optional alias)
alias setiastrosuitepro="/Applications/Seti Astro Suite Pro.app/Contents/MacOS/setiastrosuitepro"
setiastrosuitepro "/Users/me/Downloads/my_image.fits"./setiastrosuitepro "/home/me/data/my_image.fits"- File arguments launch the GUI (not the Cosmic Clarity headless CLI).
- Files must be valid existing paths (typos will be ignored/skipped).
- You can still use Cosmic Clarity headless mode via:
setiastrosuitepro cc <command> [options]Cosmic Clarity supports five processing modes:
-
sharpenβ Sharpen only -
denoiseβ Denoise only -
bothβ Sharpen followed by denoise -
superresβ AI super-resolution -
satelliteβ Satellite trail removal
cosmicclarity --helpcosmicclarity sharpen --help
cosmicclarity denoise --help
cosmicclarity both --help
cosmicclarity superres --help
cosmicclarity satellite --helpsetiastrosuitepro cc --helpThis behaves the same as cosmicclarity.
Examples:
setiastrosuitepro cc sharpen --help
setiastrosuitepro cc denoise --help
setiastrosuitepro cc both --help
setiastrosuitepro cc superres --help
setiastrosuitepro cc satellite --helppython -m setiastro.saspro cc --helpEvery Cosmic Clarity command supports:
-
-i,--inputβ Input image path (required) -
-o,--outputβ Output image path (required) -
--gpu/--no-gpuβ Enable or disable GPU acceleration
Most Cosmic Clarity commands also support tiled processing controls:
-
--chunk-sizeβ Tile size for chunked inference Default:256 -
--overlapβ Tile overlap in pixels to reduce seams Default:64
-
Larger
--chunk-sizeis generally faster, but uses more VRAM/RAM -
Larger
--overlapcan reduce seams, but increases processing cost -
Typical values:
--chunk-size 256 --overlap 64--chunk-size 384 --overlap 96--chunk-size 512 --overlap 128
Sharpen, Denoise, and Both support temporary stretch controls for processing very linear images:
-
--temp-stretch/--no-temp-stretchβ Force temporary stretch before processing -
--target-medianβ Target median used for the temporary stretch Default:0.25
Use this when processing very dark linear images where the AI models benefit from a temporary stretch before sharpening or denoising.
Example:
cosmicclarity sharpen \
-i linear_input.fits \
-o sharpened_output.fits \
--temp-stretch \
--target-median 0.25Sharpen, Denoise, and Both can optionally run Aberration Remover first:
-
--aberration-first/--no-aberration-firstβ Run Aberration Remover before Cosmic Clarity processing
This is useful when you want to clean up color fringing or optical aberration before sharpening or denoising.
Example:
cosmicclarity both \
-i input.tif \
-o output.tif \
--aberration-first \
--temp-stretch \
--target-median 0.25cosmicclarity sharpen \
-i input.tif \
-o output.tif \
--gpu \
--chunk-size 256 \
--overlap 64 \
--aberration-first \
--temp-stretch \
--target-median 0.25 \
--sharpening-mode "Both" \
--stellar-amount 0.5 \
--nonstellar-amount 0.5 \
--nonstellar-psf 3.0 \
--auto-psfSharpen options:
-
--sharpening-modeBothStellar OnlyNon-Stellar Only
-
--stellar-amount(0β1) -
--nonstellar-amount(0β1) -
--nonstellar-psf -
--auto-psf/--no-auto-psf -
--sharpen-channels-separately -
--chunk-size -
--overlap -
--aberration-first/--no-aberration-first -
--temp-stretch/--no-temp-stretch -
--target-median
cosmicclarity denoise \
-i input.tif \
-o output.tif \
--gpu \
--chunk-size 256 \
--overlap 64 \
--aberration-first \
--temp-stretch \
--target-median 0.25 \
--denoise-luma 0.5 \
--denoise-color 0.5 \
--denoise-mode fullDenoise options:
-
--denoise-luma -
--denoise-color -
--denoise-modefullluminance
-
--separate-channels -
--chunk-size -
--overlap -
--aberration-first/--no-aberration-first -
--temp-stretch/--no-temp-stretch -
--target-median
cosmicclarity both \
-i input.tif \
-o output.tif \
--gpu \
--chunk-size 256 \
--overlap 64 \
--aberration-first \
--temp-stretch \
--target-median 0.25 \
--sharpening-mode "Both" \
--stellar-amount 0.5 \
--nonstellar-amount 0.5 \
--nonstellar-psf 3.0 \
--auto-psf \
--denoise-luma 0.5 \
--denoise-color 0.5 \
--denoise-mode fullOptions include:
- All Sharpen options
- All Denoise options
--chunk-size--overlap-
--aberration-first/--no-aberration-first -
--temp-stretch/--no-temp-stretch --target-median
cosmicclarity superres \
-i input.tif \
-o output.tif \
--chunk-size 256 \
--overlap 64 \
--scale 2Options:
-
--scale(2, 3, or 4) --chunk-size--overlap
cosmicclarity satellite \
-i input.tif \
-o output.tif \
--chunk-size 256 \
--overlap 64 \
--mode full \
--clip-trail \
--sensitivity 0.10Options:
-
--mode(fullorluminance) -
--clip-trail/--no-clip-trail --sensitivity--chunk-size--overlap
Batch processing allows you to apply Cosmic Clarity to many images automatically without launching the GUI. This is ideal for large datasets, mosaics, overnight runs, or scripted pipelines.
Process all TIFF files in a folder using Sharpen + Denoise:
Get-ChildItem *.tif | ForEach-Object {
$out = $_.BaseName + "_cc.tif"
.\setiastrosuitepro.exe cc both `
-i $_.FullName `
-o $out `
--gpu `
--chunk-size 256 `
--overlap 64 `
--aberration-first `
--temp-stretch `
--target-median 0.25 `
--sharpening-mode "Both" `
--stellar-amount 0.5 `
--nonstellar-amount 0.5 `
--denoise-luma 0.5 `
--denoise-color 0.5
}Disable GPU (CPU-only batch):
Get-ChildItem *.fits | ForEach-Object {
$out = $_.BaseName + "_denoise.fits"
.\setiastrosuitepro.exe cc denoise `
-i $_.FullName `
-o $out `
--no-gpu `
--chunk-size 256 `
--overlap 64 `
--denoise-luma 0.4 `
--denoise-color 0.4
}Process all TIFF files in the current directory:
for f in *.tif; do
base="${f%.*}"
setiastrosuitepro cc both \
-i "$f" \
-o "${base}_cc.tif" \
--gpu \
--chunk-size 256 \
--overlap 64 \
--aberration-first \
--temp-stretch \
--target-median 0.25 \
--sharpening-mode "Both" \
--stellar-amount 0.5 \
--nonstellar-amount 0.5 \
--denoise-luma 0.5 \
--denoise-color 0.5
doneCPU-only denoise pass:
for f in *.fits; do
base="${f%.*}"
setiastrosuitepro cc denoise \
-i "$f" \
-o "${base}_dn.fits" \
--no-gpu \
--chunk-size 256 \
--overlap 64 \
--denoise-luma 0.4 \
--denoise-color 0.4
doneProcess all TIFF files recursively, preserving directory structure (Linux/macOS):
find . -name "*.tif" | while read f; do
out="${f%.tif}_cc.tif"
mkdir -p "$(dirname "$out")"
setiastrosuitepro cc both \
-i "$f" \
-o "$out" \
--gpu \
--chunk-size 256 \
--overlap 64
doneUpscale all images by 2Γ:
for f in *.tif; do
base="${f%.*}"
setiastrosuitepro cc superres \
-i "$f" \
-o "${base}_sr2x.tif" \
--chunk-size 256 \
--overlap 64 \
--scale 2
donefor f in *.fits; do
base="${f%.*}"
setiastrosuitepro cc satellite \
-i "$f" \
-o "${base}_satclean.fits" \
--chunk-size 256 \
--overlap 64 \
--mode full \
--clip-trail \
--sensitivity 0.10
doneDuring batch runs, progress is printed as:
PROGRESS: 0%
PROGRESS: 25%
PROGRESS: 50%
PROGRESS: 75%
PROGRESS: 100%
To capture logs to a file:
Windows (PowerShell)
.\setiastrosuitepro.exe cc both -i in.tif -o out.tif *> process.logmacOS / Linux
setiastrosuitepro cc both -i in.tif -o out.tif > process.log 2>&1-
GPU acceleration is enabled by default (
--gpu) -
Use
--no-gpufor:- headless servers
- machines without CUDA / DirectML
- stability testing
-
Output format is inferred from filename extension
-
Metadata and WCS headers are preserved when possible
-
Mono images remain mono after processing
-
For very large images, increasing
--chunk-sizecan improve speed if enough VRAM is available -
If seams appear, increase
--overlap
- TIFF (
.tif,.tiff) - FITS (
.fits,.fit) - PNG / JPEG (8-bit output)
- XISF
The output format is inferred automatically from the output filename extension.
- GPU acceleration is used automatically when available
- Progress is printed as
PROGRESS: 0β100% - Mono images remain mono after processing
- Headers and WCS metadata are preserved when possible
- Temporary stretch options are available for sharpen and denoise workflows on linear data
- Aberration Remover can optionally be run first for sharpen, denoise, and both workflows