correct another editing error in phoenix_trigger.py
This commit is contained in:
@ -46,6 +46,9 @@ class SAMPLING(int, enum.Enum):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
RUNNING = 0
|
||||||
|
DONE = 1
|
||||||
|
|
||||||
|
|
||||||
class PhoenixTriggerSetup(CustomDetectorMixin):
|
class PhoenixTriggerSetup(CustomDetectorMixin):
|
||||||
"""
|
"""
|
||||||
@ -78,6 +81,7 @@ class PhoenixTriggerSetup(CustomDetectorMixin):
|
|||||||
|
|
||||||
def on_unstage(self) -> None:
|
def on_unstage(self) -> None:
|
||||||
"""On unstage actions which are executed upon unstaging the device"""
|
"""On unstage actions which are executed upon unstaging the device"""
|
||||||
|
|
||||||
self.on_stop()
|
self.on_stop()
|
||||||
|
|
||||||
def on_trigger(self) -> DeviceStatus:
|
def on_trigger(self) -> DeviceStatus:
|
||||||
@ -88,7 +92,8 @@ class PhoenixTriggerSetup(CustomDetectorMixin):
|
|||||||
falcon = self.parent.device_manager.devices.get("falcon_nohdf5", None) # get device
|
falcon = self.parent.device_manager.devices.get("falcon_nohdf5", None) # get device
|
||||||
timeout = 1
|
timeout = 1
|
||||||
if falcon is not None:
|
if falcon is not None:
|
||||||
# TODO Check that falcon.state.get() == 1 is the correct check. --> When is the falcon acquiring, this assumes 1?
|
# TODO Check that falcon.state.get() == 1 is the correct check.
|
||||||
|
# --> When is the falcon acquiring, this assumes 1?
|
||||||
|
|
||||||
if not self.wait_for_signals([(falcon.state.get, 1)], timeout=timeout):
|
if not self.wait_for_signals([(falcon.state.get, 1)], timeout=timeout):
|
||||||
raise PhoenixTriggerError(
|
raise PhoenixTriggerError(
|
||||||
@ -110,7 +115,8 @@ class PhoenixTriggerSetup(CustomDetectorMixin):
|
|||||||
# the devices config softwareTrigger=True is set.
|
# the devices config softwareTrigger=True is set.
|
||||||
# In ScanBase, the _at_each_point function calls
|
# In ScanBase, the _at_each_point function calls
|
||||||
# self.stubs.wait(wait_type="trigger", group="trigger", wait_time=self.exp_time)
|
# self.stubs.wait(wait_type="trigger", group="trigger", wait_time=self.exp_time)
|
||||||
# which ensures that the DeviceStatus object resolves before continuing, i.e. DeviceStatus.done = True
|
# which ensures that the DeviceStatus object resolves before continuing,
|
||||||
|
# i.e. DeviceStatus.done = True
|
||||||
|
|
||||||
status = self.wait_with_status(
|
status = self.wait_with_status(
|
||||||
signal_conditions=[(self.parent.smpl_done.get, SAMPLING.DONE)],
|
signal_conditions=[(self.parent.smpl_done.get, SAMPLING.DONE)],
|
||||||
@ -118,9 +124,11 @@ class PhoenixTriggerSetup(CustomDetectorMixin):
|
|||||||
check_stopped=True,
|
check_stopped=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
# explanation of last line (self.parent.smpl_done.get, SAMPLINGDONE.DONE) creates a tuple which defines a
|
# explanation of last line (self.parent.smpl_done.get, SAMPLINGDONE.DONE)
|
||||||
|
# creates a tuple which defines a
|
||||||
# condition, which is tested in self.wait_with_status, here it tests for :
|
# condition, which is tested in self.wait_with_status, here it tests for :
|
||||||
# (self.parent.smpl_done.get() == SAMPLINGDONE.DONE), where SAMPLINGDONE.DONE =1, as set in code above
|
# (self.parent.smpl_done.get() == SAMPLINGDONE.DONE),
|
||||||
|
# where SAMPLINGDONE.DONE =1, as set in code above
|
||||||
# As this is in mixing class (PhoenixtriggerSetup), parent.sample_done is defined in
|
# As this is in mixing class (PhoenixtriggerSetup), parent.sample_done is defined in
|
||||||
# main class as smpl_done = Cpt(EpicsSignalRO, "SMPL-DONE", kind=Kind.config)
|
# main class as smpl_done = Cpt(EpicsSignalRO, "SMPL-DONE", kind=Kind.config)
|
||||||
|
|
||||||
@ -148,7 +156,9 @@ class PhoenixTrigger(PSIDetectorBase):
|
|||||||
"""
|
"""
|
||||||
Class for PHOENIX TTL hardware trigger: 'X07MB-OP2:'
|
Class for PHOENIX TTL hardware trigger: 'X07MB-OP2:'
|
||||||
|
|
||||||
This device is used to trigger communicate with an ADC card that creates TTL signals to trigger cameras and detectors at Phoenix.
|
This device is used to trigger communicate with an ADC card
|
||||||
|
that creates TTL signals to trigger cameras and detectors at Phoenix.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
##################################################################
|
##################################################################
|
||||||
|
Reference in New Issue
Block a user