Commit Graph
645 Commits
Author SHA1 Message Date
menzelandClaude Opus 4.8 e71f2df284 refactor(smargon): per-axis motors + shared controller (smaract pattern)
Expose each SCS axis as its own top-level BEC motor sharing a singleton
SmargopoloController per host:port, plus a thin `dev.smargon` coordinator for
whole-goniometer ops. Replaces the single-device-with-axis-subcomponents design.

Why: BEC's motor UX (dev.wm, umv, limits, GUI motor widgets) is keyed on
top-level devices. With sub-components, dev.wm showed `readback N/A` (it looks up
a key equal to the device name) and `limits [0,0]` (the client reads limits from
the root device's low/high_limit_travel signals). General, not a sim artifact.

- controller.py: SmargopoloController(OphydObject), singleton per (host,port,sim);
  owns transport + lock + mode; referencing / move_scs / nudge / q1..q6 diagnostics.
  Reachable as dev.<axis>.controller.<op>() (USER_ACCESS).
- positioner.py: SmargopoloMotor(Device, PositionerBase) -- top-level per-axis motor.
  scs_axis field binds the (user-chosen) BEC name to the fixed SCS axis. Exposes
  low/high_limit_travel signals and aliases readback to the device name, so dev.wm
  shows real per-axis readback + limits (low==high => unbounded). egu auto from axis.
- smargon.py: SmarGon(PSIDeviceBase) reduced to a thin coordinator delegating to the
  shared controller; keeps read-only mode/rosout signals.
- YAML: smargon.yaml + smargon_sim_session.yaml rewritten to per-axis entries
  (sgx/sgy/sgz/sgchi/sgphi[/sgomega]) + coordinator. Names user-configurable; SCS
  binding explicit via scs_axis.
- transport/ layer + fake unchanged. Tests rewritten: 29 pass vs FakeTransport
  (singleton reset fixture; covers sharing, wm readback aliasing, limits, fault paths).

Still DRAFT / untested against hardware.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 14:19:24 +02:00
menzelandClaude Opus 4.8 d754b18cc7 feat(smargon): ground SCS limits + host guidance from MX-lab reference client
CI for csaxs_bec / test (push) Failing after 1m26s
resources_2/Smargon.py (the MX-lab SmarGonController) gives real per-axis SCS
limits and the server hostname convention. Update smargon.yaml:
- SHX/SHY [-2,2], SHZ [10,22] (home ~18, not centred on 0), CHI [0,65],
  PHI [-180,180]  (was placeholder [-2.5,2.5] for the SH axes; SHZ was wrong).
- host: note it must be the actual reachable server (ref used mxlab1-smargopolo).
- Note PHI is continuous and the reference client wraps to [-180,180) before
  sending -- flagged as an open design question, not yet handled here.

Still DRAFT / untested against hardware.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 11:24:27 +02:00
menzelandClaude Opus 4.8 91749de6c0 feat(smargon): scaffold SmarGon goniometer device (DRAFT, untested vs hardware)
Initial BEC ophyd integration for the SmarGon goniometer via the smargopolo
RESTful API. Controls the virtual SCS axes (the server runs the kinematics; the
underlying q1..q6 stages are never commanded directly). Structure mirrors the
Canon CR-N300 device: an ophyd-free transport (real RestTransport over urllib +
in-memory FakeTransport) with threaded poll-to-tolerance positioners and a
PSIDeviceBase parent.

Scope / decisions:
- v1 movable axes: SHX SHY SHZ CHI PHI; OMEGA optional via has_omega (YAML).
- Referencing is a deliberate operator action (reference()); moves refuse unless
  Mode.READY.
- Soft limits are user-set; smargopolo owns the coupled hardware limits. Both
  fault paths handled: up-front PUT rejection fails the move immediately, and a
  mid-move fault (mode -> 99 ERROR) aborts the in-flight move with the rosout
  detail (SmarGon._raise_if_error).
- Move completion = readback within (user-set) tolerance, done on first
  in-tolerance sample (robust to active position-hold dither).

Status: DRAFT. 27 unit tests pass against FakeTransport, but NOTHING has been
tested against a real smargopolo server or hardware. Do not commission as-is.

Open questions (to confirm with the smargopolo maintainer, W. Glettig):
- Stop semantics: no explicit stop endpoint; we abort by retargeting an axis to
  its current readback ("Follow Target" halt). Confirm this is the intended way.
- Mid-move fault signalling: we rely on /mode -> 99 (ERROR) with the reason in
  /readbackMCS rosout.msg. Confirm an out-of-range / coupled-limit violation
  reliably drives this, so the abort path is dependable.
- Per-poll cost: the mid-move check adds a /readbackMCS GET alongside the
  /readbackSCS position read (~20 req/s per moving axis at 0.1s). Revisit once we
  know whether /readbackSCS also carries mode, or once the per-motor `state`
  strings can give a truer moving/settled flag.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 15:57:31 +02:00
wakonig_kandappel_c 00651450d0 feat: add machine config
CI for csaxs_bec / test (pull_request) Successful in 1m32s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 1m30s
2026-06-16 16:27:01 +02:00
appel_c cb0d4cf999 test(eiger): skip on_connected du to change of config to 8_5M from 9M
CI for csaxs_bec / test (pull_request) Successful in 1m31s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 1m34s
2026-06-16 16:22:20 +02:00
x12sa c1619111cf refactor(bl-optics): adapt bl_optics_hutch
CI for csaxs_bec / test (push) Failing after 1m26s
CI for csaxs_bec / test (pull_request) Failing after 1m27s
2026-06-16 15:58:09 +02:00
x12sa 36536eefc4 fix(config-main): move devices from main to user_setup.yaml 2026-06-16 15:57:37 +02:00
x12sa efcf9b3f3e fix(eiger): move eiger to use config for 8.5M
CI for csaxs_bec / test (push) Failing after 1m26s
CI for csaxs_bec / test (pull_request) Failing after 1m28s
2026-06-16 15:54:52 +02:00
x12sa c7fd2f1435 fix(ddg1): fix flaky state check of mcs card
CI for csaxs_bec / test (pull_request) Successful in 1m31s
CI for csaxs_bec / test (push) Successful in 1m39s
2026-06-16 11:57:16 +02:00
appel_c e86a17dce1 fix(cont-grid): fix progress updates for cont grid scan
CI for csaxs_bec / test (push) Successful in 1m33s
CI for csaxs_bec / test (pull_request) Successful in 1m30s
2026-06-16 08:52:52 +02:00
x12sa d98657149d wip from beamline
CI for csaxs_bec / test (push) Successful in 1m32s
CI for csaxs_bec / test (pull_request) Successful in 1m31s
2026-06-15 16:32:38 +02:00
appel_c 93d7e1662a refactor: migrate devices to new scan_info from scan_server
CI for csaxs_bec / test (push) Successful in 1m30s
CI for csaxs_bec / test (pull_request) Successful in 1m30s
2026-06-15 15:52:11 +02:00
appel_c 0aabd49ed1 refactor: migrate devices to new scans_v4 structure 2026-06-15 15:52:11 +02:00
appel_c 6dc3c13137 fix: cont_grid scan fixes 2026-06-15 15:52:11 +02:00
appel_c 7a4c19f38f feat(utils): add utils to migrate previous scan_info to scans_v4 scan_info 2026-06-15 15:52:10 +02:00
appel_c 20b892f990 refactor(ddg): add user access method to ddg 2026-06-15 15:52:10 +02:00
appel_c adcd7b14cf feat(cont_grid): add continuous grid scan 2026-06-15 15:52:10 +02:00
appel_c f964a3ee7b test: skip test_on_complete_error_message
CI for csaxs_bec / test (pull_request) Successful in 1m33s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 1m31s
2026-06-15 15:49:28 +02:00
x12sa d8344064a0 add update to main with eiger added
CI for csaxs_bec / test (push) Failing after 1m26s
CI for csaxs_bec / test (pull_request) Failing after 1m25s
2026-06-15 15:40:43 +02:00
x12sa 8c83d84eaa add eiger9 in to config 2026-06-15 15:40:05 +02:00
x12sa 3daadddb20 adding some user parameters 2026-06-15 15:39:17 +02:00
x12sa 8ebf81f06b fix(eiger): migrate eiger integration to jfjoch-client.rc148
CI for csaxs_bec / test (push) Failing after 1m27s
2026-06-15 10:48:08 +02:00
x12sa 820e22a2d4 small changes for readout signals 2026-06-12 10:23:25 +02:00
x12sa 6f37c56547 patch for Smaract controller in optics hutch
CI for csaxs_bec / test (push) Successful in 1m35s
2026-06-08 16:52:53 +02:00
x12sa f04aacff8c change slit names according to convention
CI for csaxs_bec / test (pull_request) Successful in 1m39s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 1s
CI for csaxs_bec / test (push) Successful in 1m41s
2026-06-08 13:34:17 +02:00
x12sa a0068a8ecd implement 2 sets of slits in optics hutch
CI for csaxs_bec / test (push) Successful in 1m36s
2026-06-08 13:31:33 +02:00
wakonig_k 8e65116b08 fix(dependencies): pin cbor2 version to 5.9.0
CI for csaxs_bec / test (pull_request) Successful in 1m30s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 1m30s
2026-06-02 17:01:48 +02:00
x12sa 2f5ab3079a changed the readoutPriority for galilrioesxbox, gain_bpm_xbox2, and gain_bim_xbox3 to baseline
CI for csaxs_bec / test (pull_request) Successful in 1m32s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 1m32s
2026-06-02 15:34:54 +02:00
x12sa 404d28a7ba Update configs for beam intensity monitor Xbox3
CI for csaxs_bec / test (push) Successful in 1m32s
2026-06-02 15:12:41 +02:00
x12sa 9fe4acdd94 update configuration of smaract in optics hutch and experimental hutch. Correct some parameters in the readout of XBPMs
CI for csaxs_bec / test (push) Successful in 1m34s
2026-06-02 13:04:59 +02:00
x12sa d0e6414795 fix(bpm): fix kind types for bpm devices.
CI for csaxs_bec / test (pull_request) Successful in 1m35s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 1m31s
2026-06-01 09:52:36 +02:00
x12sa 46c1ddb64d add micro-stepping card and IDS camera examples in user_template.yaml
CI for csaxs_bec / test (push) Successful in 1m37s
CI for csaxs_bec / test (pull_request) Successful in 57m52s
2026-05-28 16:08:34 +02:00
wyzula_j 541c3829b1 fix(x_ray_eye): disabled cleanup turn off the live mode
CI for csaxs_bec / test (pull_request) Successful in 1m30s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 1m36s
2026-05-20 18:57:29 +02:00
wyzula_j 71946e1c79 fix: fetch the status of the queue in next event loop 2026-05-20 18:55:52 +02:00
wyzula_j a568656389 fix: disable controls for device input and toggles 2026-05-20 18:55:52 +02:00
wyzula_j 32034a7c59 fix: subscribe dap updates before align and unsubscribe after align is done 2026-05-20 18:55:52 +02:00
wyzula_j 480ff259dc fix: remove .wait() from omny_xray_gui in on_dap_params in gui 2026-05-20 18:55:52 +02:00
perl_d b0ba9532a5 Updating to template version 1.4.0
CI for csaxs_bec / test (pull_request) Successful in 1m39s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 3s
CI for csaxs_bec / test (push) Successful in 1m36s
2026-05-20 11:00:26 +02:00
perl_d ca8008a533 Updating to template version 1.3.2
CI for csaxs_bec / test (pull_request) Successful in 1m34s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 3s
CI for csaxs_bec / test (push) Successful in 1m31s
2026-05-20 10:39:09 +02:00
x12sa bde111f995 reset tracker if not reach target
CI for csaxs_bec / test (pull_request) Successful in 1m34s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 1m34s
2026-05-19 10:58:39 +02:00
x12saandwakonig_k 5f63f47a30 fix reading phase
CI for csaxs_bec / test (pull_request) Successful in 1m33s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 1m35s
2026-05-18 15:35:17 +02:00
x12saandwakonig_k eb7618b1b8 ensure tracker thread in galil running 2026-05-18 15:35:17 +02:00
x12saandwakonig_k a2424f5867 write ptycho alignment scan info for matlab 2026-05-18 15:35:17 +02:00
x12saandwakonig_k 1c6323b51e ignore zmq preview error 2026-05-18 15:35:17 +02:00
x12saandwakonig_k 561fa12538 used cached values. and poll javascript allow failed polls 2026-05-18 15:34:16 +02:00
appel_c a3b1a4eb2f test(eiger): fix test with broker
CI for csaxs_bec / test (pull_request) Successful in 1m31s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 1m34s
2026-05-18 09:13:56 +02:00
appel_candCopilot d8ab6d56f3 fix(eiger): Fix on_complete from eiger to respect message_severity of JFJ broker status
CI for csaxs_bec / test (pull_request) Failing after 1m27s
CI for csaxs_bec / test (push) Failing after 1m28s
Co-authored-by: Copilot <copilot@github.com>
2026-05-18 08:45:37 +02:00
appel_c ee0451d80b fix(jungfraujoch-preview): fix error handling for jungfraujoch preview client.
CI for csaxs_bec / test (pull_request) Successful in 1m39s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 1m34s
2026-05-16 10:09:47 +02:00
x12saandholler 86fde7ca17 path adjustment
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 4s
CI for csaxs_bec / test (push) Successful in 1m35s
2026-05-15 10:56:01 +02:00
x12saandholler ed2c67a09e fix: enable movements and fix scilog_content printout 2026-05-15 10:56:01 +02:00