This is an UNSTABLE release. It includes many experimental features, as well as many AI generated fixes. We recommend using rc.152 for production use. * **rugnux: significantly better quality of results, and faster.** A large rework of integration, scaling, merging, geometry refinement and space-group determination, together with measurements the program previously made no attempt at - the direct beam before indexing, the beam stop, the goniometer rotation scale, and the stretches of a sweep the crystal did not deliver. A rotation dataset typically gains observations at better <I/sigma> and R_meas, and every `mx` and `scale` run writes a `<prefix>_report.txt` results report modelled on XDS's `CORRECT.LP`. Many defaults moved with it: spot detection is self-calibrating, beam-stop detection and rotation geometry post-refinement are on, resolution limits default to as far as the detector reaches, and ice-ring handling engages only where the crystal is measured to have ice. * **jfjoch_viewer:** the beam-stop shadow, the detector calibration and the beam-centre measurement are reachable from "Analyze dataset"; the settings panel reports how the sample moved and how polarized the beam was; image rendering and interaction are faster. * **Performance:** bitshuffle+LZ4 images are decoded on the GPU rather than on the host, with the bitshuffle inverse fused into preprocessing so the decompressed frame is never held in device memory. * **Broker, writer, packaging and build:** image-slot lifetime and locking fixes, per-image datasets sized by the images actually written, the Debian/Ubuntu broker package renamed to `jfjoch`, and `image_analysis` compiling under MSVC again. **Breaking change to the rugnux command line:** * `--azint-only` and `--scale` are **removed**, replaced by `--mode azint` and `--mode scale`; the full pipeline is `--mode mx` and remains the default. A script passing the old flags now fails with the list of valid modes rather than silently running the wrong one. * `-t`/`--stride` is **refused on rotation data**: skipping frames cuts every reflection's rocking curve, so the combined fulls and their partiality would be measured over frames the sweep never recorded. Select a contiguous range with `-s`/`-e` instead. `--mode azint` and `--force-still` still take a stride. **Breaking changes to OpenAPI** - regenerate the client (`jfjoch-client` 1.0.0-rc.161, `frontend/src/client`) or read the affected fields as optional: * `image_scale_b` is removed from the `plot_type` enum, so a client requesting that plot now gets an error rather than a curve. * `azim_int_settings.high_q_recipA`, `spot_finding_settings.high_resolution_limit` and `spot_finding_settings.low_resolution_limit` are no longer `required`. All three mean "no limit at that end" when unset and are omitted from the response instead of carrying a placeholder value, which raises in a client generated from an rc.160-or-earlier spec. A value of 0 is still accepted and means the same thing. **Breaking changes to the stored formats** - a consumer reading these fields must treat them as optional: * The per-image image-scale B factor is no longer computed, so `/entry/MX/imageScaleBFactor` is absent from newly written HDF5 files and the corresponding key is absent from the CBOR DataMessage and END blocks. Files written by rc.160 and earlier still contain it and still open; nothing in the pipeline reads it any more. * `_reflns.jfjoch_diffrn_ISa` now carries the whole-range `1/sqrt(a*b)` that XDS's ISa denotes, and the error-model `a` and `b` are reported in XDS's convention; the strong-reflection asymptote moves to `_reflns.jfjoch_diffrn_ISa_asymptotic`. **A file written by an earlier version carries the asymptote under the plain `ISa` name.** Reviewed-on: #71 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
9.5 KiB
jfjoch_viewer
jfjoch_viewer is the interactive desktop application of Jungfraujoch. It opens diffraction
datasets, displays each image together with the analysis overlay (spots, predictions, azimuthal
integration, per-image statistics), and can follow a live data collection by syncing with a
running jfjoch_broker over its HTTP interface.
It is a standalone Qt 6 application, distributed pre-built for Linux and Windows on the Gitea release page and in the Jungfraujoch RPM/APT repositories — see Release contents for what each package contains and what it requires, and Deployment for how to install it.
Where it fits among the three analysis tools
| Tool | Mode | Driven by | Output |
|---|---|---|---|
jfjoch_broker |
Online, real-time streaming analysis on FPGA + GPU | HTTP/REST + ZeroMQ | Live results and statistics, images streamed to jfjoch_writer |
jfjoch_viewer |
Interactive, on-screen exploration | Qt desktop application | On screen; a processing job can write the same files as rugnux |
rugnux |
Offline batch processing of a stored dataset | Command-line interface | _process.h5, and .mtz/.cif/.hkl when merging |
Functionality
- Opens HDF5 files written by
jfjoch_writer(*_master.h5) and the*_process.h5files produced byrugnux. It also opens NXmx files written by DECTRIS detectors, though that path has had only limited testing. - Runs an embedded data-processing pipeline — the same analysis code as the rest of Jungfraujoch — performing spot finding, indexing and integration on the displayed image, with the result drawn over it. This interactive analysis is not written anywhere.
- Runs full processing jobs on the open dataset with Analyze dataset, on the same
rugnuxengine and off the GUI thread. The settings panel's MX / AzInt / Calib toggle decides what a run does — full analysis, azimuthal integration only, or a detector calibration — over a chosen image range, optionally writing_process.h5and the merged.mtz/.cif. A finished run becomes a selectable view of the dataset, so several processing runs can be compared against each other, and its merging statistics (or, for a calibration, its fitted geometry) open in their own window; the Processing panel lists the runs and reopens those results. The equivalentrugnuxcommand line can also be copied out to run the same job on a cluster instead. - Detector calibration against a powder standard, on the Calib page: pick the calibrant
(
LaB6,AgBh,CeO2,Si,ice, or the open dataset's own unit cell) and fit either the image on screen (Guess / Refine detector calibration) or the whole dataset (Analyze dataset, which writes a pyFAI<output prefix>.poni). The whole-dataset fit measures the rings either from the azimuthally-binned profile summed over the run (Rings, the default) or from the pooled spot lists (Spots), and reports PONI x/y, the two tilts and the distance against the header values. Judge it by the radial rms, not the beam-centre sigma: the sigma shrinks with the number of ring points, so a fit that sits a couple of pixels off every ring can still report a small one. Rings needs the run to be integrated in azimuthal sectors — with the AzInt page's Azimuthal bins below 4 the calibration run raises it to 32, asrugnux --mode calibrationdoes, and says so. - Settings panel for the geometry, unit cell, spot finding, indexing, azimuthal integration, Bragg integration, scaling, powder calibration and a reference dataset — the same settings the CLI takes.
- Auxiliary windows: image list, dataset metadata, spot list, reflection list, reciprocal-space viewer, 2D azimuthal-integration image, calibration-image viewer and a magnifier; plus the Inspector (per-image statistics, image features, resolution rings, ROI statistics), the Image strip thumbnail feed and dataset-info charts.
- User-mask editing: build a user mask interactively, load one from TIFF (replacing or adding to the current one), save it as TIFF, clear it, or upload it to a connected server.
- Layout presets (View ▸ Image layout / Processing layout / Reset layout) rearrange the docks for looking at images or at processing results.
Hardware
As with the rest of Jungfraujoch, serious performance requires an NVIDIA GPU. On systems with a
GPU, use the CUDA build (a separate package variant everywhere: RPM/APT repository, .tgz and
Windows installer) for the embedded indexing and integration; the non-CUDA build runs the same
pipeline on the CPU at much lower throughput. The CUDA build also runs on a machine without a GPU —
see Release contents ▸ CUDA and non-CUDA builds.
Opening data
- File ▸ Open (
Ctrl+O) — open a local HDF5 file. - File ▸ Open HTTP (
Ctrl+H) — connect to ajfjoch_brokerHTTP endpoint to follow a live collection. The dialog defaults to hostlocalhostand port8080; these defaults can be overridden with the environment variablesJUNGFRAUJOCH_HTTP_HOSTandJUNGFRAUJOCH_HTTP_PORT. - Command line —
jfjoch_viewer <file.h5>opens a file (or anhttp://host:portURL) on start-up.--dbus <true|false>(-d) enables or disables the D-Bus interface (default: enabled);--helpand--versionbehave as usual.
D-Bus interface
When enabled, the viewer registers the D-Bus interface ch.psi.jfjoch_viewer, so other processes
can drive it:
LoadFile(filename, image_number=0, summation=1)— open a file (or anhttp://host:portURL) and display the given image.LoadImage(image_number, summation=1)— navigate to an image in the already-open dataset.
summation sums that many consecutive images before display.
Building from source on Windows
jfjoch_viewer is the one Jungfraujoch component that is cross-platform: it builds on Windows 11
with MSVC and the full CUDA GPU path. (The rest of Jungfraujoch — broker, receiver, FPGA host — is
Linux-only.) A pre-built installer is published with every release, so building from source is only
needed to develop or to change the build options. On Windows the build is automatically restricted
to the viewer and the libraries it needs (JFJOCH_VIEWER_ONLY is forced on), and the remaining
dependencies are fetched and built automatically (the first configure needs network access).
Verified toolchain — the same one the released installer is built with:
- Windows 11
- Visual Studio 2026 with the C++ (MSVC) toolset — required; CUDA on Windows builds through MSVC
- CUDA Toolkit 13.3 (12.8 or newer is required) — for the GPU indexing/integration path
- Qt 6.11 for MSVC (
msvc2022_64), including the Qt Charts module — e.g.C:\Qt\6.11.1\msvc2022_64 - CMake plus Ninja. The CMake that ships with Visual Studio is the simplest choice and works out of
the box — it comes with the C++ workload, so there is nothing extra to install. Any recent
standalone CMake (from cmake.org, or the one bundled with Qt in
C:\Qt\Tools\CMake_64) works too. - zlib and Eigen — the two libraries not auto-fetched on Windows. Build/install both into one prefix
(here
C:\deps) and point CMake at it::: static zlib git clone --branch v1.3.1 https://github.com/madler/zlib cmake -G Ninja -S zlib -B zlib-build -DCMAKE_INSTALL_PREFIX=C:/deps cmake --build zlib-build --target install :: Eigen 3.4 (header-only) -- install just the headers with `cmake --install`; the BLAS/LAPACK/test :: targets are disabled since they are not needed (and fail to build under MSVC). Use the 3.4 series: :: the project requests find_package(Eigen3 3.4), which Eigen's same-major rule rejects for 5.x. git clone --branch 3.4.0 https://gitlab.com/libeigen/eigen.git cmake -G Ninja -S eigen -B eigen-build -DCMAKE_INSTALL_PREFIX=C:/deps ^ -DEIGEN_BUILD_BLAS=OFF -DEIGEN_BUILD_LAPACK=OFF -DEIGEN_BUILD_DOC=OFF -DBUILD_TESTING=OFF cmake --install eigen-build - Optional: NSIS to build the
.exeinstaller.
Configure and build from an x64 Native Tools Command Prompt for VS 2026 (so cl, nvcc and
ninja are on PATH):
cmake -G Ninja -B build-win -DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_PREFIX_PATH="C:/deps;C:/Qt/6.11.1/msvc2022_64"
cmake --build build-win --target jfjoch_viewer
Notes:
CMAKE_PREFIX_PATH(theC:/depsprefix plus Qt) is the only required flag — CMake finds zlib and Eigen from the prefix, so no separate-DZLIB_ROOTis needed.- The CUDA toolchain is located automatically from the
CUDA_PATHenvironment variable that the CUDA installer sets (or fromnvcconPATH). Pass-DCMAKE_CUDA_COMPILER=".../bin/nvcc.exe"only ifnvccis installed in a nonstandard location and is not found. - For a machine without an NVIDIA GPU, add
-DJFJOCH_USE_CUDA=OFF: the viewer then runs the same pipeline on the CPU (FFTW indexer) at lower throughput.
To produce a self-contained installer (bundles the Qt runtime via windeployqt, the analysis CLIs,
and — on the CUDA build — the cuFFT runtime DLL, so the target host needs neither Qt nor a CUDA
toolkit), with NSIS installed:
cd build-win
cpack
The NSIS generator is selected automatically on Windows (no -G needed). What comes out, and how
the CUDA and CPU variants are named and told apart, is described in
Release contents ▸ Windows installer.