Integration: the profile-vs-box guard keeps a strong reflection the profile reads above the box sum
Build Packages / build:portable:linux-x86_64:nocuda (push) Successful in 16m39s
Build Packages / build:portable:windows-x86_64:cuda (push) Successful in 28m14s
Build Packages / build:portable:macos-arm64:nocuda (push) Successful in 5m25s
Build Packages / build:jfjoch:rocky8:nocuda (push) Successful in 31m43s
Build Packages / build:jfjoch:rocky8:cuda (push) Successful in 29m41s
Build Packages / build:jfjoch:ubuntu2204:cuda (push) Successful in 25m40s
Build Packages / Create release (push) Successful in 8s
Build Packages / build:portable:windows-x86_64:nocuda (push) Successful in 24m30s
Build Packages / build:rugnux:linux-aarch64:cuda (push) Successful in 10m9s
Build Packages / Unit tests (push) Successful in 1h44m17s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 30m35s
Build Packages / Generate python client (push) Successful in 31s
Build Packages / Build documentation (push) Successful in 45s
Build Packages / build:portable:linux-x86_64:cuda (push) Successful in 22m56s
Build Packages / build:jfjoch:rocky9:nocuda (push) Successful in 32m46s
Build Packages / build:jfjoch:ubuntu2204:nocuda (push) Successful in 28m14s
Build Packages / build:jfjoch:ubuntu2404:nocuda (push) Successful in 26m33s
Build Packages / build:jfjoch:rocky8:cuda-sls9 (push) Successful in 28m39s
Build Packages / build:jfjoch:rocky9:cuda-sls9 (push) Successful in 31m56s
Build Packages / build:jfjoch:rocky9:cuda (push) Successful in 32m29s
Build Packages / build:jfjoch:ubuntu2404:cuda (push) Successful in 28m29s
Build Packages / Validation Battery (push) Successful in 47m19s
Build Packages / build:portable:linux-x86_64:nocuda (push) Successful in 16m39s
Build Packages / build:portable:windows-x86_64:cuda (push) Successful in 28m14s
Build Packages / build:portable:macos-arm64:nocuda (push) Successful in 5m25s
Build Packages / build:jfjoch:rocky8:nocuda (push) Successful in 31m43s
Build Packages / build:jfjoch:rocky8:cuda (push) Successful in 29m41s
Build Packages / build:jfjoch:ubuntu2204:cuda (push) Successful in 25m40s
Build Packages / Create release (push) Successful in 8s
Build Packages / build:portable:windows-x86_64:nocuda (push) Successful in 24m30s
Build Packages / build:rugnux:linux-aarch64:cuda (push) Successful in 10m9s
Build Packages / Unit tests (push) Successful in 1h44m17s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 30m35s
Build Packages / Generate python client (push) Successful in 31s
Build Packages / Build documentation (push) Successful in 45s
Build Packages / build:portable:linux-x86_64:cuda (push) Successful in 22m56s
Build Packages / build:jfjoch:rocky9:nocuda (push) Successful in 32m46s
Build Packages / build:jfjoch:ubuntu2204:nocuda (push) Successful in 28m14s
Build Packages / build:jfjoch:ubuntu2404:nocuda (push) Successful in 26m33s
Build Packages / build:jfjoch:rocky8:cuda-sls9 (push) Successful in 28m39s
Build Packages / build:jfjoch:rocky9:cuda-sls9 (push) Successful in 31m56s
Build Packages / build:jfjoch:rocky9:cuda (push) Successful in 32m29s
Build Packages / build:jfjoch:ubuntu2404:cuda (push) Successful in 28m29s
Build Packages / Validation Battery (push) Successful in 47m19s
The guard replaces the profile fit with the box sum when the two differ by more than 10 box sigmas. It exists for weak reflections where the fit runs away. On a strong spot the Gaussian profile reads a few per cent above the box (the box misses the tails), and at I/sigma above ~100 that is more than 10 sigmas, so most of the strongest reflections of bright data were being replaced with the box sum. A profile intensity above a box sum of more than 20 sigmas is now kept; the low side and weak reflections are guarded as before. On data where the guard never fired nothing changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UqXYdL4qBGYRiSXSGXfCLu
This commit is contained in:
1 parent
af1b67398d
commit
12538dcdb9
3 files changed
+11
-2
No files matched your search
@@ -87,6 +87,10 @@ constexpr float MAX_STENCIL_GROW_OVER_R3 = 2.0f;
|
||||
// summation (box-sum) intensity when the profile result disagrees with the summation seed by more than
|
||||
// this many box-sum sigmas (a real fit agrees within counting noise, so the margin is generous).
|
||||
constexpr double PROFILE_SUMMATION_MAX_NSIGMA = 10.0;
|
||||
// The runaway is a weak reflection's. On a strong spot the profile reads a few per cent above the box
|
||||
// sum (the box misses the tails), which at high I/sigma is many box sigmas - a real fit, not a
|
||||
// runaway. So a profile above a box sum of more than this many sigmas is kept.
|
||||
constexpr double PROFILE_SUMMATION_STRONG_NSIGMA = 20.0;
|
||||
|
||||
// MINPK keeps a reflection while enough of its expected profile is readable. It says nothing about
|
||||
// WHERE the unreadable part is, and the two are not the same question. Renormalising over the pixels
|
||||
|
||||
@@ -890,7 +890,9 @@ std::vector<Reflection> BraggIntegrationEngineCPU::ProfilePasses(const Sampler &
|
||||
// both - excluded to a neighbour, or unreadable - the fit's full-profile intensity has to be
|
||||
// scaled down to that same disk before the two are comparable. Nothing dropped gives 1.
|
||||
const double guard_scale = fo.m_all > 0.0f ? fo.m_read / fo.m_all : 1.0;
|
||||
if (std::abs(I * guard_scale - rh.I) > PROFILE_SUMMATION_MAX_NSIGMA * rh.sigma) {
|
||||
const double guard_diff = I * guard_scale - rh.I;
|
||||
const bool strong_above = guard_diff > 0 && rh.I > PROFILE_SUMMATION_STRONG_NSIGMA * rh.sigma;
|
||||
if (std::abs(guard_diff) > PROFILE_SUMMATION_MAX_NSIGMA * rh.sigma && !strong_above) {
|
||||
I = rh.I;
|
||||
sigma = rh.sigma;
|
||||
var_bkg = rh.var_bkg;
|
||||
|
||||
@@ -873,7 +873,10 @@ __global__ void fit(const int32_t *img, const uint32_t *owner, const float *px_x
|
||||
// neighbour, or unreadable - scale the full-profile intensity back to the disk the seed
|
||||
// read; nothing dropped gives exactly 1.
|
||||
const float gs = s_mall > 0.0f ? s_mread / s_mall : 1.0f;
|
||||
if (fabsf(I * gs - I_seed[i]) > (float) PROFILE_SUMMATION_MAX_NSIGMA * sigma_seed[i]) {
|
||||
const float diff = I * gs - I_seed[i];
|
||||
const bool strong_above = diff > 0.0f
|
||||
&& I_seed[i] > (float) PROFILE_SUMMATION_STRONG_NSIGMA * sigma_seed[i];
|
||||
if (fabsf(diff) > (float) PROFILE_SUMMATION_MAX_NSIGMA * sigma_seed[i] && !strong_above) {
|
||||
I = I_seed[i];
|
||||
sigma = sigma_seed[i];
|
||||
var_bkg = varbkg_seed[i];
|
||||
|
||||
Reference in new issue
Block a user