# run_config Implementation Plan > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. **Goal:** `processing/run_config.sh [SERIAL...]` writes `runs///` with the files of `data/`. **Architecture:** one script; optical imported from `$OPTICAL`; re-measurement through `reprocess_images.main`; correction through `remove_camera_movement`, per epoch by default. **Tech Stack:** uv (numpy, pandas, pillow, pyyaml, scipy, scikit-image, opencv-python-headless). **Spec:** `docs/superpowers/specs/2026-11-19-run-config-design.md` ## Global Constraints - Writes only under `runs//` (guarded); reads `data_diff/`, never `data/` except for the acceptance comparison. - Columns of `data/`'s advanced CSV, in that order: `time_utc, sensor_name, x, y, error_value, error_threshold, relative_x, relative_y, corr_x, corr_y, reproj_err, inlier, sigma0, pattern_type, peak, flux, sharpness, fwhm, dominance, snr, corr_x_mm, corr_y_mm`. - Camera CSV columns: `time_utc`, then `median_/min_/max_` of `pan, tilt, scale, rotation, sigma0`. ## Review Focus - A configuration with a typo (`error_treshold`, unknown sensor): error before any work. - An epoch where only one reference survives: translation only, no camera row (as the cloud). - A day without images in the range: no file for it. - Re-running the same configuration: the station folder replaced, other stations untouched. - optical's working tree dirty: recorded in `run.yaml`. --- ### Task 1: configuration and correction, with `--check` **Files:** Create `processing/run_config.py`. **Interfaces:** `load_config(path) -> dict`; `camera_settings(config, station, unit_props) -> dict`; `cloud_properties(sensors) -> {sid: props}`; `apply_patterns(props, overrides, images_dir) -> {sid: props}`; `correct(meas: DataFrame, props, cam) -> (advanced: DataFrame, camera: DataFrame)`. - [ ] `check()`: unknown top / station / camera / pattern key raises; unknown sensor_name raises; camera order station > common > unit > defaults; synthetic correction: three static references, a static target (corr ~0), a target above its threshold (corr empty, x kept), relative = x - pattern x, sigma0 on every row, one camera row per minute. - [ ] Implement; `--check` prints ok. ### Task 2: the run, the cloud configuration, the acceptance **Files:** Modify `processing/run_config.py` (`main`); create `processing/run_config.sh`, `configs/cloud.yaml`; modify `.gitignore` (`runs/`), `README.md`. - [ ] `main`: stations, days, patterns, `reprocess_images.main`, `correct`, per-day files, links, `run.yaml`. - [ ] `run_config.sh cloud JUNGFRAU --from 2026-10-12 --to 2026-10-17`; `data.py` reads `runs/cloud/JUNGFRAU`. - [ ] Compare with `data/JUNGFRAU`: corr_x / corr_y (all, and the rejected-reference night of 10-15), camera pose. - [ ] Docs.