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
+86
View File
@@ -17,6 +17,8 @@ TEST_CASE("CBORSerialize_Start", "[CBOR]") {
.detector_distance = 0.0005,
.beam_center_x = 456.6,
.beam_center_y = 124.3,
.direct_beam_x = 461.2,
.direct_beam_y = 129.9,
.number_of_images = 34567,
.image_size_x = 456,
.image_size_y = 457,
@@ -26,6 +28,8 @@ TEST_CASE("CBORSerialize_Start", "[CBOR]") {
.countrate_correction_enabled = true,
.incident_energy = 12400,
.incident_wavelength = 0.988,
.beam_size_x = 8e-5,
.beam_size_y = 3e-5,
.frame_time = 0.0001,
.count_time = 0.000098,
.saturation_value = 65534,
@@ -89,6 +93,12 @@ TEST_CASE("CBORSerialize_Start", "[CBOR]") {
CHECK(output_message.detector_distance == Catch::Approx(message.detector_distance));
CHECK(output_message.beam_center_x == Catch::Approx(message.beam_center_x));
CHECK(output_message.beam_center_y == Catch::Approx(message.beam_center_y));
// The PONI (beam_center_*) and the direct beam are different points on a tilted detector, so the
// round trip has to keep them apart, not merely keep two floats.
REQUIRE(output_message.direct_beam_x);
REQUIRE(output_message.direct_beam_y);
CHECK(output_message.direct_beam_x.value() == Catch::Approx(message.direct_beam_x.value()));
CHECK(output_message.direct_beam_y.value() == Catch::Approx(message.direct_beam_y.value()));
CHECK(output_message.number_of_images == message.number_of_images);
CHECK(output_message.image_size_x == message.image_size_x);
CHECK(output_message.image_size_y == message.image_size_y);
@@ -137,6 +147,10 @@ TEST_CASE("CBORSerialize_Start", "[CBOR]") {
CHECK(output_message.unit_cell->beta == message.unit_cell->beta);
CHECK(output_message.unit_cell->gamma == message.unit_cell->gamma);
REQUIRE(output_message.beam_size_x);
CHECK(output_message.beam_size_x.value() == message.beam_size_x.value());
REQUIRE(output_message.beam_size_y);
CHECK(output_message.beam_size_y.value() == message.beam_size_y.value());
REQUIRE(output_message.total_flux);
CHECK(output_message.total_flux.value() == message.total_flux.value());
REQUIRE(output_message.attenuator_transmission);
@@ -219,6 +233,32 @@ TEST_CASE("CBORSerialize_Start_GridScan", "[CBOR]") {
CHECK(output_message.grid_scan->GetGridElemSlow_um() == Catch::Approx(grid.GetGridElemSlow_um()));
}
// A grid scan and a goniometer axis travel together on the wire: the axis with increment 0 is how
// the angle the spindle stood at reaches the file.
TEST_CASE("CBORSerialize_Start_GridScanAtStationaryAxis", "[CBOR]") {
GridScanSettings grid(20, 5.0, 5.0, false, false);
GoniometerAxis axis("omega", 90.0f, 0.0f, Coord(-1, 0, 0), {});
StartMessage message{
.grid_scan = grid,
.goniometer = axis
};
std::vector<uint8_t> buffer(8 * 1024 * 1024);
CBORStream2Serializer serializer(buffer.data(), buffer.size());
REQUIRE_NOTHROW(serializer.SerializeSequenceStart(message));
auto deserialized = CBORStream2Deserialize(buffer.data(), serializer.GetBufferSize());
REQUIRE(deserialized);
REQUIRE(deserialized->start_message);
StartMessage &output_message = *deserialized->start_message;
REQUIRE(output_message.grid_scan.has_value());
CHECK(output_message.grid_scan->GetNFast() == grid.GetNFast());
REQUIRE(output_message.goniometer.has_value());
CHECK(output_message.goniometer->GetName() == "omega");
CHECK(!output_message.goniometer->IsScanning());
CHECK(output_message.goniometer->GetStart_deg() == Catch::Approx(90.0f));
}
TEST_CASE("CBORSerialize_Start_ThresholdEnergy", "[CBOR]") {
std::vector<uint8_t> buffer(8 * 1024 * 1024);
CBORStream2Serializer serializer(buffer.data(), buffer.size());
@@ -495,6 +535,52 @@ TEST_CASE("CBORSerialize_End", "[CBOR]") {
CHECK(output_message.rotation_lattice->GetUnitCell().c == Catch::Approx(60.0));
}
TEST_CASE("CBORSerialize_End_SpaceGroup", "[CBOR]") {
// The determined group travels as both spellings. Only the name keeps the setting, so a
// non-reference setting has to survive the round trip as itself and not as its number's group.
const gemmi::SpaceGroup *sg = gemmi::find_spacegroup_by_name("P 1 1 2");
REQUIRE(sg != nullptr);
REQUIRE(gemmi::find_spacegroup_by_number(sg->number)->xhm() != sg->xhm());
std::vector<uint8_t> buffer(1024 * 1024);
CBORStream2Serializer serializer(buffer.data(), buffer.size());
EndMessage message{};
message.max_image_number = 0;
message.space_group_name = sg->xhm();
message.space_group_number = static_cast<uint64_t>(sg->number);
REQUIRE_NOTHROW(serializer.SerializeSequenceEnd(message));
auto deserialized = CBORStream2Deserialize(buffer.data(), serializer.GetBufferSize());
REQUIRE(deserialized);
REQUIRE(deserialized->end_message);
const EndMessage &out = *deserialized->end_message;
REQUIRE(out.space_group_name.has_value());
CHECK(*out.space_group_name == sg->xhm());
REQUIRE(out.space_group_number.has_value());
CHECK(*out.space_group_number == static_cast<uint64_t>(sg->number));
}
TEST_CASE("CBORSerialize_End_SpaceGroupNumberOnly", "[CBOR]") {
// A sender written before the name existed fills in only the number; the message still arrives
// and the missing name is absent rather than empty, so a reader can tell it apart.
std::vector<uint8_t> buffer(1024 * 1024);
CBORStream2Serializer serializer(buffer.data(), buffer.size());
EndMessage message{};
message.max_image_number = 0;
message.space_group_number = 96;
REQUIRE_NOTHROW(serializer.SerializeSequenceEnd(message));
auto deserialized = CBORStream2Deserialize(buffer.data(), serializer.GetBufferSize());
REQUIRE(deserialized);
REQUIRE(deserialized->end_message);
const EndMessage &out = *deserialized->end_message;
CHECK_FALSE(out.space_group_name.has_value());
REQUIRE(out.space_group_number.has_value());
CHECK(*out.space_group_number == 96);
}
TEST_CASE("CBORSerialize_End_RadIntResult", "[CBOR]") {
std::vector<uint8_t> buffer(8 * 1024 * 1024);
CBORStream2Serializer serializer(buffer.data(), buffer.size());