v1.0.0-rc.175 (#85)
Build Packages / build:jfjoch:ubuntu2204:cuda (push) Successful in 20m49s
Build Packages / Create release (push) Successful in 7s
Build Packages / build:portable:macos-arm64:nocuda (push) Successful in 4m56s
Build Packages / build:rugnux:linux-aarch64:cuda (push) Successful in 9m10s
Build Packages / build:portable:linux-x86_64:nocuda (push) Successful in 13m51s
Build Packages / build:portable:linux-x86_64:cuda (push) Successful in 16m56s
Build Packages / build:jfjoch:rocky8:nocuda (push) Successful in 20m59s
Build Packages / build:portable:windows-x86_64:nocuda (push) Successful in 21m25s
Build Packages / build:jfjoch:rocky9:nocuda (push) Successful in 21m17s
Build Packages / build:jfjoch:ubuntu2204:nocuda (push) Successful in 14m14s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 25m59s
Build Packages / build:portable:windows-x86_64:cuda (push) Successful in 25m48s
Build Packages / build:jfjoch:ubuntu2404:nocuda (push) Successful in 15m52s
Build Packages / build:jfjoch:rocky8:cuda-sls9 (push) Successful in 19m33s
Build Packages / Generate python client (push) Successful in 29s
Build Packages / Build documentation (push) Successful in 1m19s
Build Packages / build:jfjoch:rocky9:cuda-sls9 (push) Successful in 25m31s
Build Packages / build:jfjoch:rocky8:cuda (push) Successful in 25m24s
Build Packages / build:jfjoch:rocky9:cuda (push) Successful in 26m5s
Build Packages / build:jfjoch:ubuntu2404:cuda (push) Successful in 22m19s
Build Packages / Unit tests (push) Failing after 2h28m24s
Build Packages / Validation Battery (push) Successful in 40m33s
Build Packages / build:jfjoch:ubuntu2204:cuda (push) Successful in 20m49s
Build Packages / Create release (push) Successful in 7s
Build Packages / build:portable:macos-arm64:nocuda (push) Successful in 4m56s
Build Packages / build:rugnux:linux-aarch64:cuda (push) Successful in 9m10s
Build Packages / build:portable:linux-x86_64:nocuda (push) Successful in 13m51s
Build Packages / build:portable:linux-x86_64:cuda (push) Successful in 16m56s
Build Packages / build:jfjoch:rocky8:nocuda (push) Successful in 20m59s
Build Packages / build:portable:windows-x86_64:nocuda (push) Successful in 21m25s
Build Packages / build:jfjoch:rocky9:nocuda (push) Successful in 21m17s
Build Packages / build:jfjoch:ubuntu2204:nocuda (push) Successful in 14m14s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 25m59s
Build Packages / build:portable:windows-x86_64:cuda (push) Successful in 25m48s
Build Packages / build:jfjoch:ubuntu2404:nocuda (push) Successful in 15m52s
Build Packages / build:jfjoch:rocky8:cuda-sls9 (push) Successful in 19m33s
Build Packages / Generate python client (push) Successful in 29s
Build Packages / Build documentation (push) Successful in 1m19s
Build Packages / build:jfjoch:rocky9:cuda-sls9 (push) Successful in 25m31s
Build Packages / build:jfjoch:rocky8:cuda (push) Successful in 25m24s
Build Packages / build:jfjoch:rocky9:cuda (push) Successful in 26m5s
Build Packages / build:jfjoch:ubuntu2404:cuda (push) Successful in 22m19s
Build Packages / Unit tests (push) Failing after 2h28m24s
Build Packages / Validation Battery (push) Successful in 40m33s
* Rugnux: Processes a collection live while jfjoch_broker writes it (`rugnux <master.h5> <broker URL>`). * Rugnux: Processing starts on the first images and confirms its choices once all are in, so analysis can begin during collection. * Rugnux: Faster processing, especially on servers with several GPUs and CPU sockets and on computers without a GPU (`--no-gpu`, macOS). * Rugnux: Uses much less GPU memory, so large data sets stay on the GPU of smaller cards, and a data set too large for the card is processed on the CPU instead. * Rugnux: On macOS, Bragg integration runs on the Apple GPU. * Rugnux: Better handling of twinning and pseudo-symmetry, with the twin hypothesis written as `<prefix>_twin_<SG>.mtz`, and a wrong `--model` no longer confirms the data or decides the hand. * Rugnux: `--model` accepts predicted (AlphaFold) models and falls back to molecular replacement when the model is not placed as a rigid body (experimental `--mr` forces it), settling space group, hand and twinning and writing a different answer as `<prefix>_mr.mtz`. * Rugnux: Molecular replacement is faster and settles the space group in more cases with several copies in the asymmetric unit. * Rugnux: Deposition-ready mmCIF, a richer report, and numbered steps on the terminal with the full log in `<prefix>_log.txt`; `_P1.mtz`, `--estimate-beam-center` and `--beam-center-search` are removed. * Rugnux: The beam-stop shadow is found correctly on tilted detectors. * Rugnux: Stills files that record a stationary goniometer axis get the default stills geometry refinement. * jfjoch_viewer: "Analyze dataset" uses the same defaults as a bare `rugnux <file>`, and shows the results of processed CBF, marCCD and SMV sweeps. * jfjoch_viewer: The Files panel refreshes on F5 and every few seconds, and the plot type and other selections stay put during live collection. * jfjoch_writer: Memory stays bounded and old data files are closed efficiently on long runs, any failure ends the run in an error state the broker is told about, and the master file appears only after its data files; the ZeroMQ pusher logs when a stalled writer makes it drop images. * Fixes: The TCP image pusher no longer blocks the broker's receiver, GPU out-of-memory failures stop with a clear message, and the XDS plugin masks module and chip edges. --------- Co-authored-by: Filip Leonarski <jungfrau@filips-mac-mini.home> Reviewed-on: #85 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
This commit was merged in pull request #85.
This commit is contained in:
1 parent
a395f358ef
commit
19b135186d
779 files changed
+201230
-17809
No files matched your search
@@ -336,6 +336,42 @@ TEST_CASE("ShadowFinder_TheRingsFollowTheCentreTheCallerNames", "[ShadowFinder]"
|
||||
CHECK(masked_at_file > 3 * PATCH_PX);
|
||||
}
|
||||
|
||||
// A detector on a swung 2theta arm. The beam no longer lands on the geometry's centre (the point of
|
||||
// normal incidence) and the rings of constant 2 theta are no circle about it, nor about any pixel;
|
||||
// the solid angle of a pixel, which falls away from the normal, also varies along each of them. A
|
||||
// background that depends on 2 theta alone, seen through that solid angle, has nothing in the
|
||||
// beam - and circles drawn about the centre cut across its fall-off and read a large part of the
|
||||
// detector as shadow.
|
||||
TEST_CASE("ShadowFinder_ATiltedDetectorIsNotAShadow", "[ShadowFinder]") {
|
||||
// Short enough, and tilted enough, that the beam lands 47 px from the centre.
|
||||
constexpr float DISTANCE_MM = 20.0f;
|
||||
constexpr float TILT_RAD = 0.174533f; // 10 degrees
|
||||
|
||||
DiffractionExperiment x = TestExperiment();
|
||||
x.DetectorDistance_mm(DISTANCE_MM).PoniRot1_rad(TILT_RAD);
|
||||
const DiffractionGeometry geom = x.GetDiffractionGeometry();
|
||||
|
||||
// Below MIN_REFLECTION, so no pixel is exempt as a recorded reflection.
|
||||
std::vector<int32_t> frame(static_cast<size_t>(W) * H);
|
||||
for (int y = 0; y < H; y++)
|
||||
for (int xi = 0; xi < W; xi++) {
|
||||
const float two_theta = geom.TwoTheta_rad(static_cast<float>(xi), static_cast<float>(y));
|
||||
const float solid_angle = geom.CalcAzIntSolidAngleCorr(static_cast<float>(xi), static_cast<float>(y));
|
||||
frame[I(xi, y)] = static_cast<int32_t>(std::lround(24.0f * solid_angle * std::exp(-two_theta / 0.15f)));
|
||||
}
|
||||
|
||||
const PixelMask pixel_mask(x);
|
||||
ShadowFinder finder(x, pixel_mask);
|
||||
std::vector<uint8_t> buffer;
|
||||
for (int f = 0; f < NFRAMES; f++) {
|
||||
DataMessage msg{};
|
||||
msg.image = CompressedImage(frame, W, H);
|
||||
finder.AddImage(msg, buffer);
|
||||
}
|
||||
const auto mask = finder.GetMask();
|
||||
CHECK(std::count_if(mask.begin(), mask.end(), [](uint32_t v) { return v != 0; }) == 0);
|
||||
}
|
||||
|
||||
// The background is not flat around a ring: a polarized source suppresses it in its own plane, by
|
||||
// a factor that reaches four at the 2 theta a short detector distance puts in a corner. That is
|
||||
// several times the dip this class looks for, so with the modulation left in, half of every outer
|
||||
@@ -558,4 +594,50 @@ TEST_CASE("ShadowFinder_DeviceMaskMatchesHost", "[ShadowFinder]") {
|
||||
CHECK(r.device_mask == r.host_mask);
|
||||
}
|
||||
}
|
||||
|
||||
// The pre-scan keeps one accumulator per card and folds them together when the mask is read. Two
|
||||
// accumulators, each given half of the frames, folded into one must hold exactly what one given every
|
||||
// frame holds - including a pixel whose only valid values are negative and fell all to the second half,
|
||||
// which the maximum must take although the first half never counted the pixel.
|
||||
TEST_CASE("ShadowAccumulatorGPU_FoldedCardsMatchOneCard", "[ShadowFinder]") {
|
||||
if (get_gpu_count() == 0)
|
||||
SKIP("no GPU");
|
||||
constexpr size_t N = static_cast<size_t>(W) * H;
|
||||
std::vector<std::vector<int32_t>> frames;
|
||||
uint32_t state = 12345;
|
||||
const auto next = [&] { state = state * 1664525u + 1013904223u; return state >> 8; };
|
||||
for (int f = 0; f < 2 * NFRAMES; f++) {
|
||||
frames.emplace_back(N);
|
||||
for (auto &v : frames.back())
|
||||
v = next() % 50 == 0 ? INT32_MIN : static_cast<int32_t>(next() % 1100) - 100;
|
||||
frames.back()[I(3, 3)] = f % 2 == 0 ? INT32_MIN : -7 - f;
|
||||
frames.back()[I(5, 5)] = INT32_MIN;
|
||||
}
|
||||
JFJochBitShuffleCompressor compressor(CompressionAlgorithm::BSHUF_LZ4);
|
||||
std::vector<std::vector<uint8_t>> compressed;
|
||||
for (const auto &frame : frames)
|
||||
compressed.push_back(compressor.Compress(frame));
|
||||
const auto image = [&](size_t f) {
|
||||
return CompressedImage(compressed[f].data(), compressed[f].size(), W, H, CompressedImageMode::Int32,
|
||||
CompressionAlgorithm::BSHUF_LZ4);
|
||||
};
|
||||
|
||||
ShadowAccumulatorGPU one(N), first(N), second(N);
|
||||
for (size_t f = 0; f < frames.size(); f++) {
|
||||
one.Add(image(f));
|
||||
(f % 2 == 0 ? first : second).Add(image(f));
|
||||
}
|
||||
first.Fold(second);
|
||||
|
||||
std::vector<int64_t> max_one, sum_one, max_folded, sum_folded;
|
||||
std::vector<uint32_t> count_one, count_folded;
|
||||
one.Download(max_one, sum_one, count_one);
|
||||
first.Download(max_folded, sum_folded, count_folded);
|
||||
CHECK(first.GetFrameCount() == one.GetFrameCount());
|
||||
CHECK(max_folded[I(3, 3)] == -8);
|
||||
CHECK(count_folded[I(5, 5)] == 0);
|
||||
CHECK(max_folded == max_one);
|
||||
CHECK(sum_folded == sum_one);
|
||||
CHECK(count_folded == count_one);
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user