39 Commits
Author SHA1 Message Date
John Henry BealeandClaude Opus 5.5 fd47942303 fix mode 5/7 collection: TypeError from a float tmove
fel_per is a float (10.0): tmove=10.0 gave wait_pulses=twait//tmove=1.0,
used to repeat the CTA lists ('can't multiply sequence by non-int').
tmove is now written as int when fel_per is whole, and wait_pulses is
cast to int.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 10:18:27 +02:00
John Henry BealeandClaude Opus 5.5 ba58eb8be1 twait in ms (multiples of the FEL period), fixed tmove kept in the parameters
- mode 7 uses tmove/twait in ms like mode 5 (shapepath divides by fel_per,
  its 'shots' doc is wrong): tmove is fel_per for both (was 1 for mode 7)
- wait field in ms, steps of fel_per, typed values snapped to a multiple
- the panel writes the fixed tmove into the parameter text, add obj and
  update param set it too (fix_motion_param), so it shows in the object
  information; the collection still enforces it
- warning when the text has another tmove or a twait that is not a
  multiple of it; a saved text gets the fixed tmove at startup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 08:50:28 +02:00
John Henry BealeandClaude Opus 5.5 6c898059fd chip type, motion, delay and run time on the experimental parameters page
- chip type (same selection as the Fix Target type), motion mode 4..7,
  wait in pulses (mode 5/7) and section size (mode 6/7): these edit their
  keys in the Fix Target parameter text box and follow it when typed;
  text box and chip type are kept in the settings
- tmove is fixed to one FEL pulse (fel_per ms for mode 5, 1 shot for
  mode 7): not editable, set at the collection for every object
- the collection refuses objects with a mode other than 4..7
- laser delay PV readback and the calculated laser to X-ray delay
- estimated run time of the chip from the CTA sequence lengths
  (motion_run_pulses), including the checks that would abort it
- orange warning for twait not a multiple of tmove or an invalid ssz
- ModuleFixTarget: parse_param/format_param for the parameter text

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 08:36:07 +02:00
John Henry BealeandClaude Opus 5.5 4be0f03437 record chip type, motion mode and laser delay in the JFJ header
- header_appendix: chip_type, motion_mode, motion_param, fel_per_ms,
  delay_pulses, laser_delay_ns and total_delay_ns, taken from the job
  that actually runs (Jungfrau.config), not from the GUI
- laser delay read from SLAAR03-LTIM-PDLY:DELAYNS_SLOW (ns, negative:
  laser before the X-rays); total = laser - delay_pulses * fel_per;
  trigger_delay now holds the total delay
- motion_delay_pulses(): trigger to X-ray pulses per mode, same rules as
  the CTA sequences (mode 6/7 nominal)
- remove the unused manual laser_delay from the run parameters
- fix laser_pulse_energy, which was written with the trigger delay

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 08:24:38 +02:00
John Henry BealeandClaude Opus 5.5 2d9bbdac9d replace runtime print statements with logging
- all print calls outside the __main__ test blocks are now log calls:
  info for run information (CTA configuration summary on one line, run
  number, CTA start pid), warning/error for aborts and failures, debug for
  dumps (object/transform info, autofocus measurements, logger tree)
- psi_device: remove the import-time logging.basicConfig(level=DEBUG) and
  print('past logging'); the standalone test configures logging itself
- startup import timings are logged at info level
- ctadaq added to the -l log level list

Prints from PBTools/PBSwissMX, slic and the JFJ client are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:56:49 +02:00
John Henry BealeandClaude Opus 5.5 14b3300ec6 stop the CTA and cancel JFJ on abort, keep data up to the abort
Before, an abort stopped motion and shutter only: the CTA sequence (detector,
x-ray shutter, laser triggers), the BS/PV retrieval and JFJ kept running to
the planned end of the run.

- CTAAcquisition.abort(stop_pid): stops the CTA sequence; the retrieval loop
  ends early and retrieves the following blocks cut at the abort pulse id
  (the retrieval lags the pulses by about one block) until a block is empty
- Jungfrau.stop_triggers(): reads the current pulse id and aborts the CTA
  acquisition (or stops a plain SFAcquisition task)
- Jungfrau.cancel(): JFJ cancel_post, then wait (max 60s each) for the data
  retrieval to finish and JFJ to be idle
- worker: request_abort closes the shutter first (Shutter.close caput
  sequence), then stops the CTA immediately; cleanup stops the CTA again,
  recovers the motion, then cancels JFJ and waits
- Shutter reads sync_flag from the preferences at each open/close instead
  of once at startup

Tested at the beamline (run 72): BS/PV data and JF images end at the abort
pulse id, motion recovered, JFJ idle afterwards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 08:27:13 +02:00
John Henry Beale 02d6ebf74d cleaned yp mode:7 cta seq. Now runs on large chip 2026-08-25 12:50:52 +02:00
John Henry Beale 04fc647c65 updated mode:7 cta sequence 2026-08-25 11:37:08 +02:00
John Henry Beale 678b5990ea added new field to Data Storage - Data path of last run 2026-08-24 12:22:56 +02:00
John Henry Beale fbe9611dfd update mode 6 start logic. Now allows x sizes of greater 2, but must be positive and even. 2026-06-15 08:23:38 +02:00
John Henry Beale 1552e86034 more updates to enable correct BS syncing 2026-06-12 09:47:12 +02:00
John Henry Beale 9009258667 new logic for entry into modes 6 and 7. x and y limits of the modes 2026-06-12 08:40:06 +02:00
John Henry Beale e5f96e8cb4 new BS logic for modes 6 and 7 2026-06-12 08:39:33 +02:00
John Henry Beale 1170855557 proposed change to mode 6 and 7 so that BS data stays in-sync 2026-06-12 08:15:43 +02:00
John Henry Beale 1406dd6f9b fixed BS data via slic for modes 4 and 5 2026-06-11 15:55:47 +02:00
John Henry Beale 4af6b49190 lots of changes - many quick fixes made suring beamtime. many things to sort after the beamtime 2026-05-21 07:39:33 +02:00
John Henry Beale f95fe49647 first functioning mode 7 for full column blocks 2026-05-18 10:38:08 +02:00
John Henry Beale c4c5ea6491 running changes made by M.Appleby and J.Beale. Mainly to update due to python 3.10 2025-11-10 10:47:31 +01:00
Appleby Martin Vears 5d4808e6a1 Changes to psi_device and app_config to add gui options for JFJoch. PSI-device now parses these messages in a message to JFJoch 2024-11-25 11:10:19 +01:00
zamofing_t 7014351eb4 SFELPHOTON-1335:try to debug 2024-10-24 12:11:50 +02:00
zamofing_t 3fc4f50c15 optimize imports and cleanup code 2024-09-25 12:36:48 +02:00
zamofing_t 3a0367073e SFELPHOTON-1337: SwissMX split/ cleanup/move repositories 2024-09-24 18:56:27 +02:00
zamofing_t e63c814662 SFELPHOTON-1128: debug stup-and-go motion 2024-05-23 16:33:43 +02:00
zamofing_t 153333f336 changes by the martin and John 2024-05-15 15:22:01 +02:00
zamofing_t 5e954dec77 towards cta part 2 2024-01-23 13:11:23 +01:00
zamofing_t c270467e44 towards cta 2024-01-22 16:01:55 +01:00
zamofing_t fd3d36396d changes of John and Martin 2023-11-28 12:01:11 +01:00
zamofing_t 681b8f2953 enhance simulation 2023-06-29 10:13:29 +02:00
zamofing_t bd7d71b0b0 other debug version 2023-06-29 08:49:37 +02:00
zamofing_t 3a8ac885f5 beamtime fixes 2023-06-28 20:09:27 +02:00
zamofing_t 0b63ebaa14 add missing files, fix coordinate transformation 2023-06-23 12:12:02 +02:00
zamofing_t c75c2c1d33 use new ESB_MX module and better triggerSync 2022-10-04 17:27:13 +02:00
zamofing_t 7a67889992 fix in synchronization, add padding frames for JF 2022-09-28 16:56:32 +02:00
zamofing_t 30a9c77230 add DAQ params, better autofocus 2022-09-27 11:11:38 +02:00
zamofing_t d8399e901c copy current SwissMX.conf, minor fixes 2022-09-21 16:11:03 +02:00
zamofing_t 1393269ceb add app_utils for motion_assert, contextMenu og GraphItem, further fixes 2022-09-21 11:06:10 +02:00
zamofing_t ba4f5feecb various fixes 2022-09-16 12:25:36 +02:00
zamofing_t 7534eec921 towards fiducial detection 2022-09-15 14:46:30 +02:00
zamofing_t e4b3ad0b5f add workbench autofocus.py 2022-09-15 07:44:02 +02:00