Running rotation indexing on a sub-range (e.g. images 60-120) segfaulted: the
first pass passed the *global* image number to RotationIndexer::ProcessImage,
which indexes v_ (sized to the run's image count) -> out-of-bounds write.
- ProcessImage now takes an explicit mid-exposure angle (optional; falls back to
the goniometer at the image index), so the indexer no longer assumes its slot
index equals the goniometer image index. IndexAndRefine supplies it via
RotationAngle(), matching the angle used for prediction. Added a bounds guard in
ProcessImage so a bad index can never corrupt memory.
- JFJochProcess feeds the rotation indexer the local ordinal (not the global
index), and shifts the goniometer (start += start_image*incr, incr *= stride,
per-image wedge preserved) so local index i maps to the angle of original image
start+i*stride - fixing rotation angles for the whole sub-range pipeline
(prediction, refinement, output), not just the indexer.
- Expose "Rotation images" (number used for the first pass) in the job dialog,
enabled when rotation indexing is on. (Count > available is already clamped by
select_equally_spaced_image_ordinals.)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Styling (now via the application palette in main(), not a stylesheet, so it
applies to every widget incl. dialogs):
- Entry fields and item views (line edits, spin boxes, combos, tables) are white
when enabled and salmon (the GUI default) when disabled - so it's clear where
you can type. Panels stay salmon (Window role).
- Teal (#2a9d8f) accent via the Highlight role: selections and progress-bar chunks.
Runs list / plots:
- The original file is listed as a first "Original" run (Mode "HDF5"); double-click
any run row to show it (replaces the "Show original" button). The currently shown
run is bold (driven by snapshotsChanged).
- Fix the colour "swap" when switching runs: the primary line is matched by the
active-dataset pointer (not active_id_), so a run keeps its colour even while a
datasetLoaded/runsChanged pair is mid-flight.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Styling:
- Entry widgets (line edits, spin boxes, combos, item views) are salmon (the GUI
default) when inactive and turn white while focused/active.
- A teal accent (#2a9d8f) for selections and the QProgressBar chunk, against the
salmon background.
- Move the jobs-table Status column (the progress bar) to column 2 so it stays
visible in the narrow dock instead of scrolling off the right edge.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the ambiguous "Images" count with explicit "Start image" and "End image"
spinboxes (end 0 = to the last image). buildConfig sets config.start_image /
end_image; the table shows the range ("start-end" / "all") and the progress bar
expects end-start images.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Lower the dataset-info chart and jobs-table minimum heights (200 -> 80, table 60)
so the bottom dock area can be dragged smaller; the comfortable default size is
still set via resizeDocks.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- "Remove result" toolbar action drops a reprocessing run: reader RemoveSnapshot
(Original is protected; if the removed run was active the view falls back to
Original), worker RemoveRun, and the table row is removed.
- Opening a new file clears the jobs table (worker fileOpened -> clearJobs) to
match the reader, which already resets snapshots on ReadFile.
- Plot fixes: each run keeps a stable colour by its position (Original = blue),
so colours no longer swap when the active run changes; the current-image marker
is hidden from the legend (was the stray "[Image #N]" entry).
- The status bar shows processing rate (Hz) and estimated remaining time while a
job runs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The dataset-info plot now overlays every run as a separate named line instead of
replacing the plot when a snapshot is activated:
- Reader gains AllSnapshotDatasets() (every snapshot's dataset, Original first).
- The worker owns the run collection: a stable snapshot id plus an editable
display label (RunData), emitted as runsChanged(runs, active_id) on file open,
snapshot register, activate and rename. RenameRun(id, label) updates the legend
label without touching the reader key (decoupled id vs label).
- The chart view draws the active run as the primary series (markers, hover,
binning, axes) and the other runs as overlay lines sharing its axes, with a
legend shown when overlaying (appendSeries factored out for both).
- The dataset-info widget holds the run list + the live run, extracts the selected
metric from each (ExtractMetric), and unions the available metrics across runs.
- The live run is its own "Live" overlay (lightweight per-tick refresh, no combo
rebuild); it is cleared on finish so the persisted snapshot takes over.
- The processing jobs table gets a "Started" column and an editable Name column;
editing a name renames that run's legend label.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Convert JFJochProcessingJobsWindow from a standalone helper window into a
dockable QWidget panel (toolbar + stacked table/message), placed in the bottom
dock area and split horizontally to sit in the bottom-right corner next to the
dataset-info plots. Its show/hide toggle moves to the Window menu via the new
JFJochViewerMenu::AddDockEntry.
- When connected to a live HTTP stream the panel shows "Dataset re-processing is
currently available only in File mode" and disables the toolbar, driven by the
worker's httpConnectionChanged signal.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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>
Makes the viewer a processing frontend, not just an image viewer:
- JFJochProcessingJobsWindow (menu "Processing"): a table of processing jobs on the open
dataset. "New job" configures mode (full/azint), image count, threads, output, and (full)
rotation indexing + scale/merge, using the viewer's current processing settings. A job can
be Run locally (off the GUI thread via JFJochProcessController, with live status/progress and
Cancel) or its jfjoch_process command line copied for a cluster.
- A finished local run is registered as a reader metadata snapshot and becomes the active
dataset (bottom plots + per-image overlays follow it); "View results" / "Show original" switch
between runs - so several settings attempts on one dataset can be compared.
- JFJochImageReadingWorker gains GetReprocessingInputs() (one locked read of file + experiment +
mask + spot-finding settings, so jobs share the interactive settings) and
RegisterProcessingSnapshot/SetActiveSnapshot slots + snapshotsChanged signal over the reader's
snapshot API. Files only (not live HTTP).
First-cut / open ends: one job at a time; output lands in the working dir (FileWriter rejects
absolute prefixes); Bragg/scaling settings still use defaults until the converged settings
window lands. Viewer builds and runs (offscreen) cleanly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>