Commit Graph
61 Commits
Author SHA1 Message Date
perl_d 0135129c89 fix: as many ruff errors as possible, some type
CI / lint (pull_request) Failing after 33s
CI / test (3.11) (pull_request) Skipped
CI / test (3.12) (pull_request) Skipped
CI / test (3.13) (pull_request) Skipped
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Skipped
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Skipped
CI / test-with-coverage (pull_request) Skipped
2026-08-03 09:27:40 +02:00
perl_d f63107a1e0 style: ruff check --fix --unsafe-fixes 2026-07-31 15:57:17 +02:00
perl_d 7b79dd8ec5 style: remove pointless name-mangled attrs
CI / lint (push) Successful in 30s
CI / test (3.11) (push) Successful in 53s
CI / test (3.13) (push) Successful in 51s
CI / test (3.12) (push) Successful in 56s
the fact that removing them didn't break anything shows that they
were completely unneccessary - there is no inheritance tree
using the same names
2026-07-31 09:45:16 +02:00
perl_d 6affbf9148 style: ruff check --fix --unsafe-fixes 2026-07-27 14:46:06 +02:00
perl_d 910076a238 style: ruff check --fix 2026-07-27 14:45:37 +02:00
perl_d 0451b8cebb style: ruff format 2026-07-27 14:45:12 +02:00
appleb_m 60faea716f chore: removed redundant /camera/source and /beamline/imafge from server.py and test_server.py
Build and Publish / test (pull_request) Failing after 1m23s
Build and Publish / build (pull_request) Skipped
Build and Publish / Build and Deploy Docs (pull_request) Skipped
Build and Publish / test (pull_request_target) Failing after 1m25s
Build and Publish / build (pull_request_target) Skipped
Build and Publish / Build and Deploy Docs (pull_request_target) Skipped
Build and Publish / test (push) Failing after 1m26s
Build and Publish / build (push) Skipped
Build and Publish / Build and Deploy Docs (push) Skipped
2026-07-09 14:50:37 +02:00
perl_d 99326614ae style: ruff check fix 2026-07-06 15:39:02 +02:00
perl_d b0863e5ddb style: format with ruff
Build and Publish / test (pull_request) Failing after 1m23s
Build and Publish / build (pull_request) Skipped
Build and Publish / Build and Deploy Docs (pull_request) Skipped
2026-07-06 11:53:49 +02:00
perl_d 13bddd43c7 refactor: use aarecommon and remove common 2026-07-06 11:53:49 +02:00
appleb_m 4de76d9333 fixed workflows test to use mock_devs.dtz
Build and Publish / test (push) Successful in 2m18s
Build and Publish / build (push) Successful in 17s
Build and Publish / Build and Deploy Docs (push) Successful in 39s
2026-07-03 14:22:11 +02:00
appleb_m 7d20534c60 tell_backend: all exceptions where being caught and squashed/renamed. Hopefully fixed, may lead to strange error behaviours for other fails.
Build and Publish / test (push) Failing after 2m6s
Build and Publish / build (push) Skipped
Build and Publish / Build and Deploy Docs (push) Skipped
2026-07-02 17:37:29 +02:00
GotthardG 51535239d0 adding beam center to raster shots, correcting test logic
Build and Publish / test (push) Successful in 2m7s
Build and Publish / build (push) Successful in 17s
Build and Publish / Build and Deploy Docs (push) Successful in 40s
2026-06-30 15:16:22 +02:00
GotthardG 85d568fe52 adding beam center to raster shots, correcting test logic
Build and Publish / test (push) Failing after 2m3s
Build and Publish / build (push) Skipped
Build and Publish / Build and Deploy Docs (push) Skipped
2026-06-30 15:01:46 +02:00
GotthardG 05bd967733 adding test for rotation screening diffraction image ingestion logic to aaredb and service methods
Build and Publish / test (push) Successful in 2m11s
Build and Publish / build (push) Successful in 18s
Build and Publish / Build and Deploy Docs (push) Successful in 41s
2026-06-29 16:05:05 +02:00
appleb_mandClaude Opus 4.8 b8dd3756cc raster auto-center: allow extra grid padding at the bottom of the y scan
Make the first-grid y padding asymmetric: the bottom (far end of the n_y scan)
can be padded more than the top via daq.auto_raster.grid_padding_fraction_y_
bottom (defaults to grid_padding_fraction_y, so symmetric unless set higher).
The top padding still shifts smargon_top_left; the extra bottom padding only
grows n_y.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 11:08:02 +02:00
appleb_mandClaude Opus 4.8 5377e7d489 raster auto-center: unified first-grid padding in x and y (shifts top-left)
Replace the loop_face-only box padding with a single grid padding applied to
the first auto-center grid scan for any loop box (loop_all or loop_face). It
pads each side by a fraction of the grid size (daq.auto_raster.grid_padding_
fraction_x / _y, default 0.15), with a minimum of one cell per side, and
extends *before* cell 0 too so smargon_top_left shifts outward. Manual grid
(get_ml_bounding_box) is unchanged (grid_padding defaults off).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 10:43:12 +02:00
appleb_mandClaude Opus 4.8 53e29bece3 raster auto-center: zoom-to-fit loop + loop_face padding + optional crystal union
Before the first auto-center raster, zoom so the loop fills at most 1/3 of the
frame, pad loop_face grids, and optionally extend the grid to cover crystals
outside the loop.

- ml_bounding_box: add build_ml_raster_plan() (single prediction via
  predict_all_best) returning the grid request + raw loop_all/loop_face boxes +
  image size. Grid box is loop_face (else loop_all); loop_face is padded by
  daq.auto_raster.loop_face_padding_fraction (15% default); when
  daq.auto_raster.include_crystal is set, the grid is unioned with any crystal
  boxes lying beyond the loop. get_ml_bounding_box (manual button / endpoint)
  is unchanged.
- config: add zoom_for_pixel_to_mm(), the inverse of pixel_to_mm.
- raster service execute_auto_center: after the first detection (reused, no
  re-predict), pick loop_all if detected and not clipped at the frame edge else
  loop_face, compute the zoom that makes its larger side 1/3 of the frame, clamp
  to daq.hardware.zoom_min/max, set zoom and re-expose.
- x06da.yaml: zoom_min/max + daq.auto_raster block.
- tests for box selection, padding, crystal union and the clipped-loop_all rule.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 09:45:43 +02:00
appleb_mandClaude Opus 4.8 ec45bf3729 daq: send commanded dtz (not live readback) to JFJoch/DB + wait for arrival
Build and Publish / test (push) Failing after 2m10s
Build and Publish / build (push) Skipped
Build and Publish / Build and Deploy Docs (push) Skipped
The detector_distance_mm sent to JFJoch and written to the DB came from the
live detector readback (diffraction.dtz_mm) captured before the detector
finished moving, so a scan requested at e.g. 100 mm could be recorded at the
old position (e.g. 800 mm).

- JFJoch + DB now read the validated request target (request.dtz) instead of
  the live diffraction.dtz_mm; diffraction.dtz_mm stays live for the
  local-contact readout.
- jfjoch: raise if request.dtz is unset (setup_datacollection must validate it
  first) instead of silently falling back to the live readback.
- raster + rotation services: wait for the detector to reach request.dtz
  (set_dtz wait=True) right before triggering the scan, since the sa2dc move is
  non-blocking. (Raster setup-before-measure reorder landed earlier in daq.py.)
- tests: request.dtz now required in jfjoch/aaredb tests; xtal-snapshot exposure
  assertion updated to 1 ms.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 16:39:06 +02:00
appleb_mandClaude Opus 4.8 47e05dc28c GUI/DAQ: hutch-safety gating, error pop-ups, and automation pause-and-wait
Fix the GUI pop-up path and add personnel-safety-system (PSS) gating so
door-open / beam-down / shutter-closed conditions are surfaced and acted on.

- exception pop-ups: connect the previously-orphaned http_error signal;
  failed user operations now raise a modal dialog, background/polling errors
  a non-modal banner.
- PSS device (devices/pss_state.py) reading EH1-PSYS PROHIBITED-STATE /
  ALARM-STATE; new critical DoorSafetyError + DOOR_SAFETY_ERROR code.
- mounting service blocks mount/unmount when the hutch is not prohibited or
  an alarm is active; /status now publishes pss_prohibited / pss_alarm.
- GUI blocks manual mount/unmount and the automation Run button immediately
  (pop-up) on door-open, and shows a warning banner while an alarm is active.
- centralise per-action precondition checks (ring current, safety shutter,
  hutch door) into one combined "continue?" dialog with a session-global
  "don't ask again for 1 hour" snooze, applied to all data-collection buttons.
- live automation pauses and auto-resumes on bad conditions (beam, shutter,
  door, robot) with continue-now / stop overrides, gated by a default-on
  "Pause on bad conditions" checkbox replacing the dead CHECK_ENABLED constant.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 15:30:08 +02:00
appleb_m 8be1b0a0b5 tell: added door and remote check. 2026-06-24 15:30:07 +02:00
appleb_m 8869fb26b9 update test cases for workflows, server and daq_server 2026-06-24 15:30:06 +02:00
appleb_m f5f53a29ca operations refactor: standardised operations, added rotation operation, updated tests. 2026-06-24 15:30:04 +02:00
appleb_m 0ad42f7f71 updated workflows test 2026-06-24 15:30:03 +02:00
appleb_m 269174574c removed unused devices, assocaited tests and old sam cam test file 2026-06-24 15:29:54 +02:00
appleb_m 9319f735c2 removed with_retry 2026-06-24 15:29:54 +02:00
appleb_m e95eff9751 tests: refactord tests based on changes to auth and sample info
Build and Publish / test (push) Successful in 1m41s
Build and Publish / build (push) Successful in 18s
Build and Publish / Build and Deploy Docs (push) Successful in 40s
2026-06-10 15:19:53 +02:00
appleb_m 076c796b4d tests: updated tests for new authentication protocols and for new sample short info 2026-06-10 14:27:37 +02:00
appleb_m bd8f66009c DAQ: finish refactor of exception handler, improve mount count fail handling and updated tests 2026-06-09 14:25:37 +02:00
appleb_m c6ee5560a0 EXCEPTION REFACTOR: Large scale exception refactor mdipoint, to be tested. If broken scale back this commit and fix tests 2026-06-03 15:57:26 +02:00
appleb_m b8e31a749d tests: fixing broken tests after refactor 2026-06-03 15:53:29 +02:00
appleb_m f05ab28240 test: corrected test for aaredb to use db_id 2026-06-02 10:27:34 +02:00
appleb_m 63a4058ccb tests: fixed operation tests after refactoring and added runtime state
Build and Publish / test (push) Failing after 1m10s
Build and Publish / build (push) Skipped
Build and Publish / Build and Deploy Docs (push) Skipped
2026-06-02 10:26:42 +02:00
appleb_m 3801c11e8d exception hadnling updates 2026-05-22 18:06:01 +02:00
appleb_m 3654e126e6 tests: more tests 2026-05-22 18:05:46 +02:00
appleb_m 7b504d7f4a tests: updated LC and FD tests 2026-05-22 15:24:57 +02:00
appleb_m f77faef534 tests: fixed tellupdater and workflows tests
Build and Publish / test (push) Successful in 1m39s
Build and Publish / build (push) Successful in 18s
Build and Publish / Build and Deploy Docs (push) Successful in 37s
2026-05-20 15:15:02 +02:00
appleb_m f16316366a DAQ: updated tests and face_dectection service to fix a bug 2026-05-11 16:08:59 +02:00
appleb_m a82a083c67 DAQ: added tell_state handler that creates states based on sse stream from tell in redis. Currently not used in logc, tracking for debugging before implementing. 2026-05-04 17:01:07 +02:00
GotthardG e396b7e6a0 tellupdater.py: writing tell events in redis and updating test cases
Build and Publish / test (push) Successful in 2m21s
Build and Publish / build (push) Successful in 14s
Build and Publish / Build and Deploy Docs (push) Successful in 35s
2026-05-04 11:01:44 +02:00
GotthardG 7d8eedbb12 tellupdater.py: better handling of exceptions and logging for TELL events.
Build and Publish / test (push) Successful in 4m16s
Build and Publish / build (push) Successful in 15s
Build and Publish / Build and Deploy Docs (push) Successful in 35s
2026-05-04 09:17:15 +02:00
GotthardG 501a810c11 tellupdater.py: adding listening to more TELL events 2026-05-04 08:53:47 +02:00
appleb_m 856c2ba34b DAQ/GUI: removed automation workflow manager runner, workflow, models and tidied up GUI/DAQ as it is not in use at the moment. 2026-05-01 16:53:03 +02:00
appleb_m 947e142f6e DAQ/GUI updated: gui session handling in daq and gui so staff can now close erroneous GUIs and see who has the baton. Added tests
Build and Publish / test (push) Successful in 1m26s
Build and Publish / build (push) Successful in 15s
Build and Publish / Build and Deploy Docs (push) Successful in 38s
2026-04-30 14:03:10 +02:00
appleb_m 8cd26d54b7 Face_detection: bug in pytest due to same names, refactored face_detection scripts to be utils in daq/operations/face_detection
Build and Publish / test (push) Successful in 1m20s
Build and Publish / build (push) Successful in 14s
Build and Publish / Build and Deploy Docs (push) Successful in 37s
2026-04-30 13:39:25 +02:00
appleb_m a00f0b3dff DAQ: updated face_detection added operations/face_detection fodler including service and models, new tests of face_detection
Build and Publish / test (push) Failing after 1m4s
Build and Publish / Build and Deploy Docs (push) Has been skipped
Build and Publish / build (push) Has been skipped
2026-04-30 12:44:55 +02:00
appleb_m 07451b5aa3 LOOP_CENTERING: split loop centering from main daq script and add unit tests 2026-04-29 17:23:03 +02:00
appleb_m c1db7a8d8a DAQ: refactored MLBOX and loop_Centering MLBOXTYPe. Loop_centering should no longer move if the only class found is pin, ice or needle. Refactored tests.
Build and Publish / test (push) Successful in 1m18s
Build and Publish / build (push) Successful in 14s
Build and Publish / Build and Deploy Docs (push) Successful in 35s
2026-04-28 15:23:24 +02:00
appleb_m 95384d175a test: fixed bug in workflow test
Build and Publish / test (push) Successful in 1m19s
Build and Publish / build (push) Successful in 16s
Build and Publish / Build and Deploy Docs (push) Successful in 37s
2026-04-28 15:01:58 +02:00
appleb_m 6f44da0078 tests: added tests for aerotech, models, autofocus, automation, beamline, diffraction_geometry, enum_pv, face_detection_find_xtal, jfjoch_client, mlbox, my_motor, spreadsheet_updater and worfkflows
Build and Publish / test (push) Failing after 1m4s
Build and Publish / build (push) Has been skipped
Build and Publish / Build and Deploy Docs (push) Has been skipped
2026-04-28 14:35:54 +02:00