rugnux: several grid-scan masters read as one run keep no grid
Build Packages / Create release (push) Successful in 9s
Build Packages / Build documentation (push) Successful in 47s
Build Packages / build:portable:windows-x86_64:nocuda (push) Successful in 26m57s
Build Packages / build:portable:macos-arm64:nocuda (push) Successful in 5m28s
Build Packages / build:rugnux:linux-aarch64:cuda (push) Successful in 11m22s
Build Packages / build:portable:linux-x86_64:nocuda (push) Successful in 15m45s
Build Packages / build:portable:linux-x86_64:cuda (push) Successful in 21m27s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 28m30s
Build Packages / build:jfjoch:rocky8:nocuda (push) Successful in 29m47s
Build Packages / build:portable:windows-x86_64:cuda (push) Successful in 30m46s
Build Packages / build:jfjoch:rocky9:nocuda (push) Successful in 30m59s
Build Packages / build:jfjoch:ubuntu2204:nocuda (push) Successful in 21m12s
Build Packages / build:jfjoch:ubuntu2404:nocuda (push) Successful in 24m58s
Build Packages / build:jfjoch:rocky8:cuda-sls9 (push) Successful in 29m20s
Build Packages / Generate python client (push) Successful in 31s
Build Packages / build:jfjoch:ubuntu2204:cuda (push) Successful in 28m52s
Build Packages / build:jfjoch:rocky9:cuda-sls9 (push) Successful in 35m23s
Build Packages / build:jfjoch:rocky8:cuda (push) Successful in 34m45s
Build Packages / build:jfjoch:rocky9:cuda (push) Successful in 35m58s
Build Packages / build:jfjoch:ubuntu2404:cuda (push) Successful in 28m18s
Build Packages / Unit tests (push) Failing after 1h50m10s
Build Packages / Validation Battery (push) Failing after 46m38s

Several fixed-target masters given together failed in the integration
step with "Input parameter invalid (Image out of bounds)". The combined
dataset of JFJochMultiReader is a copy of the first input's, grid scan
included, while the run's image numbers are global over all inputs and
rugnux sets the image count to the total without re-deriving the grid.
ScanResultGenerator::Add then placed every image on the first input's
raster and threw on the first image past its last element; the NXmx
writer's grid_scan_x/y columns would have thrown the same way.

Several collections are not one grid, so the multi reader now drops the
grid scan from the run, next to where as_stills drops the goniometer. The
grid is used only for the grid map and the per-coordinate plots, not for
processing, so the run indexes, integrates and merges every chip as
before and simply carries no grid map. A grid map per chip is a possible
later feature.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HVeDQsU5a8AJUdJPgWevAK
This commit is contained in:
leonarski_fandClaude Fable 5.1 committed 2026-11-12 15:49:28 +01:00
1 parent 340e02072a
commit ed655d0c4d
3 files changed
+32 -1

No files matched your search

+2 -1
View File
@@ -96,7 +96,8 @@ name). Several inputs are one stills dataset in `--mode mx`, or several rotation
one dataset - `rugnux run*.h5` (SACLA), `*.cxi`, `*.xtc` (LCLS) - or several Jungfraujoch/NXmx
masters of stills - or of rotation sweeps under `--force-still` - read as one run: their images one after
another, merged together, with the indexing rate reported per master as well. Such masters must share the detector, wavelength,
distance and beam centre. Several inputs must be one format; any `--mode` other than `mx`, and
distance and beam centre. A grid scan an input holds (a fixed-target chip) is not carried into the run: several chips are
not one grid, so the run has no grid map. Several inputs must be one format; any `--mode` other than `mx`, and
following a broker, take one.
Several rotation sweeps are told apart from the files: one sweep per CBF/marCCD/SMV/SFRM file-name
+3
View File
@@ -109,6 +109,9 @@ JFJochMultiReader::JFJochMultiReader(std::vector<std::unique_ptr<JFJochReader>>
dataset->pixel_mask = std::make_shared<const PixelMask>(mask);
if (as_stills)
dataset->experiment.Goniometer(std::nullopt);
// Several collections are not one grid: the first input's grid would place the whole run's image
// numbers on its own raster and throw past its last element. The run keeps no grid map.
dataset->experiment.GridScan(std::nullopt);
SetStartMessage(dataset);
}
+27
View File
@@ -4,6 +4,7 @@
#include <catch2/catch_all.hpp>
#include "../common/DiffractionExperiment.h"
#include "../common/ScanResultGenerator.h"
#include "../reader/JFJochMultiReader.h"
namespace {
@@ -116,3 +117,29 @@ TEST_CASE("JFJochMultiReader_RotationAsStills", "[JFJochMultiReader][portable]")
CHECK(!reader.GetDataset()->experiment.GetGoniometer().has_value());
CHECK(reader.ReadSpots(2)[0].x == Catch::Approx(100.0f));
}
TEST_CASE("JFJochMultiReader_DropsGridScan", "[JFJochMultiReader][portable]") {
// Two fixed-target chips, a grid scan each: read together they are one stills run, not one grid.
// The first input's grid (6 elements) would throw on every image number past its own.
auto x = Stills();
x.ImagesPerTrigger(6).GridScan(GridScanSettings(3, 10.0f, 10.0f, true, false).ImageNum(6));
std::vector<std::unique_ptr<JFJochReader>> inputs;
inputs.push_back(std::make_unique<FakeStills>(6, 0.0f, x, EmptyMask(x)));
inputs.push_back(std::make_unique<FakeStills>(6, 100.0f, x, EmptyMask(x)));
JFJochMultiReader reader(std::move(inputs));
REQUIRE(reader.GetNumberOfImages() == 12);
CHECK(!reader.GetDataset()->experiment.GetGoniometer().has_value());
CHECK(!reader.GetDataset()->experiment.GetGridScan().has_value());
// As rugnux sets the run up: the combined dataset's experiment over every image of every input.
DiffractionExperiment run(reader.GetDataset()->experiment);
run.ImagesPerTrigger(static_cast<int64_t>(reader.GetNumberOfImages()));
ScanResultGenerator scan_result(run);
for (int64_t i = 0; i < 12; i++) {
DataMessage message;
message.number = i;
REQUIRE_NOTHROW(scan_result.Add(message));
}
CHECK(scan_result.GetResult().images.size() == 12);
}