Add FITS folders and plan the project

Start from plain FITS folders, build a Target Scheduler-compatible catalog, review the projects and plans PSF Guard derives from the headers, then add costly quality evidence in the background.

From FITS
Use this path for a FITS-only archive or missing frames

Import reads headers first and leaves quality work for later.

Create a catalog ↓

Create a catalog from images

The desktop app always allows database changes. For the web server, bind to a trusted interface and opt in:

psf-guard server --host 127.0.0.1 --allow-database-management

Open Settings → New Database from Images, add one or more absolute image directories, and choose Create & Import. Invalid paths stay in the form and the error names the missing directory.

New Database from Images form with header-only import and optional background quality analysis
The first pass reads FITS headers only. Quality analysis stays off by default and can run later.

The UI puts the SQLite file in databases/ beside PSF Guard's registry and shows the exact path on the database card. Reused names get a numeric suffix. The CLI creates the file at the path you give it:

CLI / NAS
Automate the same import

Use create-db for a new archive or import to add frames.

CLI reference →
psf-guard create-db ./archive.sqlite /data/lights /data/more-lights \
  --name "Archive"

Use --dry-run to preview a CLI import without keeping the new file, or --no-register to keep it out of the shared registry.

What PSF Guard derives

PSF Guard writes a full Target Scheduler-compatible schema. This inherited mapping lets it open an existing Scheduler database, but Target Scheduler is not required. Imported frames begin as Pending. Header data becomes projects, targets, shared exposure templates, exposure plans, and acquired-image rows:

B, G, HA, L, OIII, R, and SII exposure templates for a real narrowband project
A real narrowband plan shows the same fields import fills: filter, default exposure, capture settings, and scheduling limits.
Target coordinates and seven derived exposure plans for Golf of Mexico
Coordinates and filter plans remain editable from Overview → Plan & coordinates.
Header import does not plate-solve folders or treat the FITS object name as pixel proof. Run quality analysis later to add fresh star measurements, photometry, spatial screening, and solved pointing evidence.

Import more frames

Choose Import on a configured database. PSF Guard first shows a dry preview. It skips basenames already present, attaches new frames to an existing target by object name or coordinates within 0.5 degrees, and creates new structure only for unmatched frames. Confirm the preview to write it.

psf-guard import archive ./new-lights --dry-run
psf-guard import archive ./new-lights

The settings page reads job state from the server when it opens. Closing or reloading the page does not hide a running import; the progress view resumes. One import can run per database.

Backfill quality later

Each database card has two low-priority actions:

Settings showing Analyze Missing Quality and Rescan All Quality on a configured database
Use Analyze Missing Quality after a header-only import. Rescan All Quality is the explicit full refresh.

The job works one target at a time, reports progress, and yields to interactive preview or scan work. The N.I.N.A. Fast detector supplies star count and HFR, so new measurements stay comparable with Target Scheduler. Full-star data also feeds flux-based photometry; the pass adds spatial cloud and obstruction metrics plus fresh pointing evidence. A server restart stops the in-memory job, but the persistent cache lets the next run skip completed work.

Review and edit the plan

Open Overview → Plan & coordinates to inspect project state and limits, target name and coordinates, rotation, ROI, shared templates, and filter plans. With database management enabled, edit those fields, add a plan, or correct imported project and target grouping.

Sync with the telescope

Two DBs
Sync only when grading and capture use separate database files

Preview each change before applying it.

Sync workflow →

Add both databases in Settings, then use Data Transfer. Every action requires a dry preview before Apply:

Data Transfer workspace with named source and destination catalogs
Choose a direction and action, then review the server-owned preview before Apply becomes available.
psf-guard sync pull --from telescope.sqlite --to archive.sqlite --dry-run
psf-guard sync planning --from archive.sqlite --to telescope.sqlite --dry-run
psf-guard sync grades --from archive.sqlite --to telescope.sqlite --dry-run
Back up both databases before the first write. Keep the named directions: pull captures to the grading copy, then push planning and grades to the telescope.