1.0.0-rc.174 (#84)
Build Packages / Create release (push) Successful in 17s
Build Packages / build:viewer:macos-arm64:nocuda (push) Successful in 3m22s
Build Packages / build:rugnux:macos-arm64:nocuda (push) Successful in 2m37s
Build Packages / build:rugnux:linux-aarch64:cuda (push) Successful in 9m33s
Build Packages / build:rugnux:linux-x86_64:cuda (push) Successful in 10m39s
Build Packages / build:viewer:linux-x86_64:nocuda (push) Successful in 11m4s
Build Packages / build:viewer:linux-x86_64:cuda (push) Successful in 13m19s
Build Packages / build:jfjoch:rocky8:nocuda (push) Successful in 17m37s
Build Packages / build:jfjoch:rocky9:nocuda (push) Successful in 18m49s
Build Packages / build:viewer:windows-x86_64:nocuda (push) Successful in 19m10s
Build Packages / build:viewer:windows-x86_64:cuda (push) Successful in 24m26s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 25m31s
Build Packages / build:jfjoch:ubuntu2404:nocuda (push) Successful in 18m54s
Build Packages / build:jfjoch:ubuntu2204:nocuda (push) Successful in 20m45s
Build Packages / Generate python client (push) Successful in 37s
Build Packages / build:jfjoch:rocky8:cuda-sls9 (push) Successful in 20m20s
Build Packages / Build documentation (push) Successful in 1m32s
Build Packages / build:rugnux:windows-x86_64:cuda (push) Successful in 14m37s
Build Packages / build:jfjoch:rocky9:cuda-sls9 (push) Successful in 21m6s
Build Packages / build:jfjoch:rocky8:cuda (push) Successful in 19m49s
Build Packages / build:jfjoch:rocky9:cuda (push) Successful in 20m29s
Build Packages / build:jfjoch:ubuntu2204:cuda (push) Successful in 17m2s
Build Packages / build:jfjoch:ubuntu2404:cuda (push) Successful in 14m27s
Build Packages / Unit tests (push) Successful in 1h18m12s
Build Packages / Create release (push) Successful in 17s
Build Packages / build:viewer:macos-arm64:nocuda (push) Successful in 3m22s
Build Packages / build:rugnux:macos-arm64:nocuda (push) Successful in 2m37s
Build Packages / build:rugnux:linux-aarch64:cuda (push) Successful in 9m33s
Build Packages / build:rugnux:linux-x86_64:cuda (push) Successful in 10m39s
Build Packages / build:viewer:linux-x86_64:nocuda (push) Successful in 11m4s
Build Packages / build:viewer:linux-x86_64:cuda (push) Successful in 13m19s
Build Packages / build:jfjoch:rocky8:nocuda (push) Successful in 17m37s
Build Packages / build:jfjoch:rocky9:nocuda (push) Successful in 18m49s
Build Packages / build:viewer:windows-x86_64:nocuda (push) Successful in 19m10s
Build Packages / build:viewer:windows-x86_64:cuda (push) Successful in 24m26s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 25m31s
Build Packages / build:jfjoch:ubuntu2404:nocuda (push) Successful in 18m54s
Build Packages / build:jfjoch:ubuntu2204:nocuda (push) Successful in 20m45s
Build Packages / Generate python client (push) Successful in 37s
Build Packages / build:jfjoch:rocky8:cuda-sls9 (push) Successful in 20m20s
Build Packages / Build documentation (push) Successful in 1m32s
Build Packages / build:rugnux:windows-x86_64:cuda (push) Successful in 14m37s
Build Packages / build:jfjoch:rocky9:cuda-sls9 (push) Successful in 21m6s
Build Packages / build:jfjoch:rocky8:cuda (push) Successful in 19m49s
Build Packages / build:jfjoch:rocky9:cuda (push) Successful in 20m29s
Build Packages / build:jfjoch:ubuntu2204:cuda (push) Successful in 17m2s
Build Packages / build:jfjoch:ubuntu2404:cuda (push) Successful in 14m27s
Build Packages / Unit tests (push) Successful in 1h18m12s
* Rugnux: Performance improvements on GPU and CPU (more of the pre-scan and of scaling on the GPU, faster CPU spot finding and crystal refinement), with unchanged results. * Rugnux: More robust processing - patches of persistently hot pixels are masked, an inconsistent merge triggers a retry at the measured beam centre, and builds targeting different CPU levels give the same results. * Rugnux: Improved scaling and merging - reflections with an overloaded pixel are dropped, as in XDS, sparse rotation sweeps are scaled more reliably, and French-Wilson amplitudes use an anisotropic Wilson prior. * Rugnux: Improved space-group determination - glide planes in groups without a centre of symmetry, screw axes from short or weak axial rows kept when a higher group is adopted, and more reliable decisions on twinned and pseudo-symmetric crystals. * Rugnux: Improved small-molecule processing - spots that grow wider than the integration disk and split spots are integrated over their measured footprint, sparse lattices are integrated on every frame, and the `.hkl` file holds unmerged scaled reflections (SHELX HKLF 4). * Rugnux: Reads Rigaku d*TREK SMV images (Saturn CCD), including detector 2theta and encoded pixel overflows; home-source (rotating-anode) datasets were added to the validation battery. * jfjoch_viewer: Fixed processing failing at the end with "Wrong JPEG library version" on Linux; the merge window shows the space group with proper subscripts and a checklist of crystal pathologies. Reviewed-on: #84 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
This commit was merged in pull request #84.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <catch2/catch_all.hpp>
|
||||
|
||||
#include "../rugnux/Rugnux.h"
|
||||
#include "../image_analysis/scale_merge/RotationScaleMerge.h"
|
||||
|
||||
namespace {
|
||||
// A synthetic sweep whose stage turned `true_scale` times the stored angles. Scored at a scale k,
|
||||
@@ -92,3 +93,44 @@ TEST_CASE("WalkRotationScale_StoredAnglesStand", "[RotationScale]") {
|
||||
CHECK(sweep.index_calls == 0);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("SmoothLogScale_FollowsInformationBridgesGaps", "[RotationScale]") {
|
||||
const int n = 60;
|
||||
// A ramp is no curvature, so any amount of smoothing keeps it exactly.
|
||||
std::vector<double> ramp(n), J(n, 1.0);
|
||||
for (int f = 0; f < n; ++f) ramp[f] = -0.1 * f;
|
||||
auto x = RotationScaleMerge::SmoothLogScale(ramp, J, 1e6);
|
||||
for (int f = 0; f < n; ++f) CHECK(x[f] == Catch::Approx(ramp[f]).margin(1e-6));
|
||||
// A stretch with no information is bridged by the straight line through its neighbours.
|
||||
std::vector<double> Jgap(J);
|
||||
for (int f = 20; f < 40; ++f) Jgap[f] = 0.0;
|
||||
x = RotationScaleMerge::SmoothLogScale(ramp, Jgap, 1.0);
|
||||
CHECK(x[30] == Catch::Approx(-3.0).margin(1e-6));
|
||||
// A frame with far more information than its neighbours keeps its own value.
|
||||
std::vector<double> y(n, 0.0), Jone(n, 1.0);
|
||||
y[30] = 1.0; Jone[30] = 1e6;
|
||||
x = RotationScaleMerge::SmoothLogScale(y, Jone, 10.0);
|
||||
CHECK(x[30] == Catch::Approx(1.0).margin(1e-3));
|
||||
// Fewer than two frames with information: nothing to smooth against.
|
||||
std::vector<double> Jsingle(n, 0.0);
|
||||
Jsingle[5] = 1.0;
|
||||
CHECK(RotationScaleMerge::SmoothLogScale(y, Jsingle, 1.0) == y);
|
||||
}
|
||||
|
||||
TEST_CASE("ChooseLogScaleSmoothing_SmoothsNoiseFollowsSignal", "[RotationScale]") {
|
||||
const int n = 400;
|
||||
std::vector<double> J(n, 1.0), noisy(n), step(n);
|
||||
// Deterministic noise about a flat scale: the chosen curve is close to flat.
|
||||
for (int f = 0; f < n; ++f) noisy[f] = 0.3 * std::sin(12.9898 * f) * std::cos(78.233 * f);
|
||||
const double l_noise = RotationScaleMerge::ChooseLogScaleSmoothing(noisy, J, 1);
|
||||
const auto flat = RotationScaleMerge::SmoothLogScale(noisy, J, l_noise);
|
||||
double rms = 0.0;
|
||||
for (double v : flat) rms += v * v;
|
||||
CHECK(std::sqrt(rms / n) < 0.05);
|
||||
// A precise slow wave is followed.
|
||||
for (int f = 0; f < n; ++f) step[f] = 2.0 * std::sin(f / 30.0);
|
||||
const double l_wave = RotationScaleMerge::ChooseLogScaleSmoothing(step, J, 1);
|
||||
const auto wave = RotationScaleMerge::SmoothLogScale(step, J, l_wave);
|
||||
CHECK(wave[47] == Catch::Approx(step[47]).margin(0.01));
|
||||
CHECK(l_wave < l_noise);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user