Closed gfabbris closed 3 years ago
This pull request introduces 1 alert when merging 1dd24a123567e0bcdf2bcce4ac5d7cd9a641b3e2 into 96012112d267310b39fd122794802b61bb9ca539 - view on LGTM.com
new alerts:
This pull request introduces 1 alert when merging 353c7d0687b514cbf814c284a2b63345eb2a21d7 into 96012112d267310b39fd122794802b61bb9ca539 - view on LGTM.com
new alerts:
Move this section to a function inside the init so that it dispose it after running once.
# TODO: Ugly... but works.
_theta_pv_signal = EpicsSignalRO(f"{prefix}KohzuThetaPvSI", name="tmp")
_theta_pv_signal.wait_for_connection()
self._theta_pv = _theta_pv_signal.get(as_string=True)
_theta_pv_signal.destroy() # This won't be needed.
_theta_pv_signal = None # This won't be needed
def get_theta_pv(...):
_theta_pv_signal = EpicsSignalRO(f"{prefix}KohzuThetaPvSI", name="tmp")
_theta_pv_signal.wait_for_connection()
return _theta_pv_signal.get(as_string=True)
Test this - particularly the undulator- in the virtual machine
Implemented all energy related stuff in the virtual machine (mono, undulator, phase retarder). Comments:
but that is not handled bu the Run Engine, so it doesn't handle control+c well.
ophyd.PVPositioner
has an actuate
that handles things like clicking a move button. But for some reason it was implemented with a setpoint update that has wait=True
: https://github.com/bluesky/ophyd/blob/82053af306815a4980aa4689a31d717f3234bd43/ophyd/pv_positioner.py#L152. The problem is that for some setpoint signals this wait is blocking, which again is not good for the RE. This is fixed in our PVPositionerSoftDone
: But maybe this is a more general problem that should be fixed in `ophyd`.
@prjemian: This seems to be working now (as tested in the VM). The undulator backlash is handled using threading.Thread
, but I'm not quite familiar with threading, so this potentially not the best way to do this...
Closes #97.
Creates adds stop methods to
EnergySignal
,MyUndulator
, andMonochromator
. The mono is the trickiest and ugliest solution. The EPICS Kohzu screen exposes themono.th
PV in a PV. So the critical part (and perhaps problematic) part is this:@prjemian: any alternative solution?