Rejects & Sync

Optional tools for moving rejected files out of a stacking tree and copying grades, plans, and captures between two database files.

Two DBs
Use sync only when the telescope and grading machine have separate copies

A direct desktop connection does not need it.

Sync commands ↓

Managing rejected files

CLI
Archive files after grading

Preview with --dry-run, then restore from the recorded paths if needed.

CLI reference →

Stacking tools such as PixInsight load everything under your lights directory — including frames you've rejected. move-rejects archives rejected frames (and their sidecars: .xisf, .json, .txt) into a REJECT/ subtree so they're out of the scan path while the archive records where they came from:

# Move rejects to <image_dir>/<Project>/REJECT/... with their sidecars.
# Idempotent; every move is recorded for restore.
psf-guard move-rejects --db my-db [--dry-run]

# Changed your mind? Un-reject frames in the UI, then:
psf-guard restore-rejects --db my-db          # restores only un-rejected files
psf-guard restore-rejects --db my-db --all    # restores everything
Requires Target Scheduler plugin schema v22+ (the stable image GUID). Older databases are refused with a pointer at the legacy filter-rejected command, which still works but leaves files in the same tree.

Syncing between machines

Grade on one machine while the telescope keeps capturing on another. sync moves state between two scheduler databases — registry slugs or .sqlite paths — matching images by their stable GUID:

Data Transfer workspace with merge, planning, and reviewed-grade actions
The Settings workspace names both catalogs and requires a server-owned preview before any merge or push.
# Mirror projects, targets and captured images FROM the telescope INTO your DB.
# Your local grading is preserved; new images arrive with the telescope's grade.
psf-guard sync pull --from telescope.sqlite --to my-db --dry-run

# Push edited projects, targets, templates, plans, and rule weights.
# Telescope captures, counts, images, and grades stay unchanged.
psf-guard sync planning --from my-db --to telescope.sqlite --dry-run

# Push your grading decisions back TO the telescope (one-way, source wins).
psf-guard sync grades --from my-db --to telescope.sqlite --dry-run

Use them as a loop — pull to refresh, plan and grade locally, then push planning and grades back:

Keep the named directions. Full pull protects local reviewed grades; planning push cannot change telescope capture history; grades push changes only grading state. The Settings panel previews all three actions before Apply.
Rather than sync two SQLite files by hand, the PSF Guard Sync plugin for N.I.N.A. pushes each capture live and pulls plans and grades from inside N.I.N.A.

End-to-end workflow

# 1. Bring the night's captures over from the telescope
psf-guard sync pull --from telescope.sqlite --to my-db

# 2. Screen the night automatically, write rejections
psf-guard screen-fits /images/2026-06-30/LIGHT --regrade-db my-db

# 3. Review borderline frames in the grader UI
psf-guard server

# 4. Archive rejects out of the stacking tree
psf-guard move-rejects --db my-db

# 5. Push final grades back so the scheduler re-captures
psf-guard sync planning --from my-db --to telescope.sqlite
psf-guard sync grades --from my-db --to telescope.sqlite