@@ -38,7 +38,7 @@ class PGMMonochromator(PSIDeviceBase, PGMMonochromatorBase):
|
||||
PGM monochromator device that combines the functionality of PSIDeviceBase and PGMMonochromator.
|
||||
"""
|
||||
|
||||
USER_ACCESS = ["get_max_speeds", "set_progress_range", "start_progress_tracking"]
|
||||
USER_ACCESS = ["get_max_speeds", "set_progress_range"]
|
||||
|
||||
sync_with_undulator = Cpt(Signal, value=0, kind=Kind.config)
|
||||
sync_update_period = Cpt(Signal, value=0.05, kind=Kind.config)
|
||||
@@ -86,15 +86,6 @@ class PGMMonochromator(PSIDeviceBase, PGMMonochromatorBase):
|
||||
self._progress_active = False
|
||||
self._progress_done_emitted = False
|
||||
|
||||
def start_progress_tracking(self) -> None:
|
||||
"""
|
||||
Enable progress updates for the currently configured energy range.
|
||||
"""
|
||||
if len(self.energy_range) != 2:
|
||||
return
|
||||
self._progress_active = True
|
||||
self._progress_done_emitted = False
|
||||
|
||||
########################################
|
||||
# Beamline Specific Implementations #
|
||||
########################################
|
||||
@@ -232,14 +223,13 @@ class PGMMonochromator(PSIDeviceBase, PGMMonochromatorBase):
|
||||
Args:
|
||||
value (float): The current readback value of the monochromator.
|
||||
"""
|
||||
if not self._progress_active or len(self.energy_range) != 2:
|
||||
return
|
||||
if bool(self.done.get()):
|
||||
if not self._progress_done_emitted:
|
||||
self.progress.put(value=100, max_value=100, done=True)
|
||||
self._progress_done_emitted = True
|
||||
self._progress_active = False
|
||||
if len(self.energy_range) != 2:
|
||||
return
|
||||
# if bool(self.done.get()):
|
||||
# if not self._progress_done_emitted:
|
||||
# self.progress.put(value=100, max_value=100, done=True)
|
||||
# self._progress_done_emitted = True
|
||||
# return
|
||||
|
||||
self._progress_done_emitted = False
|
||||
|
||||
|
||||
@@ -161,7 +161,6 @@ class OTFScan(ScanBase):
|
||||
"""
|
||||
|
||||
self.dev.signals.store_updates.put(1)
|
||||
self.mono.start_progress_tracking()
|
||||
status = self.mono.set(self.e2)
|
||||
|
||||
while not status.done:
|
||||
|
||||
Reference in New Issue
Block a user