Reader tests for the marCCD header-offset clamp and the 2-theta circle
Two cases on the existing byte-for-byte marCCD fixture: a file whose end-angle block is zeroed while the detector sits on a 2-theta arm must still name phi as the circle that turned, and a file whose tag 34710 names an offset far past its end must be refused rather than allocated for. Also drops a bound in SweepLayout that the absolute jitter threshold makes redundant. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013nW6FNRP1bBJJ8pfHiByAT
This commit is contained in:
1 parent
1b9b6d7405
commit
65b9ae1259
2 files changed
+41
-4
No files matched your search
@@ -142,7 +142,7 @@ Layout Place(const std::vector<Frame> &frames, const std::string &logger_name) {
|
||||
double guess = 0;
|
||||
for (size_t i = 1; i < frames.size(); i++) {
|
||||
const double d = Fold(angle[i] - angle[i - 1]);
|
||||
if (std::abs(d) > std::max(too_fine, 1e-6) && (guess == 0 || std::abs(d) < std::abs(guess)))
|
||||
if (std::abs(d) > too_fine && (guess == 0 || std::abs(d) < std::abs(guess)))
|
||||
guess = d;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user