# Project Summary (imagej-elphel)

## Context
- Java ImageJ 1.x plugin evolved over ~10 years; code is large and entangled due to shifting applications.
- Original target: vehicle navigation in complete darkness (DARPA “Invisible Headlights”).
- Later applications: drone‑based mine detection, long‑range drone detection, and most recently foliage penetration from a Cessna.
- Hardware is now stable: 16‑sensor LWIR camera; processing runs in batch mode with list files.

## Current workflow
- Main batch entry path: `Eyesis_Correction.runMenuCommand()` → `buildSeries()` → `TwoQuadCLT.buildSeriesTQ()` → `OpticalFlow.buildSeries()`.
- Batch inputs are `.list` files such as:
  `/media/elphel/btrfs-data/lwir16-proc/NC/lists/nc_site_32A.list`
  Example line:
  `1763232778_911052  1, -2, -1, 0, 0`  (start at scene 1, skip last 2; other params unused here)
- Scenes live under:
  `/media/elphel/btrfs-data/lwir16-proc/NC/scenes/` (timestamp folders; “_” used instead of “.”)

## Output data
- Batch processing produces many per‑reference outputs (images, XML, CSV) per 8‑second sequence.
- Calibration files of interest:
  `*-FIELD_CALIBRATION.corr-xml`
  Example:
  `/home/elphel/lwir16-proc/NC/models/1763232117-1763234145/1763232535_880101/1763232535_880101-FIELD_CALIBRATION.corr-xml`
- These contain per‑sensor azimuth/tilt/roll corrections (radians), e.g.:
  `EYESIS_DCT_AUX.extrinsic_corr_azimuth9`, `EYESIS_DCT_AUX.extrinsic_corr_roll8`, etc.

## Immediate goals
1) Scan data directories for anomalies (missing files, bad CSVs, etc.).
2) Aggregate calibration data across sequences (LY “lazy eye”):
   - Extract azimuth/tilt/roll per sensor from `*-FIELD_CALIBRATION.corr-xml`.
   - Build CSV for Calc to visualize sensor drift (notably sensors 3 and 8).
3) Prepare data for university DNN training and scene classification.
4) Generate map screenshots from GPS data (later; network/GUI dependent).

## Global LMA pause/resume note
- Current Global LMA/quarter-generation parked state and next-step backlog are documented in:
  `attic/CODEX/HOWTOs/project-details.md` under `Parked State Snapshot (2026-02-25)`.

## MCP thoughts (high‑level)
- MCP should be thin and flexible, with a small set of batch tools and a generic parameter map.
- Avoid GUI automation; use batch‑mode entry points and Properties‑based parameter IO.
- A minimal MVP is feasible: one batch command + parameter map + status/logs.

## Logging
- Added `LogTee` helper (in repo) to tee `System.out/err` to per‑scene files without changing existing printlns.

## Notes
- The code is expected to change; tooling should allow rapid iteration with minimal refactor.
