Rugnux: fit the beam centre without the transmitting beam-stop pieces
a1816e905adds the partly transmitting holder-arm pieces to the beam-stop mask, and the background beam-centre fit read that mask too. A thin arm running into the beam, masked, takes cells out of the rings it crosses; which radial bins stay above the sector-coverage gate then changes as the trial centre moves, and a walk seeded beside the arm (the FFT capture sat 48 px off) limit-cycled on that edge and stopped 44 px short (sigma 0.34 -> 2.27 px). On an open-arm set whose header centre is 171 px out, the measured centre no longer indexed (60/60 -> 0/60), the run kept the file's centre and merged P1 at CC1/2 0.004 instead of P212121 at 0.995. The arm's dimming is multiplicative in azimuth, which the fit's per-sector amplitude already absorbs, so the fit now uses the mask without those pieces (ShadowFinder marks them TRANSMITTING); integration still masks them. The fitted centre is back to itsa0518abe6value on every set checked (the failing one plus four arm sets); the failing set merges P212121, CC1/2 0.995, ISa 22.6. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D1G8gJVAy6gp1K5Dz3NE5C
This commit is contained in:
@@ -831,7 +831,7 @@ std::vector<uint32_t> ShadowFinder::GetMask(size_t nthreads) const {
|
||||
region[i] = 0;
|
||||
|
||||
for (int i = 0; i < n_pixels; i++)
|
||||
mask[i] = region[i] ? 1 : 0;
|
||||
mask[i] = region[i] ? SHADOW : 0;
|
||||
|
||||
// Hardware that lets part of the beam through - a thin holder arm, or one whose shadow is blurred
|
||||
// by its distance from the detector - sits between PENUMBRA_RATIO and SHADOW_RATIO along most of
|
||||
@@ -878,7 +878,7 @@ std::vector<uint32_t> ShadowFinder::GetMask(size_t nthreads) const {
|
||||
if (n_dim >= MIN_SHADOW_PIXELS && n_low >= MIN_CORE_PIXELS)
|
||||
for (const int i : component)
|
||||
if (dim[i])
|
||||
mask[i] = 1;
|
||||
mask[i] = TRANSMITTING;
|
||||
}
|
||||
return mask;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user