Skip to content

feat: add TPX3 two-quad 4x2 mask support - #64

Merged
kgofron merged 1 commit into
areaDetector:masterfrom
kgofron:feature/tpx3-4x2-mask-calibration
Oct 5, 2026
Merged

kgofron merged 1 commit into
areaDetector:masterfrom
kgofron:feature/tpx3-4x2-mask-calibration

Conversation

@kgofron

@kgofron kgofron commented Oct 5, 2026

Copy link
Copy Markdown
Member

Summary

  • add an opt-in synthetic TPX3 two-quad 4x2 calibration fixture:
    • 524288-byte BPC
    • DACS sections for chips 0 through 7
    • deterministic generator and CI verification
  • correct eight-chip geometry using captured Serval metadata:
    • RowLen=4 chips across
    • 8 chips in a 4x2 grid
    • 256x256 pixels per chip
    • 1024x512 assembled image
  • implement the captured TPX3 two-quad UP mapping:
    • top row: 2,1,4,7
    • bottom row: 3,0,5,6
  • require two distinct TPX3 quad-board IDs before enabling the mapping
  • fail closed for the separate single-board SpidrTurbo layout
  • preserve the established one-chip and four-chip mapping paths
  • preserve the existing 2x2 calibration as the startup default
  • replace stale global PixelConfig errors after a successful refresh
  • improve Serval layout capture and coordinate-map documentation

Safety and compatibility

The new calibration files are synthetic software/emulator fixtures and are not detector-specific equalization data.

The eight-chip mapping is enabled only for:

  • TPX3
  • eight chips
  • two distinct quad boards with 41... chipboard IDs
  • detector orientation UP

The existing TPX3 quad remains the default configuration. Physical 4x2 qualification, non-UP eight-chip orientations, single-board SpidrTurbo mapping, and generic Timepix4-aware geometry remain deferred.

Runtime qualification

TPX3 two-quad emulator

  • BPC and DACS uploads returned HTTP 200
  • all eight PixelConfig responses decoded to 65536 bytes
  • all eight chips matched their BPC slices with zero mismatches
  • 1024x512 rectangle masking and masked-pixel export operated correctly
  • image accumulation, histogram, preview, and full-width profiles operated correctly
  • successful refresh reported PixelConfig refresh complete.

TPX3 quad regression

  • existing 2x2 BPC and DACS uploads returned HTTP 200
  • all four PixelConfig responses decoded to 65536 bytes
  • all four chips matched with zero mismatches
  • asymmetric mask placement, reset, whole-detector counts, and image accumulation operated correctly

Fresh TPX3 captures confirmed:

Geometry PixCount RowLen Chips Rows Image
Quad 262144 2 4 512 512x512
Two quads 524288 4 8 512 1024x512

Validation

  • full IOC build
  • 358/358 deterministic C++ tests
  • synthetic calibration checksum verification
  • 13 coordinate-map cases passed
  • 5 planned SpidrTurbo cases skipped
  • 55 Phoebus BOB files validated as XML
  • prefix-macro regression validation
  • dependency-report tests
  • capture-script shell syntax
  • REUSE compliance: 398/398 files
  • git diff --check

@kgofron
kgofron merged commit 7c0fbd8 into areaDetector:master Oct 5, 2026
3 checks passed
@kgofron
kgofron deleted the feature/tpx3-4x2-mask-calibration branch October 5, 2026 02:11
@kgofron kgofron mentioned this pull request Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant