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:
@@ -144,9 +144,9 @@ TEST_CASE("ShadowFinder_FindsAnArmThatLetsPartOfTheBeamThrough", "[ShadowFinder]
|
||||
|
||||
const auto mask = finder.GetMask();
|
||||
CHECK(mask[I(C, C)] == 1); // the stop
|
||||
CHECK(mask[I(GAP_X0 - 10, C)] == 1); // the arm where it transmits, before the gap
|
||||
CHECK(mask[I(GAP_X1 + 10, C + ARM_HALF_WIDE - 3)] == 1); // ... and after it
|
||||
CHECK(mask[I(W - 3, C)] == 1); // where it is opaque
|
||||
CHECK(mask[I(GAP_X0 - 10, C)] == ShadowFinder::TRANSMITTING); // the arm where it transmits, before the gap
|
||||
CHECK(mask[I(GAP_X1 + 10, C + ARM_HALF_WIDE - 3)] == ShadowFinder::TRANSMITTING); // ... and after it
|
||||
CHECK(mask[I(W - 3, C)] != 0); // where it is opaque
|
||||
CHECK(mask[I(GAP_X1 + 10, C + ARM_HALF_WIDE + 25)] == 0); // and nothing beside it
|
||||
CHECK(mask[I(0, 0)] == 0);
|
||||
CHECK(mask[I(C - 60, C)] == 0);
|
||||
|
||||
Reference in New Issue
Block a user