Skip to content

feat: add centralized reciprocal-space reconstruction (GUI, CLI, cluster batch) - #69

Merged
tifuchs merged 7 commits into
masterfrom
reciprocal_maps
Aug 4, 2026
Merged

feat: add centralized reciprocal-space reconstruction (GUI, CLI, cluster batch)#69
tifuchs merged 7 commits into
masterfrom
reciprocal_maps

Conversation

@tifuchs

@tifuchs tifuchs commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a native, out-of-core reciprocal-space reconstruction pipeline (orgui/datautils/xrayutils/reconstruction.py + C++ kernel) that maps detector images directly into HKL/Q grids without materializing a full 3D array in memory.
  • Add ReconstructionDialog — a GUI workflow (Experiment / Output grids / Performance / Cluster / Job-and-output / Preview tabs) to configure, preview, prepare, run, and resume reconstruction jobs, plus a shared HDF5SettingsDialog for output chunking/compression.
  • Add SGE and Slurm cluster batch-array support (reconstruction_cluster.py) with parallel submap reduction, and a reconstruction_cli.py entry point for headless/scripted runs.
  • Add doc/source/reciprocal_space_reconstruction.rst, wired into the docs toctree, plus doc/AGENTS.md describing the changelog/doc-sync workflow and a new automated doc-sync GitHub Action.

Docs / known gaps

  • The new user guide is thorough and covers essentially every control in the dialog (verified tab-by-tab against the diff).
  • Gap: QScanSelector's new "Normalize by exposure time" / "Monitor corrections" fields live in the shared options panel (used by all scan workflows) but are currently only consumed by the reconstruction pipeline, not documented anywhere, and not mentioned as reconstruction-only in image_integration.rst. Recommend a follow-up doc note (or scoping the fields to the reconstruction dialog) before release.
  • Gap: No CHANGELOG.md [Unreleased] entry for this feature yet.

tifuchs and others added 5 commits July 27, 2026 01:27
- add a C++17 reciprocal-space kernel for deterministic HKL and Q mapping
  with adaptive pixel and exposure-footprint subdivision
- propagate pixel variances through weighted voxel accumulation while
  preserving source-pixel correlations and recording marginal-variance limits
- add parallel image loading, correction, tiling, native mapping, and
  byte-bounded in-memory accumulation
- implement immutable Parquet map partitions, bounded external reduction,
  resumable manifests, checksums, and one-write-per-chunk HDF5 finalization
- freeze detector calibration, crystal, UB, scan references, corrections,
  exclusions, masks, backgrounds, and repair data from authoritative orGUI state
- add exact and fallback exposure-angle bounds for supported scan backends
  and serializable references for regular, sliced, interlaced, manual,
  simulated, and external-backend scans
- add a reusable native pixel-repair plan with interpolation variance
  propagation for constant detector masks
- add the reciprocal-space reconstruction dialog with grid coverage,
  editable intervals, file-size estimates, geometry-matched Jacobian steps,
  HDF5 settings, performance controls, preview, run, and resume workflows
- add shared global HDF5 chunk settings and an optional reconstruction
  compression override using the central filter registry
- add orGUI rsmap and orGUI-rsmap run, resume, and status commands that consume
  UI-prepared job descriptors
- write standalone NeXus-style HDF5 results with axes, intensity, variance,
  weight, contributors, configuration, build metadata, and provenance
- register completed files as external orGUI results without copying large
  reconstructed arrays into the active database
- add focused numerical, variance, geometry, correction, determinism,
  storage, CLI, dialog, resume, and native-kernel regression tests
- add mapping, alignment, storage, and reducer benchmarks
- document the complete reconstruction workflow, every user and job parameter,
  scientific equations, storage architecture, CLI usage, and practical tuning
Add a minimal CLAUDE.md that imports AGENTS.md so Claude Code picks up
the existing guidance tree. Extend the AGENTS.md files to cover code
that had grown outside their scope: the top-level reconstruction
pipeline, orgui/backend/, and the xrayutils cpp/ native kernels, plus
refresh stale file/test lists (reconstruction.py, ReconstructionDialog.py,
test_reconstruction* suite).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@tifuchs

tifuchs commented Aug 1, 2026

Copy link
Copy Markdown
Owner Author

ToDo: before merge: settings for normalization in the integration tab should be moved to the RS map dialog.

Other option: Provide a normalization API for the backend, (deterministic or with variance).
Then enable a global normalization option.

This would break the existing output of all integrations. The raw output would then only be available through reconstruction of the normalized outputs.

@tifuchs

tifuchs commented Aug 4, 2026

Copy link
Copy Markdown
Owner Author

Normalization in the integration tab is moved to the RS map dialog.

Normalization rework is now opened as issue #70

@tifuchs
tifuchs merged commit d2421e1 into master Aug 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant