Skip to content

feat(cdi): scaffold NSLS-II CDI (9-ID) coherent diffractive imaging deployment, reverse-engineered#396

Merged
xmap merged 3 commits into
mainfrom
worktree-cdi-deployment
Jun 26, 2026
Merged

feat(cdi): scaffold NSLS-II CDI (9-ID) coherent diffractive imaging deployment, reverse-engineered#396
xmap merged 3 commits into
mainfrom
worktree-cdi-deployment

Conversation

@xmap

@xmap xmap commented Jun 26, 2026

Copy link
Copy Markdown
Owner

What

Scaffolds the NSLS-II CDI deployment (beamline 9-ID), CORA's first dedicated coherent diffractive imaging beamline: forward CDI, ptychography, and Bragg CDI on a KB-nanofocused coherent beam recorded by Eiger2 + Merlin photon-counting detectors, with offline phase retrieval. Reverse-engineered from public open source updated today: NSLS2/cdi-profile-collection startup scripts and the NSLS2/cditools device classes. Descriptor + docs scaffold; scenarios deferred; every value carried confirm.

Follows the established CHX / HXN reverse-engineered-scaffold pattern.

Name guard

This is NSLS-II 9-ID, distinct from the existing APS 9-id (CSSI surface-scattering) deployment: different facility, different PV namespace (XF:09ID* / SR:C09-ID*). The descriptor and site.yaml comment carry the guard; APS 9-ID's coherent_surface_scattering / grazing_incidence_scattering pending Methods are left untouched.

Modelling

  • Zero new catalog families, nothing graduates, catalog unchanged. Area detectors + cameras to Camera; KB pair + pre-mirrors to Mirror; Si DCM + multilayer DMM to Monochromator; sample stack to Goniometer; foil monitor to FluxMonitor; slits to Slit; foils to Filter; undulator to InsertionDevice; energy to PseudoAxis; towers to LinearStage. Loose BeamPositionMonitor (held) and StorageRing (supply), both already allowed.
  • Methods deferred, no Practice recorded (TECH-1), following 8-ID / CHX (coherent) and HXN (ptychography). Reconstruction is a ComputePort leg, not a Method.
  • Distinctive honest gap: the profile collection exposes no hardware trigger box (no Zebra / PandA, no shutter PVs), carried as the headline TIMING-1 question, modelled by what is real (the detector trigger modes), not invented.

Files

  • New descriptor deployments/cdi/beamline.yaml (23 devices, verified PVs).
  • New docs docs/deployments/cdi/ (10 authored pages + generated beamline.md).
  • Wiring: site.yaml beamline list + no-Practice comment, mkdocs.yml nav, docs/deployments/index.md row, BeamPositionMonitor promotion-review note.

Verification

  • 389 deployment unit tests pass; mkdocs build --strict builds clean; no em dashes / non-ASCII.
  • Adversarial per-file verification workflow (11 independent verifiers vs the cloned source): 8 clean, 4 correctness findings, all real over-specifications (non-existent KB bend axis, DMM mlm1/mlm2 mislabeled as stripe selectors, a stale "deferred xpcs" that has graduated, an invented "piezo" actuator) corrected and re-gated.

🤖 Generated with Claude Code

xmap and others added 3 commits June 26, 2026 17:27
…ve imaging: forward CDI, ptychography, Bragg CDI on a KB nanofocus), reverse-engineered

CDI is the NSLS-II coherent-imaging beamline at sector 9-ID: it focuses a coherent
beam with a Kirkpatrick-Baez mirror pair, records the far-field diffraction pattern
on photon-counting area detectors (Eiger2, Merlin), and recovers the real-space image
offline by phase retrieval. Reverse-engineered from public open source updated today
(NSLS2/cdi-profile-collection startup scripts + the NSLS2/cditools device classes).
Descriptor + docs scaffold; EPICS PVs real and read from source, every value carried
confirm; scenarios deferred. Same mode as CHX / HXN.

NAME GUARD. This is NSLS-II 9-ID. CORA already models APS 9-ID (the CSSI surface-
scattering instrument, deployments/9-id), a different beamline at a different facility
with a different PV namespace. CDI lives at XF:09ID* / SR:C09-ID*. The descriptor and
the site.yaml comment carry this guard so the two 9-IDs are never conflated, and the
APS-9-ID coherent_surface_scattering / grazing_incidence_scattering pending Methods are
left untouched.

WHY no catalog change, and where the value is. The instrument is NOT the novelty: CDI
is a reuse-and-reinforce deployment with zero new families and nothing graduating. The
coherent area detectors reuse Camera (the Eiger-to-Camera precedent, also CHX / HXN);
the KB nanofocus pair and the vertical / horizontal pre-mirrors reuse Mirror (the FMX /
SRX KB precedent); the silicon DCM and the double-multilayer DMM both reuse
Monochromator (the CHX Si-DCM-plus-multilayer-DMM precedent); the sample stack reuses
Goniometer; the foil intensity monitor FluxMonitor; the white-beam / branch / beam-
conditioning slits Slit; the attenuator foils Filter; the undulator InsertionDevice;
the master energy a PseudoAxis; the endstation towers LinearStage. The quadrant and
diamond beam-position monitors bind the loose BeamPositionMonitor (held; DIAG-1) and the
machine reads a loose StorageRing supply (MACHINE-1). The value to CORA is reinforcement:
the coherent-detector shape CHX brought and the deferred ptychography HXN brought port to
a beamline dedicated to phase-retrieval imaging with no new vocabulary.

MODELLING: zero new families, nothing graduates, the catalog is unchanged. The coherent-
imaging Methods (forward CDI, ptychography, Bragg CDI) are NOT coined: following 8-ID /
CHX (coherent) and HXN (ptychography deliberately not coined; the reconstruction is
ComputePort work, not a Method), they are the deferred owner-scope cohort (TECH-1), so no
CDI Practice is recorded. CDI's distinctive honest gap is that the profile collection
exposes no hardware trigger box (no Zebra / PandA startup file, no shutter PVs); the
Eiger2 / Merlin carry internal and external trigger modes, but the floor gating chain is
the headline open question (TIMING-1), modelled by what is real, not invented.

Wiring: CDI added to the NSLS-II Site beamline list (no Practice, comment explains why);
deployments index row; mkdocs nav block; the BeamPositionMonitor promotion-review note
broadened to + cdi. Gate: 389 deployment unit tests pass, mkdocs --strict builds clean,
adversarial per-file verify (11 independent verifiers vs the cloned source) caught four
over-specifications (a non-existent KB bend axis, the DMM mlm1/mlm2 mislabeled as stripe
selectors, a stale "deferred xpcs" since graduated, an invented "piezo" actuator), all
corrected and re-gated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rences

The CDI governance page cites (GOV-1) and the descriptor references MACHINE-1 (the
loose StorageRing supply readback) three times, but questions.md carried neither row,
so both citations pointed nowhere. Every other NSLS-II deployment that binds a
StorageRing or cites GOV-1 surfaces these rows; add them to match, keeping the
delete-on-answer queue resolvable. Surfaced by the adversarial per-file verification
on the PDF twin.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolve the append-only conflicts (NSLS-II beamline list, mkdocs nav, deployments
index row, the FlowController/BeamPositionMonitor promotion-review notes) against the
current main, which has advanced to ISR (#399).

Reconcile CDI against i13-1 (#398, merged after CDI was opened): i13-1 is the fleet's
first coherent diffractive imaging and coined the pending ptychography Method. CDI no
longer claims "first"; it is the second coherent-imaging deployment and the first at
NSLS-II / first full source-to-detector one, reinforcing i13-1's pending ptychography
Method (ptychography reuses it; forward / Bragg CDI are its single-shot variants, not
separately coined). No Practice recorded (CHX discipline). Gate: 424 deployment tests
pass, mkdocs --strict clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

@xmap xmap merged commit 21190fb into main Jun 26, 2026
16 checks passed
@xmap xmap deleted the worktree-cdi-deployment branch June 26, 2026 20:23
xmap added a commit that referenced this pull request Jun 26, 2026
Resolve the NSLS-II beamline list, mkdocs nav, deployments index, and practices-comment
conflicts against current main (now at ISR #399 + CDI #396); PDF appends after CDI. No
content reconciliation needed: PDF is high-energy total scattering, unrelated to the
coherent-imaging cohort. Gate: 431 deployment tests pass, mkdocs --strict clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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