Commit Graph
82 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 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
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
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 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 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
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
wakonig_kandappel_c f388d038db fix: initialize setpoint to 0.0 and update from readback after connection
CI for csaxs_bec / test (pull_request) Successful in 2m9s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 2m0s
2026-04-22 17:24:08 +02:00
appel_c 5917cc2b1d test: fix instruction message for lamni scan 2026-04-21 16:11:48 +02:00
wakonig_k 31d9ba3c69 chore: remove deprecated scan motors from test
CI for csaxs_bec / test (pull_request) Successful in 2m7s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 2m1s
2026-04-21 13:39:58 +02:00
wakonig_k fc11a6067b fix(smaract): ensure setpoint is in sync after restart
CI for csaxs_bec / test (push) Successful in 1m59s
CI for csaxs_bec / test (pull_request) Successful in 2m0s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
2026-04-09 13:55:25 +02:00
appel_candx12sa 6a704c6dd0 test: add tests for bpm and bpm_control
CI for csaxs_bec / test (pull_request) Successful in 2m0s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 1s
CI for csaxs_bec / test (push) Failing after 1m25s
2026-03-31 14:25:16 +02:00
wyzula_jandappel_c 6d404cad12 fix(omny/shutter): MonitorSignal wrapper with auto_monitor
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 1s
CI for csaxs_bec / test (push) Successful in 1m57s
2026-03-27 22:41:57 +01:00
appel_c 6d4c9d90fc fix(mcs): omit_mca_callbacks if stop is called. 2026-03-19 11:11:54 +01:00
appel_c 7c89086ba2 fix(ddg): Fix tests
CI for csaxs_bec / test (pull_request) Successful in 1m56s
CI for csaxs_bec / test (push) Successful in 1m57s
2026-03-13 14:19:41 +01:00
wyzula_j be9938ddb7 fix(camera): unify the live mode on cameras 2026-03-11 16:09:39 +01:00
wakonig_k 6873ef8287 test: fix lamni test
CI for csaxs_bec / test (pull_request) Successful in 1m56s
CI for csaxs_bec / test (push) Successful in 1m58s
2026-03-06 15:11:28 +01:00
appel_c 0f072a786e test: add tests for panda, fix tests for fermat scan
CI for csaxs_bec / test (pull_request) Successful in 1m56s
CI for csaxs_bec / test (push) Successful in 1m55s
2026-03-02 13:15:53 +01:00
wyzula_j bc31c00e1f fix(tests): x_ray_eye_align correct imports fixed after refactor of LamNI
CI for csaxs_bec / test (pull_request) Successful in 1m36s
CI for csaxs_bec / test (push) Successful in 1m37s
2026-02-23 13:25:09 +01:00
appel_c 93384b87e0 fix(readback-timeout): fix monkeypatch for readback timeout; closes #140
CI for csaxs_bec / test (push) Failing after 1m29s
CI for csaxs_bec / test (pull_request) Failing after 1m29s
2026-02-16 17:38:10 +01:00
appel_c 9a249363fd refactor(galil-rio): fix socket-signal cached readings 2026-02-16 17:38:10 +01:00
appel_c 5811e445fe tests: fix tests after refactoring 2026-02-16 14:57:02 +01:00
appel_c 16ea7f410e feat(galil-rio): Add di_out channels to GalilRIO 2026-02-16 14:57:02 +01:00
appel_c 9db56f5273 refactor: Eiger refactoring, fix test and add docs.
CI for csaxs_bec / test (pull_request) Successful in 1m34s
CI for csaxs_bec / test (push) Successful in 1m33s
2026-02-16 14:13:55 +01:00
appel_candgitadmin 501bc52867 fix(eps): Fix tests and eps integration 2026-02-16 12:33:15 +01:00
appel_candgitadmin f35c51efa7 test(eps): Add tests for EPS device 2026-02-16 12:33:15 +01:00
appel_c 5784331073 test(conftest): Add monkey patch for SocketSignal Readback_Timeout
CI for csaxs_bec / test (push) Successful in 1m35s
2026-02-16 11:10:47 +01:00
appel_c 75cc672f08 tests: fix tests for ddg1
CI for csaxs_bec / test (push) Successful in 1m32s
CI for csaxs_bec / test (pull_request) Successful in 1m31s
2026-02-11 11:50:22 +01:00
appel_c 6fad4f2034 fix(fast-shutter): Fix cSAXS fast shutter device
CI for csaxs_bec / test (push) Failing after 1m30s
CI for csaxs_bec / test (pull_request) Failing after 1m30s
2026-02-09 08:29:08 +01:00
appel_c 82d47c7511 feat(galil-rio): Add GalilRIO device with 8 analog channels
CI for csaxs_bec / test (pull_request) Successful in 1m28s
CI for csaxs_bec / test (push) Successful in 1m30s
2026-01-29 08:20:38 +01:00
appel_c 153e6a89a4 test: add test for controller to call destroy controller.off
CI for csaxs_bec / test (push) Successful in 1m32s
2026-01-26 07:45:01 +01:00
appel_c 11c887b078 feat(debug-tools): add debug tools and adjust logic from beamline tests
CI for csaxs_bec / test (pull_request) Successful in 1m27s
CI for csaxs_bec / test (push) Successful in 1m30s
2026-01-23 15:00:35 +01:00
appel_c 146b10eb85 tests: fix tests for ddg and mcs integrations 2026-01-23 13:29:43 +01:00
appel_c 188e23df48 fix: Fix MCS card and DDG implementation after testing with hardware at cSAXS 2026-01-23 13:29:43 +01:00
appel_c 2cf2f4b4e4 test(controller): Fix test for controller wait_for_connection
CI for csaxs_bec / test (pull_request) Successful in 1m16s
CI for csaxs_bec / test (push) Successful in 1m26s
2026-01-16 10:52:24 +01:00
appel_c 1a9a0beb86 fix(controller): Ensure wait_for_connection calls controller.on()
CI for csaxs_bec / test (push) Successful in 1m13s
CI for csaxs_bec / test (pull_request) Successful in 1m19s
2026-01-15 18:09:34 +01:00
appel_c 7326c471f8 test(falcon): fix test for improved patched_device method in ophyd_devices
CI for csaxs_bec / test (pull_request) Successful in 1m19s
CI for csaxs_bec / test (push) Successful in 1m18s
2026-01-07 11:17:50 +01:00
appel_c 4b95ebace3 test(falcon): fix test after falcon refactoring 2026-01-07 11:17:50 +01:00
appel_c c1dee287b8 refactor(falcon): Migrate Falcon integration to PsiDeviceBase 2026-01-07 11:17:50 +01:00
appel_c dd3b0144b9 feat(pilatus): deprecate pilatus integration 2026-01-07 11:17:50 +01:00
appel_c 0f41648053 test(rt-flomni): fix tests for rt-flomni
CI for csaxs_bec / test (pull_request) Successful in 1m25s
CI for csaxs_bec / test (push) Successful in 1m35s
2025-12-09 16:51:24 +01:00
appel_c 36e8d87411 refactor(controller): refactor set_device_enable method from controller to set_device_read_write 2025-12-09 16:34:53 +01:00
appel_c f56a834db5 fix(controller): fix controller init for all controller instances, fix formatting 2025-12-09 16:34:53 +01:00
x01dcandwyzula_j de22611941 refactor(ids_camera): old ids_camera deleted, ids_camera_new is now ids_camera 2025-10-23 14:39:59 +02:00
appel_c 2bb6667f30 test(eiger): cleanup and add tests
CI for csaxs_bec / test (push) Failing after 34s
2025-09-17 17:40:43 +02:00
appel_c 419d15dcdb fix(mcs-card): fix mcs card test for on_connected 2025-09-17 17:40:43 +02:00
appel_c 9f5254abe2 refactor(ddg): cleanup and improve comments 2025-08-06 13:43:54 +02:00
appel_c c7e11eeabc refactor(ddg): use threadpool with active polling for state 2025-08-05 16:11:56 +02:00
appel_c a03e99d615 refactor(ddg): passiv readout of event_status register 2025-08-05 12:31:54 +02:00
appel_c 9e45e927a0 test(ids-camera): add tests for the IDSCamera integration 2025-08-05 12:31:13 +02:00