From ce8fc605328315cac32f7a3f399268ab1d330fef Mon Sep 17 00:00:00 2001 From: Fernando Date: Mon, 22 Jul 2024 19:19:55 -0300 Subject: [PATCH 1/4] SOFB.BUG: Fix problem with FOFB download setter. --- siriuspy/siriuspy/sofb/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/siriuspy/siriuspy/sofb/main.py b/siriuspy/siriuspy/sofb/main.py index 13c6b15ba..233b195d1 100644 --- a/siriuspy/siriuspy/sofb/main.py +++ b/siriuspy/siriuspy/sofb/main.py @@ -274,7 +274,7 @@ def set_fofb_download_perc(self, value: float): bool: Whether property was set. """ - value = min(max(value / 300, 0), 1) + value = min(max(value / 100, 0), 1) self._download_fofb_kicks_perc = value self.run_callbacks("FOFBDownloadKicksPerc-RB", value * 100) return True From fe05747295b545ebe33b85a781034ca4418063cc Mon Sep 17 00:00:00 2001 From: Fernando Date: Mon, 22 Jul 2024 19:23:26 -0300 Subject: [PATCH 2/4] SOFB.MNT: Change loop freq default value to 1 Hz. --- siriuspy/siriuspy/sofb/csdev.py | 4 ++-- siriuspy/siriuspy/sofb/main.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/siriuspy/siriuspy/sofb/csdev.py b/siriuspy/siriuspy/sofb/csdev.py index 38599aa6a..e3fe704d1 100644 --- a/siriuspy/siriuspy/sofb/csdev.py +++ b/siriuspy/siriuspy/sofb/csdev.py @@ -1007,10 +1007,10 @@ def get_sofb_database(self, prefix=""): 'LoopState-Sts': { 'type': 'enum', 'enums': self.LoopState._fields, 'value': 0}, 'LoopFreq-SP': { - 'type': 'float', 'value': self.BPMsFreq, 'unit': 'Hz', + 'type': 'float', 'value': self.BPMsFreq / 10, 'unit': 'Hz', 'prec': 3, 'lolim': 1e-3, 'hilim': 60}, 'LoopFreq-RB': { - 'type': 'float', 'value': self.BPMsFreq, 'unit': 'Hz', + 'type': 'float', 'value': self.BPMsFreq / 10, 'unit': 'Hz', 'prec': 3, 'lolim': 1e-3, 'hilim': 60}, 'LoopPIDKpCH-SP': { 'type': 'float', 'value': 0.0, 'unit': 'frac', 'prec': 3, diff --git a/siriuspy/siriuspy/sofb/main.py b/siriuspy/siriuspy/sofb/main.py index 233b195d1..c2899871b 100644 --- a/siriuspy/siriuspy/sofb/main.py +++ b/siriuspy/siriuspy/sofb/main.py @@ -37,7 +37,7 @@ def __init__( self._tests = tests self._orbit = self._correctors = self._matrix = None self._loop_state = self._csorb.LoopState.Open - self._loop_freq = self._csorb.BPMsFreq + self._loop_freq = self._csorb.BPMsFreq / 10 self._loop_print_every_num_iter = 200 self._loop_max_orb_distortion = self._csorb.DEF_MAX_ORB_DISTORTION zer = _np.zeros(self._csorb.nr_corrs, dtype=float) From 697ccf52de5ad085b7852cfd3478ed45121c0427 Mon Sep 17 00:00:00 2001 From: Fernando Date: Mon, 22 Jul 2024 19:25:05 -0300 Subject: [PATCH 3/4] SOFB.BUG: Fix double entry of polyx in method to calculate positions. --- siriuspy/siriuspy/sofb/bpms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/siriuspy/siriuspy/sofb/bpms.py b/siriuspy/siriuspy/sofb/bpms.py index b009d5ee3..d12f159cf 100644 --- a/siriuspy/siriuspy/sofb/bpms.py +++ b/siriuspy/siriuspy/sofb/bpms.py @@ -145,7 +145,7 @@ def connected(self): self._offsetx, self._offsety, self._polyx, - self._polyx, + self._polyy, self._arraya, self._arrayb, self._arrayc, From 337fd37de8139fdf5f7f118c402c3993238e3b0f Mon Sep 17 00:00:00 2001 From: Fernando Date: Mon, 22 Jul 2024 19:28:00 -0300 Subject: [PATCH 4/4] DEV.FOFBACQ.BUG: Fix Status-Mon pv name. --- siriuspy/siriuspy/devices/fofb_acq.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/siriuspy/siriuspy/devices/fofb_acq.py b/siriuspy/siriuspy/devices/fofb_acq.py index a579b504d..d14e27cc6 100644 --- a/siriuspy/siriuspy/devices/fofb_acq.py +++ b/siriuspy/siriuspy/devices/fofb_acq.py @@ -134,7 +134,7 @@ def trigger(self, val): @property def status(self): """Acquisition status.""" - return self['Status-Sts'] + return self['Status-Mon'] @property def count(self): @@ -148,13 +148,13 @@ def cmd_ctrl(self, val): def wait_acq_finish(self, timeout=10): """Wait Acquisition to finish.""" return self._wait( - 'Status-Sts', _FOFBCtrlAcqConst.STATES_FINISHED, + 'Status-Mon', _FOFBCtrlAcqConst.STATES_FINISHED, timeout=timeout, comp=lambda x, y: x in y) def wait_acq_start(self, timeout=10): """Wait Acquisition to start.""" return self._wait( - 'Status-Sts', _FOFBCtrlAcqConst.STATES_STARTED, + 'Status-Mon', _FOFBCtrlAcqConst.STATES_STARTED, timeout=timeout, comp=lambda x, y: x in y) @@ -1142,9 +1142,7 @@ def cmd_stop(self, wait=True, timeout=10) -> int: ctl.cmd_ctrl(_FOFBCtrlAcqConst.TrigEvt.stop) if wait: - _time.sleep(2) - return 0 - # return self.wait_acquisition_finish(timeout=timeout) + return self.wait_acquisition_finish(timeout=timeout) return 0 def wait_acquisition_finish(self, timeout=10) -> int: @@ -1186,9 +1184,7 @@ def cmd_start(self, wait=True, timeout=10) -> int: ctl.cmd_ctrl(_FOFBCtrlAcqConst.TrigEvt.start) if wait: - _time.sleep(2) - return 0 - # return self.wait_acquisition_start(timeout=timeout) + return self.wait_acquisition_start(timeout=timeout) return 0 def wait_acquisition_start(self, timeout=10) -> bool: