Commit Graph

3 Commits

Author SHA1 Message Date
leonarski_f b9f8c2b675 reader/viewer: snapshot image->original map; subset runs register and overlay
Foundation for a dataset (snapshot or, later, the main file) being a subset of the
truly collected images:
- JFJochReaderDataset gains source_image_number (image index -> original image
  number; empty = identity).
- HDF5MetadataSource reads /entry/detector/number into that map and an inverse
  (original -> local) map; FillPerImage / ReadSpots translate the requested global
  image to this source's local index via ToLocalIndex (return nothing if the image
  is not covered), so partial snapshots are correct and never read out of bounds.
- RegisterSnapshot now accepts a snapshot with fewer images than the dataset
  (only rejects more), so sub-range / strided reprocessing runs register.
- The dataset-info plot draws each run at its original image numbers (x map from
  source_image_number), so a subset run lands at the right place on the shared
  axis. The live run's map is filled from msg.original_number.

This makes the foundation ready for strided / filtered selections (e.g. reprocess
only images with >N spots) without restricting to a min-max sub-range.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 14:59:23 +02:00
leonarski_f 940b7e34d4 viewer: indexing algorithm/refinement radio groups, rotation fix, live job plots
Processing settings:
- Split the spot/index settings widget into two tabs (Spot finding | Indexing)
  via TakeSpotFindingPage()/TakeIndexingPage().
- Indexing tab now exposes the indexing algorithm (Auto/FFBIDX/FFT/FFTW/None) and
  geometry refinement (None/Orientation/Beam center/Pixel refine) as radio groups
  with short explanations.
- Fix: UpdateSpotFindingSettings dropped algorithm + geometry-refinement when
  copying into indexing_settings (the geom checkbox was a no-op); both now flow
  into jobs via curr_experiment.

Processing jobs window:
- Rotation indexing from the job dialog now also sets RotationIndexing(true) on
  the experiment's IndexingSettings; otherwise IndexAndRefine builds no rotation
  indexer and the two-pass pre-pass throws.
- Status cell shows a QProgressBar with "<done> / <expected>".
- Live results: JFJochProcessController::OnImageProcessed accumulates per-image
  results into a JFJochReaderDataset and emits it throttled (~4 Hz) as liveDataset,
  forwarded to the dataset-info plots so they update while a job runs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 08:30:49 +02:00
leonarski_f 800ffecd20 process/viewer: command-line generator + JFJochProcessController (GUI engine)
Foundation for making processing a first-class GUI activity:

- process/JFJochProcessCommandLine: reconstruct the equivalent jfjoch_process / jfjoch_azint
  command line from a ProcessConfig + DiffractionExperiment + input path, for handing a job
  off to a cluster. Unit-tested (full + azint).
- viewer/JFJochProcessController: runs one JFJochProcess job off the GUI thread (its own private
  reader; HDF5 access is globally serialized so it is safe next to the interactive reader) and
  reports back via queued Qt signals (started/phaseChanged/progress/finished/failed). Cancel()
  forwards to JFJochProcess::Cancel(). Progress is throttled to ~200 updates per run.

The visible processing UI (jobs window + snapshot switcher + converged settings) builds on this.

Verified: tests/jfjoch_test [process]; jfjoch_viewer links and builds against JFJochProcess.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 14:26:48 +02:00