Skip to content

hbtep: add HBT-EP device config (PA1/PA2 arrays)#72

Open
logan-nc wants to merge 1 commit into
developfrom
feature/hbtep-device
Open

hbtep: add HBT-EP device config (PA1/PA2 arrays)#72
logan-nc wants to merge 1 commit into
developfrom
feature/hbtep-device

Conversation

@logan-nc

@logan-nc logan-nc commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds src/magnetics/data/device/hbtep.json so HBT-EP (Columbia's tokamak) is a selectable, tree-based (mdsplus_tree) device alongside DIII-D and NSTX/NSTX-U.

The device-generic data/service layer needs no code changes: /api/devices auto-discovers the file, the toksearch tree path uses each sensor key as the fetch TDI, and device_geom classifies Bp/Br from the sensor-set name (the same path NSTX rides).

What's in the config

  • 96 PA1/PA2 poloidal-array sensors from sensor_info_PA_Nominal.txt (Levesque, 2011-09-14): Cartesian (x,y,z) + unit normals converted to r/z/phi + authoritative theta (and tilt, R0=0.92).
  • Keys are the \TOP.SENSORS.MAGNETIC:PA#_S##{P,R} tree node paths; nodes return calibrated Tesla so gain=na=1; time base is seconds.
  • Sensor sets name the P arrays "Bp" and the R arrays "Br" so the generic classifier tags them; each PA Bp set is a full 32-probe poloidal contour (the SLCONTOUR/MODESPEC shape).
  • first_wall/wall trace the PA1 sensor ring (approximate vessel contour); MDSplus at maxwell.ap.columbia.edu:8003, tree hbtep2.

Tests

Adds tests/test_hbtep_device.py (6 config-only checks: load, node-path keys, Bp/Br classification, two toroidal locations, geometry render + wall). Full suite: 310 passed, 5 skipped; ruff format clean.

Verified (offline)

  • /api/devices lists hbtep with all 7 sensor sets.
  • device_geometry(shot, 'hbtep') → 96 sensors, kinds {Bp, Br}, R ∈ [0.75, 1.08], 33-point wall.

Open TODOs (documented in geometry_note, non-blocking)

  • plasma pointnames (ip/bt/kappa) omitted — only OH_CURRENT's path was known; a wrong guess breaks fetch, and QS's κ-fallback covers absence.
  • Left-handed coordinate caveatphi follows the source (x,y); revisit the sign if a downstream n-number comes out flipped.
  • Live fetch against maxwell.ap.columbia.edu:8003 (on-site/tunneled) not yet exercised.

🤖 Generated with Claude Code

Adds data/device/hbtep.json so HBT-EP is a selectable, tree-based
(mdsplus_tree) device alongside DIII-D and NSTX. The device-generic
data/service layer needs no code changes: /api/devices auto-discovers it,
the toksearch tree path uses each sensor key as the fetch TDI, and
device_geom classifies Bp/Br from the sensor-set name.

The 96 PA1/PA2 poloidal-array sensors come from sensor_info_PA_Nominal.txt:
Cartesian (x,y,z) + unit normals converted to r/z/phi + authoritative
theta (and tilt). Keys are the \TOP.SENSORS.MAGNETIC:PA#_S##{P,R} tree
node paths; nodes return calibrated Tesla so gain=na=1; time base is
seconds. Sensor sets name the P arrays "Bp" and the R arrays "Br" so the
generic classifier tags them; each PA Bp set is a full 32-probe poloidal
contour (the SLCONTOUR/MODESPEC shape). first_wall/wall trace the PA1
sensor ring. plasma pointnames are omitted until confirmed on a live tree.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
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