* `rugnux --model` reports CC(model, data) - the correlation of the merged intensities with the placed, scaled model - by resolution shell, on the same shells as CC1/2, with the reflection count and a significance for each. * `rugnux --model` fits the model's scale, anisotropic B and bulk-solvent parameters on the working reflections only, so the R-free it reports is measured against a model no free reflection helped scale. * The bulk-solvent parameters of `rugnux --model` are searched over their physically meaningful range instead of being fitted without bounds, so a model is never scaled with a solvent term that has silently switched itself off. * The rigid-body placement of `rugnux --model` uses the same bounded bulk solvent as the reported fit, so a model is no longer placed against a target carrying a solvent term with no physical meaning. * `rugnux --model` puts the model into the data's own description of the lattice before placing it, so a model whose cell is written on other axes - I-centred where the run indexed C-centred, a different unique axis, a permuted orthorhombic cell - is placed rather than scored where it was read; `MODEL_CHANGE_OF_BASIS=` and `MODEL_SETTING_AS_READ=` report it when it happens. * The rugnux results report opens with a summary - `VERDICT=` (`OK`, `WARNINGS`, `UNUSABLE`, `FAILED`), `VERDICT_TEXT=`, `PATHOLOGY_FLAGS=` with one closed-vocabulary code per condition that warned, and the `WARNING:` lines, which used to close the file - and the sections after it are renumbered 1-5 with no gaps. * `rugnux --developer` writes the full results report - the pipeline-internal keys and the long explanations the default report now leaves out - and `--finalist-ledger` adds the evidence for every space group the search considered, not only the one it adopted. * The results report warns when the merged data carry no usable signal and when too little of reciprocal space was measured inside the fitted resolution, and omits `FITTED_RESOLUTION` where the CC1/2 curve it is fitted on never falls off. * rugnux detects translational pseudo-symmetry and reports it under the `PSEUDO_TRANSLATION` flag as `TNCS_DETECTED=` and the `TNCS_*` keys - a translation the merged data are exactly invariant under is reported as `UNDECLARED_LATTICE_TRANSLATION=` under `LATTICE_TRANSLATION` instead - and a detected pseudo-translation can no longer buy a false screw axis in the space-group search or hide a twin from the L-test (`L_TEST_VS_TNCS=`). * The space-group search determines glide planes from zonal systematic absences, so a non-Sohncke space group such as P 2_1/c or Pbca is named where the run previously stopped at its Sohncke subgroup; `SOHNCKE_SPACE_GROUP=` carries the best Sohncke group beside it on every run that searched, and a centre of symmetry is never claimed. * Where the cell metric carries more rotational symmetry than the Bravais class the indexer named, the extra rotations are put to the intensities and the space-group search is asked again on the metric's own cell - adopted only where the intensities confirm the higher symmetry - so a lattice that is nearly but not exactly hexagonal, or whose reduction landed in a sub-cell, still reaches its true point group. * Systematic-absence calls rest on the evidence rather than on counts: a screw axis whose absent class the data show extinct is no longer refused because a handful of reflections in it read as present, and `SPACE_GROUP_ALTERNATIVES=` no longer drops a candidate that differs only on a zone the sweep never measured. * A reference correlation measured on too few reflections is refused instead of scored zero, so a run given a reference MTZ is no longer reindexed on an operator that mapped almost everything outside the reference's coverage. * A frame counts as indexed from 6 spots on its lattice rather than 9, so a weakly diffracting crystal whose frames cannot carry 9 is no longer refused the lattice it fits; `--min-indexed-spots` overrides it. * `-C` accepts a known cell in any equivalent description - conventional or primitive, centred or not - instead of only the reduced primitive form, so a centred cell given the way it is published no longer makes the run report that it found no lattice. * Each reflection is corrected for the sensor's quantum efficiency at the angle it meets the detector (attenuation lengths from the NIST tables, which also fixes the spot-width parallax term on CdTe) and for the attenuation of the flight path between the sample and its pixel; `--flight-path air|helium|vacuum` declares the medium - default air, since no file states it - and the report says what was assumed and what it was worth. The unmerged MTZ records the factors in new `QE` and `FLIGHT` columns beside `LP`, so raw counts are `I / LP * QE * FLIGHT`, and `_process.h5` in new optional `qe` and `flight` datasets. * Rotation geometry post-refinement fits the crystal and the detector at once, against the observed spot positions and the observed rocking angles together, so the refined distance depends far less on how wrong the file's distance was. * A coarsely sliced sweep integrates correctly: partials are joined into one rocking event by angle rather than by frame count, so two crossings of the Ewald sphere are no longer summed into one full, and at 0.5 degrees per image or coarser the per-frame geometry refinement accepts a spot whose miss the exposure's own rotation accounts for. * `rugnux --mode scale` reports the detector tilt and direct beam of the geometry it re-scaled at, instead of zeros that read as a flat detector, and no longer warns that no image was indexed on a run whose lattice came from its input file. * Every rotation run that determined a space group and merged reports what the mounting cost: `SPINDLE_LOST_UNIQUE_FRACTION=` is the fraction (0-1) of unique reflections the mounting made unmeasurable under the measured point group, also written to the master as `/entry/MX/spindleLostUniqueFraction` and what the mounting warning fires on; `SPINDLE_SYMMETRY_AXIS_ANGLE_DEG=` / `SPINDLE_SYMMETRY_AXIS_ORDER=` describe the mounting in the `--developer` report. * Stills and grid scans carry a per-image `spindle_blind_fraction` - how much of a rotation sweep's blind cone this orientation would make unrecoverable, 0.5 and above calling for a second orientation - through the CBOR stream, HDF5 (`/entry/MX/spindleBlindFraction`), the plot and scan-result APIs, and the viewer and frontend plots; an absent value means the frame could not be assessed and is not a 0. * The results report's `REPORT_VERSION` is 7. Reviewed-on: #77 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
13 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. - Opens PILATUS miniCBF rotation sweeps. These store one frame per file, so naming any frame opens the whole sweep it belongs to. A raw CBF carries the images and the geometry but no analysis results, so the spot, reflection and per-image plot panels stay empty until something is computed.
- 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. Refine detector tilt is ticked by default and fits the two tilts along with the centre and the distance; unticking it holds them where they are, for a calibration meant for a program that cannot express a tilted detector (rugnux --no-refine-tilt). It applies to both buttons and to Analyze dataset. - 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.
- The Inspector's Image features section decides what the overlay draws — spots, predictions, saturated and highest pixels, the beam stop — including whether the non-indexed spots and the spots that fall on an ice ring are drawn at all.
- 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.
- Mouse-driven navigation of the image, the grid scan and the plots — see Mouse shortcuts below, which the viewer also shows under Help ▸ Mouse Shortcuts.
- Help shows the mouse shortcuts, the acknowledgements and the third-party licenses.
- 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.
The CUDA build needs an NVIDIA driver on the host but no CUDA toolkit — 525.60.13 or newer for
the CUDA 12 artefacts (RHEL 8 packages, portable Linux .tgz), 580.65.06 or newer on Linux and an
R580 driver on Windows for the CUDA 13 ones (RHEL 9, Ubuntu, Windows installer). The Windows
installer and the .tgz are CUDA 13 and CUDA 12 respectively, which also decides the oldest GPU
they run on — a V100 needs the CUDA 12 .tgz. See
Release contents ▸ GPU generations and the NVIDIA driver.
Mouse shortcuts
The same list is available in the application under Help ▸ Mouse Shortcuts.
Diffraction image
| Action | Effect |
|---|---|
| Wheel | Zoom in / out, centred on the cursor |
Shift + wheel |
Move the foreground (upper contrast limit) in linear steps |
Ctrl + wheel |
Move the foreground in multiplicative steps (×1.15 per notch) |
Alt + wheel |
Step through the dataset, one image per notch (up = next image) |
F held + wheel |
Same as Shift + wheel, for as long as F is held |
A |
Switch on the automatic foreground |
| Hover | Status bar shows the pixel position, its value and the resolution |
| Drag | Pan the image |
Shift + drag |
Draw a rectangular ROI |
Shift + Ctrl + drag |
Draw a circular ROI |
| Drag an ROI or its handle | Move or resize the selected ROI |
| Right click | Copy / save the image, fit to view, clear the ROI |
Some window managers take Alt-modified mouse events for themselves before the application sees
them; that is a window-manager setting, not something the viewer can take back.
Grid scan
| Action | Effect |
|---|---|
| Hover | Status bar shows the image number, the grid position and its value |
Shift + hover |
Load the image under the cursor while moving over the grid |
| Double click | Load the image under the cursor |
Other views
| Action | Effect |
|---|---|
| 2D azimuthal image: double click | Zoom the diffraction image on the corresponding detector position |
| Dataset-info plot: hover | Status bar shows the image number and the plotted value |
Dataset-info plot: Shift + hover |
Load the hovered image |
| Spot / reflection list: double click | Zoom the diffraction image on that spot or prediction |
| Image list: double click | Load that image |
| Reciprocal space: drag | Rotate the view |
| Reciprocal space: right drag | Pan the view |
| Reciprocal space: wheel | Zoom the view |
| Reciprocal space: double click | Zoom the diffraction image on the nearest spot |
| Magnifier: wheel | Zoom the magnifier; it follows the cursor on the main image |
Opening data
- File ▸ Open (
Ctrl+O) — open a local HDF5 file, or any frame of a miniCBF sweep. - 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>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 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.