Export for Stacking

You can compile reviewed light frames and their matching calibration frames into a structured directory for stacking without modifying or moving your source files. You can export projects or targets from the Overview page, download them as a ZIP archive, run background exports on a remote server, or use the CLI for automated batch operations.

Export
The system includes accepted lights and always excludes rejected frames.

You can select either a target-grouped directory structure or a PixInsight WBPP-compatible layout.

You can begin the export from the Overview page ↓

You can select from several export modes.

WhereResultBest for
Desktop appLocal folder, hardlinked when possibleFast export on the grading machine with little extra disk use
BrowserStreaming ZIP, or a background server export when a destination is configuredRemote 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

The system exports accepted files based on their grades.

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 image basename from the active catalog, then resolves the file through that catalog's configured image folders. It does not change grades, edit image files, or move anything out of the source library.

PSF Guard adds the raw bias, dark, dark-flat, and flat frames safely matched to each selected light. The same hard camera, sensor, capture, filter, and optical gates used by stack previews decide what is safe. See Calibration Libraries.

The system offers two different directory layouts.

Every export surface offers two trees. Grouped by target remains the default and works naturally with Siril and manual processing:

destination/
├── BIAS/
├── DARK/300s_G100/
├── DARKFLAT/2s_G100/
└── California Nebula/
    ├── FLAT/HA/
    └── LIGHT/HA/

Flats stay under the target whose lights selected them. Two targets can need different dust maps for the same filter, and merging those frames would build the wrong master.

WBPP uses the frame-type roots expected by PixInsight WeightedBatchPreprocessing:

destination/
├── bias/G100/
├── darks/300s_G100/
├── flats/California Nebula/HA/
└── lights/California Nebula/HA/

Dark flats live in darks/ because WBPP pairs them to flats by exposure rather than using a separate frame type. A WBPP export also includes run-wbpp.sh and run-wbpp.cmd. They start PixInsight's WBPP 3.x command-line handoff in loadOnly mode, leaving the dialog open so you can inspect grouping and references before starting the full run. Remove that one line from the script when the same reviewed export should run automatically.

WBPP writes progress to its own console and logs, not the launching terminal. Results land below wbpp-out/master and wbpp-out/calibrated; inspect wbpp-out/logs/*.log for the final status.

PSF Guard keeps each source basename in either tree. If two selected files would land at the same path, later names gain a numeric suffix instead of overwriting the first.

You can perform exports directly from the Overview page.

  1. Finish grading the frames you want to stack.
  2. Return to Overview and expand the project.
  3. Choose Grouped by target or WBPP from the page's Export layout control.
  4. Choose ⬇ Export on the project to export all its accepted targets, or on one target to narrow the result.
  5. In the desktop app, choose a destination folder. In a browser, save the ZIP or let the configured server export run in the background.
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.

The desktop app performs local exports.

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.

The browser or remote server performs streaming or background exports.

Without a server destination, the browser streams an uncompressed ZIP. Image data is already hard to compress, so store mode avoids wasted CPU and starts the download at once.

For a NAS or headless host, set an absolute Server export directory under Settings → Databases → Edit, or set export_dir in the registry entry. The Overview Export action will then start a background job for that catalog. The UI shows planning and file progress. PSF Guard creates a validated subfolder for the selected project or target. It uses reflinks when the filesystem supports them and copies the files otherwise. A WBPP export creates its runner after the files are ready.

After an administrator configures this directory, exports may write only inside it. These exports do not need the broader database-management permission. The browser cannot choose another server path.

You can run exports from the command-line interface.

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

# Build the PixInsight WBPP tree and generated handoff scripts
psf-guard export my-db --dest ./stacking --layout wbpp

# 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
--layout grouped|wbppChoose the default target-grouped tree or PixInsight WBPP roots and scripts
--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

You can repeat exports without duplicating files or overwriting changes.

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.

You can automate export operations using the HTTP API.

# Stream one target and its calibration frames as a WBPP ZIP
curl "http://localhost:3000/api/db/my-db/export?target_id=42&layout=wbpp" \
  --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,"layout":"wbpp","dry_run":true}'

# Start and poll an export below the configured server directory
curl -X POST "http://localhost:3000/api/db/my-db/export/server" \
  -H "Content-Type: application/json" \
  -d '{"project_id":7,"layout":"wbpp","subdirectory":"project-7"}'
curl "http://localhost:3000/api/db/my-db/export/server"

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, filter_name, and layout; the local route also accepts link and dry_run. The configured server route accepts the same selection and layout fields. It also accepts one validated subdirectory name. It cannot write outside the configured export_dir.

Use this troubleshooting table to resolve export issues.

SymptomCheck
No Export actionThe scope needs an Accepted frame and an image file found under the configured image folders.
nothing to exportYou should verify the project, target, filter scope, grades, image directories, and filename metadata. You should add Pending frames 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 absentYou should open the calibration library and compare the matching fields, as the system only exports frames that safely match the selected light frames.

More projects from theatr.us