fix(mo1_bragg): Set scan angles in advanced scan to prevent bug in NIDAQ
This commit is contained in:
@@ -465,6 +465,7 @@ class Mo1Bragg(PSIDeviceBase, Mo1BraggPositioner):
|
||||
status = CompareStatus(out_signal, 0, operation_success=">")
|
||||
self.cancel_on_stop(status)
|
||||
status.wait(self.timeout_for_pvwait)
|
||||
# logger.info(f"Converted energy {inp} to angle {out_signal.get()}")
|
||||
return out_signal.get()
|
||||
|
||||
def set_advanced_xas_settings(
|
||||
@@ -494,6 +495,15 @@ class Mo1Bragg(PSIDeviceBase, Mo1BraggPositioner):
|
||||
|
||||
status_list = []
|
||||
|
||||
# Even though s_scan_angle_lo and -_hi are not used by the mono
|
||||
# for the advanced scan, we set it because the NIDAQ will read
|
||||
# those signals to calculate the expected number of encoder steps
|
||||
status_list.append(self.scan_settings.s_scan_angle_lo.set(pos[0]))
|
||||
self.cancel_on_stop(status_list[-1])
|
||||
|
||||
status_list.append(self.scan_settings.s_scan_angle_hi.set(pos[-1]))
|
||||
self.cancel_on_stop(status_list[-1])
|
||||
|
||||
status_list.append(self.scan_settings.a_scan_pos.set(pos))
|
||||
self.cancel_on_stop(status_list[-1])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user