Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ data/weather_state.json
*.fts
.idea/
*.key
*.pem
*.log
logs/
# Logs
Expand All @@ -61,9 +62,13 @@ __pycache__/
# Storage mounts — OS-level, not repo content
*.swp
tests/
!dev/tests/
!dev/tests/**
# Tests & Dev Utilities — not part of public install
*.token
utils/
!dev/utils/
!dev/utils/raid_watchdog.py
.venv/
venv/
.vscode/
Expand Down
38 changes: 34 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ It is repeatable, honest measurement.

Observation cadence follows AAVSO-style scientific needs rather than casual imaging habits.

When the photometric run is finished, SeeVar may optionally use remaining safe dark time for
secondary imaging catalogs such as Caldwell. These frames are filler products only: they are not
submitted as photometry and should be archived separately for later stacking/gallery tooling.

---

## Current Status
Expand Down Expand Up @@ -57,6 +61,7 @@ It is making the science chain more defensible and operationally safer:
- deterministic AAVSO report staging
- BAA-modified AAVSO Extended and richer CCD/CMOS test-file export
- multi-scope execution without shared-file collisions
- optional post-photometry secondary imaging queue for Caldwell/Messier-style targets

---

Expand Down Expand Up @@ -91,7 +96,11 @@ SeeVar is organized as a sovereign observing pipeline:
Processes captured frames using the `P1-P8` science chain:
ingest, calibration matching, calibration application, astrometric solve, source measurement, ensemble calibration, quality verdict, and commit/report.

4. **Oversight**
4. **Secondary Imaging**
Optional filler phase after photometry/reporting. It uses configured catalogs, respects weather,
horizon, daylight, and battery guards, and moves captured frames directly into secondary storage.

5. **Oversight**
Dashboard, logs, notifier, and ledger state remain available throughout the entire mission.

---
Expand All @@ -109,6 +118,11 @@ Confirmed device access includes:
- Focuser
- Dew-heater switch

Developer SSH access is optional but useful for diagnostics. When enabled on owned scopes,
`dev/tools/telescope/seestar_ssh_probe.py` can collect OS version, network identity,
storage status, ZWO plan state, and onboard Astrometry.net index inventory without steering
the telescope.

This means:

- no phone app required
Expand Down Expand Up @@ -136,8 +150,9 @@ Current reporting direction:
- science channel: `G`
- reporting code: `TG`
- morning triage artifact: `data/reports/postflight_summary_*.txt` and `.json`
- manual submission staging: `python3 dev/tools/stage_reports_from_summary.py`
- WebObs submit probe/upload: `python3 dev/tools/submit_aavso_webobs.py --probe-only`
- manual submission staging: `python3 dev/tools/reports/stage_reports_from_summary.py`
- WebObs submit probe/upload: `python3 dev/tools/reports/submit_aavso_webobs.py --probe-only`
- light-curve quicklooks: `python3 dev/tools/reports/lightcurve_plots.py`

### Astrometric and detector truth matter

Expand All @@ -149,6 +164,21 @@ A magnitude is only trustworthy if the pipeline can justify:

That is why postflight is now being hardened aggressively.

### Secondary imaging

Secondary imaging is enabled in `[planner]`:

```toml
secondary_catalogs = ["caldwell"]
secondary_after_photometry = true
secondary_duration_sec = 900
secondary_output_dir = ""
```

If `secondary_output_dir` is empty, output goes to `[storage].primary_dir/secondary_catalogs`.
For AstroCat or similar gallery software, run the gallery on NAS/RAID and mount this directory
read-only. Do not index `data/local_buffer`.

---

## Storage Philosophy
Expand Down Expand Up @@ -252,7 +282,7 @@ For manual cleanup of `data/horizon_mask.json`, run the local Flask editor:

```bash
cd ~/seevar
/home/ed/seevar/.venv/bin/python dev/tools/horizon_profile_editor.py \
/home/ed/seevar/.venv/bin/python dev/tools/horizon/horizon_profile_editor.py \
--host 0.0.0.0 \
--port 5060
```
Expand Down
37 changes: 37 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,38 @@ TimeoutStopSec=10s

[Install]
WantedBy=default.target
SVCEOF

cat > "$SYSTEMD_DIR/seevar-raid-watchdog.service" <<SVCEOF
[Unit]
Description=SeeVar RAID Watchdog
After=local-fs.target

[Service]
Type=oneshot
WorkingDirectory=${SEEVAR_DIR}
Environment=PYTHONPATH=${SEEVAR_DIR}
Environment=PYTHONUNBUFFERED=1
ExecStart=${PYBIN} dev/utils/raid_watchdog.py --array /dev/md0 --mountpoint /mnt/raid1 --state ${SEEVAR_DIR}/logs/raid_state.json --stop-services
StandardOutput=append:${SEEVAR_DIR}/logs/raid_watchdog.log
StandardError=append:${SEEVAR_DIR}/logs/raid_watchdog.log

TimeoutStartSec=20s
TimeoutStopSec=5s
SVCEOF

cat > "$SYSTEMD_DIR/seevar-raid-watchdog.timer" <<SVCEOF
[Unit]
Description=Run SeeVar RAID Watchdog Every 5 Minutes

[Timer]
OnBootSec=2min
OnUnitActiveSec=5min
Persistent=true
Unit=seevar-raid-watchdog.service

[Install]
WantedBy=timers.target
SVCEOF

chmod 644 "$SYSTEMD_DIR"/*.service "$SYSTEMD_DIR"/*.timer
Expand All @@ -660,6 +692,8 @@ SVCEOF
done
systemctl --user enable seevar-planner.timer
info "Enabled seevar-planner.timer"
systemctl --user enable seevar-raid-watchdog.timer
info "Enabled seevar-raid-watchdog.timer"

section "Starting services"
for service in seevar-weather seevar-orchestrator seevar-dashboard seevar-gps; do
Expand All @@ -673,6 +707,9 @@ SVCEOF
systemctl --user start seevar-planner.timer \
&& info "Started seevar-planner.timer" \
|| warn "seevar-planner.timer did not start cleanly — check: systemctl --user status seevar-planner.timer"
systemctl --user start seevar-raid-watchdog.timer \
&& info "Started seevar-raid-watchdog.timer" \
|| warn "seevar-raid-watchdog.timer did not start cleanly — check: systemctl --user status seevar-raid-watchdog.timer"

info "User services running."
}
Expand Down
28 changes: 28 additions & 0 deletions config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ auto_submit = true
sanity_enabled = true
max_mag_error = 0.5
sanity_margin_mag = 1.0
peer_sanity_enabled = true
peer_sanity_margin_mag = 0.35
peer_sanity_window_days = 120
peer_sanity_min_obs = 5
max_peak_adu = 58000.0
target_tool_api_key = ""
target_key = ""
Expand Down Expand Up @@ -101,6 +105,8 @@ simulation_mode = false
secondary_catalogs = [] # optional filler imaging catalogs: ["messier", "caldwell", "sharpless", "herschel400"]
secondary_max_targets = 0 # 0 = no cap once enabled
secondary_duration_sec = 900 # per-object imaging block for secondary catalogs
secondary_after_photometry = true # true = run filler imaging only after variable postflight/reporting
secondary_output_dir = "" # optional; default is [storage].primary_dir/secondary_catalogs

# -----------------------------------------------------------------------------
# FLIGHT — optional
Expand Down Expand Up @@ -130,6 +136,28 @@ verify_retention_sets = 40
pointing_model_enabled = true
pointing_model_max_age_hours = 12.0
frame_retry_limit = 0
prealign_before_flight = false
prealign_points = 3
prealign_exposure_sec = 5.0
prealign_timeout_sec = 600
prealign_required = true
prealign_allow_partial = false
prealign_min_alt = 35.0
prealign_max_alt = 82.0
prealign_solve_radius_deg = 20.0
prealign_solve_timeout_sec = 90
prealign_solve_downsample = 2
prealign_wide_fallback = true
prealign_wide_exposure_sec = 5.0
prealign_wide_gain = 0
prealign_wide_solve_radius_deg = 60.0

# seestar_alp is a diagnostics/API workbench by default.
# Keep production science flight on firmware Alpaca unless this is explicitly enabled.
[seestar_alp]
enabled = false
base_url = "http://127.0.0.1:5555"
mode = "diagnostic" # diagnostic | controlled

# -----------------------------------------------------------------------------
# STORAGE — required
Expand Down
Loading
Loading