CLI: Command Line Interface - setiastro/setiastrosuitepro GitHub Wiki

Seti Astro Suite Pro β€” Command Line Interface (CLI)

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

Available CLI Entry Points

There are two ways users may be running Seti Astro Suite Pro:

  1. Installed Python package (via pip / Poetry)
  2. Frozen application (PyInstaller build: .exe, .app, Linux binary)

The commands available depend on which one they’re using.


If installed via pip / Poetry (Python package install)

When installed via pip or Poetry, the following commands are available:

Main Application

setiastrosuitepro
  • Launches the GUI by default
  • Can also dispatch to CLI tools

Cosmic Clarity CLI

cosmicclarity
  • Direct access to Cosmic Clarity processing
  • Recommended for scripting and automation

Utility Commands

saspro-export-requirements
saspro-write-build-info
saspro-prime-matplotlib-cache

If running the Frozen Application (Windows / macOS / Linux)

In 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:

Windows (PyInstaller .exe)

From a Command Prompt or PowerShell in the folder containing the EXE:

.\setiastrosuitepro.exe cc --help

Or, if it’s installed somewhere like C:\Program Files\...:

"C:\Program Files\SetiAstroSuitePro\setiastrosuitepro.exe" cc --help

macOS (.app bundle)

The executable lives inside the app bundle:

/Applications/Seti\ Astro\ Suite\ Pro.app/Contents/MacOS/setiastrosuitepro cc --help

Tip: you can make a convenience alias:

alias setiastrosuitepro="/Applications/Seti Astro Suite Pro.app/Contents/MacOS/setiastrosuitepro"
setiastrosuitepro cc --help

Linux (binary)

If the binary is in your current directory:

./setiastrosuitepro cc --help

Or if it’s installed on your PATH:

setiastrosuitepro cc --help

βœ… Summary: Frozen builds use:

setiastrosuitepro cc <command> [options]

Opening Files Directly from the Command Line (Launch GUI + Auto-Open)

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 ...)

Examples

Windows (pip install)

setiastrosuitepro "C:\Users\Gaming\Downloads\my_image.fits"

Open multiple files:

setiastrosuitepro "C:\path\img1.fits" "C:\path\img2.tif"

Windows (frozen .exe)

.\setiastrosuitepro.exe "C:\Users\Gaming\Downloads\my_image.fits"

macOS (.app bundle)

/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"

Linux (binary)

./setiastrosuitepro "/home/me/data/my_image.fits"

Notes

  • 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]

Running Cosmic Clarity from the CLI

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

How to Invoke Cosmic Clarity

Method 1 (Recommended): cosmicclarity (Python installs only)

cosmicclarity --help
cosmicclarity sharpen --help
cosmicclarity denoise --help
cosmicclarity both --help
cosmicclarity superres --help
cosmicclarity satellite --help

Method 2: via Seti Astro Suite Pro dispatcher (works for Python installs AND frozen apps)

setiastrosuitepro cc --help

This 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 --help

Method 3: Python module (development / venv)

python -m setiastro.saspro cc --help

Common Options (All Commands)

Every 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

Chunking Notes

  • Larger --chunk-size is generally faster, but uses more VRAM/RAM

  • Larger --overlap can reduce seams, but increases processing cost

  • Typical values:

    • --chunk-size 256 --overlap 64
    • --chunk-size 384 --overlap 96
    • --chunk-size 512 --overlap 128

Temporary Stretch Options

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

When to use --temp-stretch

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.25

Aberration Removal Option

Sharpen, 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.25

Sharpen

cosmicclarity 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-psf

Sharpen options:

  • --sharpening-mode

    • Both
    • Stellar Only
    • Non-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


Denoise

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 full

Denoise options:

  • --denoise-luma

  • --denoise-color

  • --denoise-mode

    • full
    • luminance
  • --separate-channels

  • --chunk-size

  • --overlap

  • --aberration-first / --no-aberration-first

  • --temp-stretch / --no-temp-stretch

  • --target-median


Sharpen + Denoise (Both)

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 full

Options include:

  • All Sharpen options
  • All Denoise options
  • --chunk-size
  • --overlap
  • --aberration-first / --no-aberration-first
  • --temp-stretch / --no-temp-stretch
  • --target-median

Super Resolution

cosmicclarity superres \
  -i input.tif \
  -o output.tif \
  --chunk-size 256 \
  --overlap 64 \
  --scale 2

Options:

  • --scale (2, 3, or 4)
  • --chunk-size
  • --overlap

Satellite Trail Removal

cosmicclarity satellite \
  -i input.tif \
  -o output.tif \
  --chunk-size 256 \
  --overlap 64 \
  --mode full \
  --clip-trail \
  --sensitivity 0.10

Options:

  • --mode (full or luminance)
  • --clip-trail / --no-clip-trail
  • --sensitivity
  • --chunk-size
  • --overlap

Batch Processing Examples

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.


Windows (PowerShell)

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
}

macOS / Linux (Bash)

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
done

CPU-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
done

Recursive Batch Processing (Subfolders)

Process 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
done

Super Resolution Batch

Upscale 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
done

Satellite Trail Removal Batch

for 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
done

Progress and Logging

During 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.log

macOS / Linux

setiastrosuitepro cc both -i in.tif -o out.tif > process.log 2>&1

Notes for Large Batches

  • GPU acceleration is enabled by default (--gpu)

  • Use --no-gpu for:

    • 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-size can improve speed if enough VRAM is available

  • If seams appear, increase --overlap


Supported Input / Output Formats

  • TIFF (.tif, .tiff)
  • FITS (.fits, .fit)
  • PNG / JPEG (8-bit output)
  • XISF

The output format is inferred automatically from the output filename extension.


Notes

  • 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



⚠️ **GitHub.com Fallback** ⚠️