v1.0.0-rc.166 (#76)
Build Packages / Unit tests (push) Successful in 1h22m15s
Build Packages / build:windows:nocuda (push) Successful in 18m0s
Build Packages / build:windows:cuda (push) Successful in 20m30s
Build Packages / build:viewer-tgz:cpu (push) Successful in 10m32s
Build Packages / build:viewer-tgz:cuda (push) Successful in 11m39s
Build Packages / build:rugnux-tgz (x86_64) (push) Successful in 8m55s
Build Packages / build:rugnux:windows (push) Successful in 11m25s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 20m6s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 16m27s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 20m19s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 15m34s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 20m25s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 19m36s
Build Packages / build:rpm (rocky8) (push) Successful in 17m43s
Build Packages / build:rpm (rocky9) (push) Successful in 13m34s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 21m28s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 18m19s
Build Packages / DIALS test (push) Successful in 12m36s
Build Packages / XDS test (durin plugin) (push) Successful in 6m56s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 6m48s
Build Packages / XDS test (neggia plugin) (push) Successful in 6m7s
Build Packages / Generate python client (push) Successful in 11s
Build Packages / Build documentation (push) Successful in 36s
Build Packages / Create release (push) Skipped
Build Packages / build:rugnux:aarch64 (cross) (push) Successful in 5m11s

* `rugnux --mode calibration` writes `<prefix>.json` beside the `.poni`, whose `dataset_settings` member is a `jfjoch_broker` `dataset_settings` body as it stands.
* `rugnux` and `jfjoch_viewer` read PILATUS miniCBF sweeps natively, without conversion.
* Masters written by other facilities open, including Eiger 1.x and third-party NXmx variants.
* `rugnux` measures the beam centre on every run, and indexes with it when the file's value indexes nothing.
* A detector swung out on a 2theta arm is placed where the file says it stands, and the calibration can hold the tilt fixed.
* `rugnux` writes the unmerged MTZ by default, and a P1 merge beside it, so a wrong space group can be re-merged without reprocessing.
* Significant improvements to symmetry handling in `rugnux`: the lattice, the point group, the setting and the systematic absences.
* The `rugnux` report gives the resolution the CC1/2 fit reached, beside the range the reflections were written to.
* The `rugnux` report gives the twinning statistics measured before the space group was decided, beside the ones measured after.
* The `rugnux` report gives the strong-direction diffraction limit, and warns when CC1/2 is not monotone with resolution.
* `rugnux` ranks screw axes on the evidence their absences carry, rather than on how many control reflections a candidate happens to have.
* Twinning is no longer reported when the L-test contradicts it.
* The `rugnux` report gives the detector tilt, the measured tilt and the direct beam beside the beam centre, and a post-refined beam centre is judged against the run's own measurement rather than the file's.
* `--no-refine-tilt` holds the detector tilt at the value in the file, instead of zeroing it, when the calibration starts from the spots.
* The `jfjoch_viewer` grid scan view draws the cells in the proportion of the scan steps, so the map has the shape of the scanned area.

Reviewed-on: #76
Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
This commit was merged in pull request #76.
This commit is contained in:
2026-09-02 21:17:31 +02:00
committed by leonarski_f
parent 511be0c366
commit 680c36c20d
383 changed files with 20910 additions and 3936 deletions
+93
View File
@@ -533,3 +533,96 @@ TEST_CASE("GridScanSettings GetYContainer_m", "[GridScanSettings][container]") {
REQUIRE(y_neg[4] == Catch::Approx(0.0));
REQUIRE(y_neg[5] == Catch::Approx(0.0));
}
namespace {
struct SnakeCase {
const char *name;
float fast_step_um;
float slow_step_um;
int64_t n_slow;
// Expected (fast, slow) element position, one entry per image, in acquisition order.
std::vector<std::pair<int64_t, int64_t>> expected;
};
}
// A snake reverses the stage on alternate rows in acquisition order, so an image's fast position
// cannot depend on how many rows the scan ended up having. Every case below is listed for an even
// and an odd row count for exactly that reason: the fast column of the two must agree image by
// image (the slow column does not, because a negative slow step measures from the last row).
TEST_CASE("GridScanSettings snake raster with negative steps", "[GridScanSettings]") {
constexpr int64_t n_fast = 3;
const std::vector<SnakeCase> cases = {
{"fast +, slow +, 2 rows", 1.5f, 2.5f, 2,
{{0, 0}, {1, 0}, {2, 0}, {2, 1}, {1, 1}, {0, 1}}},
{"fast +, slow +, 3 rows", 1.5f, 2.5f, 3,
{{0, 0}, {1, 0}, {2, 0}, {2, 1}, {1, 1}, {0, 1}, {0, 2}, {1, 2}, {2, 2}}},
{"fast +, slow -, 2 rows", 1.5f, -2.5f, 2,
{{0, 1}, {1, 1}, {2, 1}, {2, 0}, {1, 0}, {0, 0}}},
{"fast +, slow -, 3 rows", 1.5f, -2.5f, 3,
{{0, 2}, {1, 2}, {2, 2}, {2, 1}, {1, 1}, {0, 1}, {0, 0}, {1, 0}, {2, 0}}},
{"fast -, slow +, 2 rows", -1.5f, 2.5f, 2,
{{2, 0}, {1, 0}, {0, 0}, {0, 1}, {1, 1}, {2, 1}}},
{"fast -, slow +, 3 rows", -1.5f, 2.5f, 3,
{{2, 0}, {1, 0}, {0, 0}, {0, 1}, {1, 1}, {2, 1}, {2, 2}, {1, 2}, {0, 2}}},
{"fast -, slow -, 2 rows", -1.5f, -2.5f, 2,
{{2, 1}, {1, 1}, {0, 1}, {0, 0}, {1, 0}, {2, 0}}},
{"fast -, slow -, 3 rows", -1.5f, -2.5f, 3,
{{2, 2}, {1, 2}, {0, 2}, {0, 1}, {1, 1}, {2, 1}, {2, 0}, {1, 0}, {0, 0}}},
};
for (const auto &c : cases) {
for (bool vertical : {false, true}) {
INFO(c.name << (vertical ? ", vertical" : ", horizontal"));
GridScanSettings grid(n_fast,
vertical ? c.slow_step_um : c.fast_step_um,
vertical ? c.fast_step_um : c.slow_step_um,
true, vertical);
grid.ImageNum(n_fast * c.n_slow);
REQUIRE(grid.GetNSlow() == c.n_slow);
for (size_t i = 0; i < c.expected.size(); i++) {
const auto image = static_cast<int64_t>(i);
const int64_t fast = vertical ? grid.GetElementPosY_step(image)
: grid.GetElementPosX_step(image);
const int64_t slow = vertical ? grid.GetElementPosX_step(image)
: grid.GetElementPosY_step(image);
INFO("image " << i);
CHECK(fast == c.expected[i].first);
CHECK(slow == c.expected[i].second);
}
}
}
}
// The same configuration seen through the two consumers of the element positions: the NXmx
// transformation containers and the scan-result rearrangement.
TEST_CASE("GridScanSettings snake with negative slow step, even row count", "[GridScanSettings][container][rearrange]") {
GridScanSettings grid(3, 1.0f, -10.0f, true, false);
grid.ImageNum(6); // 2 rows of 3
const auto x_m = grid.GetXContainer_m(6);
const std::vector<double> x_expected = {0.0e-6, 1.0e-6, 2.0e-6, 2.0e-6, 1.0e-6, 0.0e-6};
for (size_t i = 0; i < x_expected.size(); i++) {
INFO("image " << i);
CHECK(x_m[i] == Catch::Approx(x_expected[i]));
}
const auto y_m = grid.GetYContainer_m(6);
const std::vector<double> y_expected = {10.0e-6, 10.0e-6, 10.0e-6, 0.0, 0.0, 0.0};
for (size_t i = 0; i < y_expected.size(); i++) {
INFO("image " << i);
CHECK(y_m[i] == Catch::Approx(y_expected[i]));
}
// Last row acquired is the top row of the grid, and it was acquired right-to-left.
const std::vector<float> input = {0, 1, 2, 3, 4, 5};
const std::vector<float> output = grid.Rearrange(input);
const std::vector<float> rearranged_expected = {5, 4, 3, 0, 1, 2};
REQUIRE(output.size() == rearranged_expected.size());
for (size_t i = 0; i < rearranged_expected.size(); i++) {
INFO("element " << i);
CHECK(output[i] == Catch::Approx(rearranged_expected[i]));
}
}