Export for Stacking

Turn reviewed lights into a clean stacking input without moving or changing the source files. Export one project or target from Overview, download a ZIP in a browser, or use the CLI for repeatable batch exports.

Export
Accepted lights in; rejects always out

Every mode uses the same selection and WBPP-style folder layout.

Start in Overview ↓

Choose an export mode

WhereResultBest for
Desktop appLocal folder, hardlinked when possibleFast export on the grading machine with little extra disk use
BrowserStreaming ZIP downloadRemote servers and NAS installs
CLILocal folder, copy or hardlinkAutomation, filters, dry runs, and repeat exports
HTTP APIStreaming ZIP or server-local folderCustom tools and scheduled jobs

What PSF Guard exports

GradeDefaultOptional
AcceptedExportedCan be scoped by project, target, or filter
PendingSkippedAdd with --include-pending or the API option
RejectedNever exportedCannot be enabled

Export reads the grade and FITS basename from the active catalog, then resolves the file through that catalog's configured image folders. It does not change grades, edit FITS files, or move anything out of the source library.

PSF Guard currently exports light frames only. Add flats, darks, and bias frames to the stacking job separately.

Output layout

Desktop, browser, CLI, and API exports all use the same tree:

destination/
├── California Nebula/
│   └── LIGHT/
│       ├── HA/
│       │   ├── frame-001.fits
│       │   └── frame-002.fits
│       └── OIII/
│           └── frame-003.fits
└── Flaming Star/
    └── LIGHT/
        └── SII/
            └── frame-004.fits

PixInsight WBPP and Siril can group this <target>/LIGHT/<filter>/ layout directly. PSF Guard keeps each source basename. If two selected files would land at the same path, later names gain a numeric suffix instead of overwriting the first.

Export from Overview

  1. Finish grading the frames you want to stack.
  2. Return to Overview and expand the project.
  3. Choose ⬇ Export on the project to export all its accepted targets, or on one target to narrow the result.
  4. In the desktop app, choose a destination folder. In a browser, save the ZIP download.
Overview project card with accepted and rejected counts and the Export action
Export a whole project from its expanded Overview card.

The action appears only when that project or target has at least one accepted frame and PSF Guard has found its image files. If it is missing, check the accepted count and refresh file discovery in Settings.

Desktop app

The desktop app places files straight into the chosen folder. It tries a hardlink first, which is instant and uses no extra data blocks when source and destination share a filesystem. If the link cannot be made, PSF Guard copies the file. A summary reports linked, copied, already present, missing, and failed files.

Browser or remote server

The browser action streams an uncompressed ZIP without staging a second copy on the server. FITS data is already hard to compress, so store mode avoids wasted CPU and starts the download at once. The ZIP endpoint reads files only; it cannot write to an arbitrary path on the server.

Export from the CLI

# Preview the plan, then copy accepted lights
psf-guard export my-db --dest ./stacking --dry-run
psf-guard export my-db --dest ./stacking

# One target and filter; hardlink when possible
psf-guard export my-db --dest ./stacking \
  --target "California Nebula" --filter HA --link

# Include ungraded frames as well as Accepted
psf-guard export my-db --dest ./stacking --include-pending

# A raw SQLite path needs its image search roots
psf-guard export schedulerdb.sqlite --dest ./stacking \
  --image-dirs /data/lights,/archive/lights
OptionEffect
--project NAMEProject-name substring match
--target NAMETarget-name substring match
--filter NAMEExact filter match, ignoring case
--include-pendingAdd Pending frames; Rejected still stay out
--linkTry hardlinks, then fall back to copying
--dry-runPrint the plan without writing files
--image-dirs DIRSComma-separated search roots for a raw database path

Repeat exports safely

Export is designed to top up a stacking folder after each session.

Export does not remove a file that you reject after an earlier export. Start with a new destination or remove that exported copy before the final stacking run.

Automate with the HTTP API

# Stream Accepted lights for one target as a ZIP
curl "http://localhost:3000/api/db/my-db/export?target_id=42" \
  --output psf-guard-export.zip

# Preview a folder export on the server's own filesystem
curl -X POST "http://localhost:3000/api/db/my-db/export/local" \
  -H "Content-Type: application/json" \
  -d '{"dest":"/data/stacking","project_id":7,"dry_run":true}'

The ZIP route is read-only. The server-local route can write arbitrary paths and therefore requires --allow-database-management. Query/body options are project_id, target_id, include_pending, and filter_name; the local route also accepts link and dry_run.

Troubleshooting

SymptomCheck
No Export actionThe scope needs an Accepted frame and a FITS file found under the configured image folders.
nothing to exportCheck the project/target/filter scope, grades, image directories, and filename metadata. Add Pending only when intended.
Hardlinks became copiesHardlinks require source and destination on the same filesystem and a filesystem that supports links.
ZIP stops or will not openA source became unreadable during streaming. Check file access, then download again.
Expected calibration frames are absentExport currently selects lights only; add calibration data in the stacking tool.