v1.0.0-rc.173 (#83)
Build Packages / Create release (push) Successful in 24s
Build Packages / build:viewer:macos-arm64:nocuda (push) Successful in 3m29s
Build Packages / build:rugnux:macos-arm64:nocuda (push) Successful in 2m43s
Build Packages / build:rugnux:linux-aarch64:cuda (push) Successful in 8m27s
Build Packages / build:rugnux:linux-x86_64:cuda (push) Successful in 9m53s
Build Packages / build:viewer:linux-x86_64:nocuda (push) Successful in 9m58s
Build Packages / build:viewer:linux-x86_64:cuda (push) Successful in 11m22s
Build Packages / build:jfjoch:rocky8:nocuda (push) Successful in 13m39s
Build Packages / build:viewer:windows-x86_64:nocuda (push) Successful in 18m37s
Build Packages / build:jfjoch:rocky9:nocuda (push) Successful in 16m32s
Build Packages / build:viewer:windows-x86_64:cuda (push) Successful in 24m11s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 25m30s
Build Packages / build:jfjoch:ubuntu2404:nocuda (push) Successful in 19m3s
Build Packages / build:jfjoch:ubuntu2204:nocuda (push) Successful in 20m23s
Build Packages / build:jfjoch:rocky8:cuda-sls9 (push) Successful in 19m41s
Build Packages / Generate python client (push) Successful in 50s
Build Packages / Build documentation (push) Successful in 1m16s
Build Packages / build:jfjoch:rocky9:cuda-sls9 (push) Successful in 21m0s
Build Packages / build:jfjoch:rocky8:cuda (push) Successful in 18m38s
Build Packages / build:rugnux:windows-x86_64:cuda (push) Successful in 14m33s
Build Packages / build:jfjoch:rocky9:cuda (push) Successful in 17m55s
Build Packages / build:jfjoch:ubuntu2204:cuda (push) Successful in 20m50s
Build Packages / build:jfjoch:ubuntu2404:cuda (push) Successful in 18m38s
Build Packages / Unit tests (push) Successful in 1h46m14s

* jfjoch_broker: Optional per-dataset authentication - statistics, images and plots can require a bearer token, which jfjoch_viewer supports.
* jfjoch_viewer: Dark mode and a theme-matched colour scheme, a magnifier panel, and simpler contrast and background controls.
* Rugnux: Multiple performance improvements on GPU and CPU (CPU-only processing up to 40% faster, faster image decoding on ARM), with unchanged results.
* Rugnux: `--model` rigid-body refinement runs on the GPU, and the model-validation check is faster and more reliable.
* Rugnux: Improved scaling and merging - error model, outlier rejection, absorption correction and French-Wilson amplitudes now agree more closely with XDS and ctruncate.
* Rugnux: Improved integration - radial background on powder and ice rings, crowded rotation data keep their reflections, and CPU-only builds integrate large unit cells as GPU builds do.
* Rugnux: More robust detector geometry - measured beam centre, X-ray bandwidth and goniometer rate, and geometry refinement accepted only on significant evidence.
* Rugnux: Merged files are written in the standard setting, or in the setting of a reference MTZ, structure-factor mmCIF or model, with its free-R flags.
* Rugnux: Richer report - ice and powder rings, further lattices, superstructure candidates and mosaicity, with warnings worded as prompts to check.
* Rugnux: Clear error messages when a data set needs more GPU or host memory than is available.

Reviewed-on: #83
Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
This commit was merged in pull request #83.
This commit is contained in:
leonarski_f authored and leonarski_f committed 2026-09-29 15:57:32 +02:00
1 parent 6dfe065365
commit 84228bf8be
452 files changed
+23762 -3779

No files matched your search

+18 -22
View File
@@ -8,10 +8,8 @@
#include <cstring>
#include <filesystem>
#include <array>
#include <future>
#include <map>
#include <optional>
#include <thread>
#include <tuple>
#include "../common/JFJochException.h"
@@ -237,13 +235,20 @@ void JFJochCBFReader::ReadFiles(const std::string &path) {
detector.PixelSize_um(static_cast<int64_t>(std::lround(header0_.pixel_x_m * 1e6)));
detector.SensorThickness_um(static_cast<int64_t>(std::lround(header0_.thickness_m * 1e6)));
detector.SensorMaterial(header0_.material);
// Only when the header states one. Count_cutoff defaults to 0 and SaturationLimitFromValue(0) is
// 1, so an absent line marked EVERY pixel at or above one count as saturated - the integration
// accept gate then drops the whole reflection and the run comes out empty for a reason nothing
// reports. Left unset, DiffractionExperiment::GetSaturationLimit() falls back to the container's
// own overflow, which is the safe direction: it can only fail to call a pixel saturated.
// Only when the header states one. An absent line reads as zero, and a limit of zero would mark
// EVERY pixel saturated - the integration accept gate then drops the whole reflection and the run
// comes out empty for a reason nothing reports. Left unset, DiffractionExperiment::
// GetSaturationLimit() falls back to the container's own overflow, which is the safe direction:
// it can only fail to call a pixel saturated.
// The count-rate correction CLIPS an over-range pixel to Count_cutoff rather than marking it
// (Trueb et al. (2015) J. Synchrotron Rad. 22, 701-707), so the cutoff is a value a pixel can
// hold and the limit is exclusive - unlike NXmx's saturation_value, which is the last VALID
// count. Three of the miniCBF sets in the corpus carry such a clipped pixel in every frame, in
// flat background, hundreds of times the next-highest count. XDS and DIALS read this field as
// the last valid count and so pass those pixels through; imgCIF's own overload item agrees with
// us that the valid values are the ones below it.
if (header0_.count_cutoff > 0)
detector.SaturationLimit(SaturationLimitFromValue(header0_.count_cutoff));
detector.SaturationLimit(header0_.count_cutoff);
else
Logger("CBFReader").Warning("{} states no Count_cutoff, so no pixel will be called "
"saturated; if this detector overloads, its strongest "
@@ -292,20 +297,11 @@ void JFJochCBFReader::ReadFiles(const std::string &path) {
// sweep of several thousand frames this is seconds of startup before a single image is read, and
// the files are independent.
std::vector<sweep::Frame> frames(files_.size());
{
const size_t nthreads = std::min<size_t>(std::max(1u, std::thread::hardware_concurrency()), 8);
std::vector<std::future<void>> futures;
for (size_t t = 0; t < nthreads; t++)
futures.push_back(std::async(std::launch::async, [&, t] {
for (size_t i = t; i < files_.size(); i += nthreads) {
const auto h = minicbf::ReadHeader(files_[i]);
frames[i] = {files_[i], h.start_angle_deg, h.angle_increment_deg, h.distance_m,
h.beam_x_px, h.beam_y_px, h.wavelength_A};
}
}));
for (auto &f : futures)
f.get();
}
sweep::ForEachInOrder(files_.size(), [&](size_t i) {
const auto h = minicbf::ReadHeader(files_[i]);
frames[i] = {files_[i], h.start_angle_deg, h.angle_increment_deg, h.distance_m,
h.beam_x_px, h.beam_y_px, h.wavelength_A};
});
// The sweep the headers describe, which is not always the files laid out end to end: a deposited
// series can be missing frames, and those are gaps in the rotation rather than images to close up.