v1.0.0-rc.178 (#88)
Build Packages / Create release (push) Successful in 17s
Build Packages / build:portable:macos-arm64:nocuda (push) Successful in 4m41s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 20m49s
Build Packages / build:portable:windows-x86_64:nocuda (push) Successful in 13m6s
Build Packages / build:portable:windows-x86_64:cuda (push) Successful in 23m44s
Build Packages / build:rugnux:linux-aarch64:cuda (push) Successful in 7m28s
Build Packages / build:portable:linux-x86_64:nocuda (push) Successful in 11m50s
Build Packages / build:portable:linux-x86_64:cuda (push) Successful in 14m9s
Build Packages / build:jfjoch:rocky8:nocuda (push) Successful in 16m25s
Build Packages / build:jfjoch:ubuntu2204:nocuda (push) Successful in 15m42s
Build Packages / build:jfjoch:rocky9:nocuda (push) Successful in 20m50s
Build Packages / build:jfjoch:ubuntu2404:nocuda (push) Successful in 20m36s
Build Packages / build:jfjoch:rocky8:cuda-sls9 (push) Successful in 22m18s
Build Packages / build:jfjoch:rocky9:cuda-sls9 (push) Successful in 23m29s
Build Packages / Generate python client (push) Successful in 30s
Build Packages / Build documentation (push) Successful in 1m10s
Build Packages / build:jfjoch:rocky8:cuda (push) Successful in 21m38s
Build Packages / build:jfjoch:ubuntu2204:cuda (push) Successful in 17m8s
Build Packages / build:jfjoch:rocky9:cuda (push) Successful in 23m10s
Build Packages / build:jfjoch:ubuntu2404:cuda (push) Successful in 19m16s
Build Packages / Unit tests (push) Successful in 2h8m4s
Build Packages / Validation Battery (push) Successful in 40m53s

* Rugnux: Processes serial crystallography data from XFELs - SACLA (MPCCD), PAL-XFEL and European XFEL (CXI), LCLS (XTC) and SwissFEL Alvra (JUNGFRAU with a CrystFEL module geometry) - with several files or Jungfraujoch master files merged in one run (`rugnux *_master.h5`).
* Rugnux: Stills processing takes a known unit cell and space group as a starting point, finds the beam centre (and, with a cell, the detector distance) from the images, detects the saturation level in other facilities' files and refines the placement of individual detector panels.
* Rugnux: The stills report gives R_split and CC1/2 from frame half-sets, comparable with CrystFEL.
* jfjoch_viewer: Opens the same XFEL file formats.
* Validation: A stills battery checks Rugnux against deposited structures from SACLA, PAL-XFEL, LCLS, European XFEL and SwissFEL.
* Rugnux: More reliable convergence of rotation scaling, and live molecular replacement starts as soon as the model is uploaded.
* jfjoch_broker: Initialize clears the previous dataset's bearer tokens, image buffer and live Rugnux status, and a slow CUDA JIT cache is reported at start.

Reviewed-on: #88
Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
This commit was merged in pull request #88.
This commit is contained in:
leonarski_f authored and leonarski_f committed 2026-10-21 11:20:01 +02:00
1 parent 7ed32b899f
commit afbe844b20
320 files changed
+8900 -901

No files matched your search

+67
View File
@@ -11,6 +11,7 @@
#include "../image_analysis/scale_merge/CrystalSetting.h"
#include "../image_analysis/scale_merge/HKLKey.h"
#include "../image_analysis/scale_merge/ReindexAmbiguity.h"
#include "../image_analysis/scale_merge/SublatticeRelabel.h"
namespace {
const gemmi::SpaceGroup &SG(int number) { return *gemmi::find_spacegroup_by_number(number); }
@@ -239,3 +240,69 @@ TEST_CASE("Reindex: a near-symmetry law moves the cell with the indices", "[rein
CHECK(moved);
}
}
namespace {
// A P2(1) cell with a near-symmetry: a+c is within 1% of a, so the lattice is metrically close to
// a C-centred orthorhombic one (obliquity ~0.7 deg) without being one.
UnitCell PseudoMonoclinic() { return UnitCell{64.0f, 29.0f, 36.0f, 90.0f, 107.0f, 90.0f}; }
Coord Recip(const CrystalLattice &latt, int h, int k, int l) {
return latt.Astar() * static_cast<float>(h) + latt.Bstar() * static_cast<float>(k)
+ latt.Cstar() * static_cast<float>(l);
}
}
TEST_CASE("Reindex: an ambiguity operator of a pseudo-symmetric monoclinic cell keeps every reflection's resolution",
"[reindex]") {
const UnitCell cell = PseudoMonoclinic();
const auto laws = ReindexAmbiguityOperators(cell, SG(4));
REQUIRE_FALSE(laws.empty());
const CrystalLattice latt(cell);
for (const auto &op : laws)
for (int h = -6; h <= 6; ++h)
for (int l = -6; l <= 6; ++l) {
if (h == 0 && l == 0) continue;
// As the resolver applies it: an operator that is a near-symmetry of the metric moves an
// index to one of nearly the same length, never to a finer one.
const auto m = op.apply_to_hkl({{h, 3, l}});
const float d0 = 1.0f / Recip(latt, h, 3, l).Length();
const float d1 = 1.0f / Recip(latt, m[0], m[1], m[2]).Length();
CHECK(std::fabs(d1 - d0) / d0 < 0.03f);
}
}
TEST_CASE("Reindex: the reindexed lattice predicts every spot where it was", "[reindex]") {
const UnitCell cell = PseudoMonoclinic();
const auto laws = ReindexAmbiguityOperators(cell, SG(4));
REQUIRE_FALSE(laws.empty());
const CrystalLattice latt(cell);
for (const auto &op : laws) {
const CrystalLattice moved = ReindexLattice(latt, op);
for (int h = -4; h <= 4; ++h)
for (int k = -4; k <= 4; ++k)
for (int l = -4; l <= 4; ++l) {
const auto m = op.apply_to_hkl({{h, k, l}});
const Coord before = Recip(latt, h, k, l);
const Coord after = Recip(moved, m[0], m[1], m[2]);
CHECK((after - before).Length() < 1e-5f);
}
}
}
TEST_CASE("Sublattice: a frame on the given cell in another setting is described on the given cell's axes",
"[reindex]") {
// The given C222(1)-style cell, and the same lattice with b and c swapped (and a flipped to keep the
// basis right-handed): not close axis by axis, but the same lattice.
const UnitCell given{40.0f, 180.0f, 143.0f, 90.0f, 90.0f, 90.0f};
const UnitCell frame{40.2f, 143.4f, 180.5f, 90.0f, 90.0f, 90.0f};
IndexingSettings settings;
REQUIRE_FALSE(frame.is_close(given, settings.GetUnitCellDistTolerance(), settings.GetUnitCellAngleTolerance_deg()));
const auto on_given = CellOnReference(frame, given, settings);
REQUIRE(on_given.has_value());
CHECK(on_given->is_close(given, settings.GetUnitCellDistTolerance(), settings.GetUnitCellAngleTolerance_deg()));
CHECK(on_given->b == Catch::Approx(180.5f).epsilon(0.001));
CHECK(on_given->c == Catch::Approx(143.4f).epsilon(0.001));
// An unrelated cell is not put on it.
CHECK_FALSE(CellOnReference(UnitCell{55.0f, 66.0f, 77.0f, 90.0f, 90.0f, 90.0f}, given, settings).has_value());
}