- move_together(): post-tube in/out and the tandem arrows check all targets
first (nudge cap, soft limits), then send the moves back to back to the
VAL fields (us X, ds X, us Y, ds Y) without reads in between; either all
axes move or none (a refused tandem axis could tilt the tube)
- set_collecting(False) re-enables all groups: after a motor sequence the
collimator and post-tube groups stayed greyed out
- log the end of a motor sequence and the GUI unlock
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Detector, collimator, post-tube in/out, move home/yag, the backlight button
and the sample exchange/alignment/data collection transitions blocked the
GUI thread for up to ~20s per move.
- MoveWorker (same thread as the collection worker, so sequences and
collections can not overlap) runs (label, callable) steps with a progress
dialog; all controls are locked meanwhile (no nudges, zoom stays usable)
- move functions raise MoveError instead of showing dialogs; the GUI shows
the message when the sequence ends
- abort stops all motors (motor record STOP, backlight) and ends the
sequence; position checks (assert_tweaker_positions abort=) stop waiting
- safety: backlight moves wait and check the position before the next step
(post-tube in used to start while the backlight was still moving out)
- tandem nudges stay non blocking in the GUI thread; collimator still moves
X then Y
- sample alignment: backlight in now also checks the detector is clear of
the post-tube path (as the backlight button does)
Tested in simulation and at the beamline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
The old abort only sent &1a;Gather.Enable=0, which left triggerSync running
and Coord[1].DesTimeBase at 0 (or under triggerSync control). The fast
stages then needed an IOC restart.
_recover_motion() now runs after an abort or any error while the motion
program is active:
- abort the motion program and stop gathering
- stop triggerSync (Ctrl-C, close the shell channel, killall)
- then restore Coord[1].DesTimeBase=Sys.ServoPeriod, TimeBaseSlew=1E-4
and reset Coord[1].Q[0]=0 (a stale -2 lets the next wait_armed() return
before the stage is at the start position)
- log the PowerBrick state before and after
Tested at the beamline (sync_mode 2, sync_flag 3): after a mid-scan abort
the fast stages move without an IOC restart.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- progress dialog is non modal; during a collection set_collecting() greys
out the left tabs, toolbar, menu, fast stage and x-ray eye groups,
backlight/lights/exposure and the collimator/post-tube in/out buttons
- collimator and post-tube motors stay usable, limited to a total move of
NUDGE_MAX_STEP (0.5 mm) from their position at the start of the
collection (MotorTweak/SimMotorTweak.set_max_step)
- zoom stays usable during a collection
- mouse clicks on the camera view are ignored during a collection
- daq_worker added to the -l log level list
- debug coordinate log is skipped when points/pts_trf are not in the
scan parameters (grid modes) instead of raising KeyError
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- new daq_worker.py: CollectionWorker runs in its own QThread and owns the
Deltatau/Jungfrau objects; progress, run info, gather plots and results
are sent to the GUI thread with signals
- abort closes the shutter immediately and stops the motion program
(&1a;Gather.Enable=0) at the next check
- shutter is closed in a finally block if the collection fails
- removes the processEvents()/sleep polling loop from the GUI thread
- quitting is blocked while a collection is running
- fix: debug coord log no longer overwrites the gather upload filename
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>