Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DeltaDelayRaw in SOFB #1133

Merged
merged 2 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion siriuspy/siriuspy/sofb/correctors.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ def __init__(self, acc):
self.EVT = src_val

src_val = self._csorb.CorrExtEvtSrc._fields.index(
self._csorb.evt_rmpbo)
self._csorb.evt_rmpbo
)
src_val = self._csorb.CorrExtEvtSrc[src_val]
self.RMPBO = src_val

Expand All @@ -384,6 +385,7 @@ def __init__(self, acc):
"Mode": _PV(pref_name + "Mode-Sts", **opt),
"Src": _PV(pref_trig + "Src-Sts", **opt),
"DelayRaw": _PV(pref_trig + "DelayRaw-RB", **opt),
"DeltaDelayRaw": _PV(pref_trig + "DeltaDelayRaw-RB", **opt),
"NrPulses": _PV(pref_trig + "NrPulses-RB", **opt),
"Duration": _PV(pref_trig + "Duration-RB", **opt),
"State": _PV(pref_trig + "State-Sts", **opt),
Expand All @@ -393,6 +395,7 @@ def __init__(self, acc):
"Mode": _PV(pref_name + "Mode-Sel", **opt),
"Src": _PV(pref_trig + "Src-Sel", **opt),
"DelayRaw": _PV(pref_trig + "DelayRaw-SP", **opt),
"DeltaDelayRaw": _PV(pref_trig + "DeltaDelayRaw-SP", **opt),
"NrPulses": _PV(pref_trig + "NrPulses-SP", **opt),
"Duration": _PV(pref_trig + "Duration-SP", **opt),
"State": _PV(pref_trig + "State-Sel", **opt),
Expand Down Expand Up @@ -450,6 +453,11 @@ def delayraw(self):
@delayraw.setter
def delayraw(self, value):
"""."""
# Make sure Delta Delay is zero:
pvobj = self._config_pvs_sp["DeltaDelayRaw"]
if self.put_enable and pvobj.connected:
pvobj.value *= 0

pvobj = self._config_pvs_sp["DelayRaw"]
if self.put_enable and pvobj.connected:
pvobj.value = int(value)
Expand Down
4 changes: 2 additions & 2 deletions siriuspy/siriuspy/sofb/csdev.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,13 +845,13 @@ def get_respmat_database(self, prefix=""):
"RFEnbl-Sel": {
"type": "enum",
"enums": self.EnblRF._fields,
"value": 0,
"value": 1,
"unit": "Off_On",
},
"RFEnbl-Sts": {
"type": "enum",
"enums": self.EnblRF._fields,
"value": 0,
"value": 1,
"unit": "Off_On",
},
"DeltaKickRF-Mon": {
Expand Down
2 changes: 1 addition & 1 deletion siriuspy/siriuspy/sofb/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self, acc, prefix="", callback=None):
"bpmy": "BPMYEnblList-RB",
}
if self.isring:
self.select_items["rf"] = _np.zeros(1, dtype=bool)
self.select_items["rf"] = _np.ones(1, dtype=bool)
self.selection_pv_names["rf"] = "RFEnbl-Sts"
self._respmat_mode = self._csorb.RespMatMode.Full
self.min_sing_val = self._csorb.MIN_SING_VAL
Expand Down