Skip to content

Commit 6065435

Browse files
committed
[TASK] fixed element proxy a typo and trying to extract additional element when it wasn't there for sextupole
1 parent 1106c1c commit 6065435

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/dt4acc/core/accelerators/element_proxies.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ async def update(self, property_id: str, value, element_data):
104104
105105
Raises:
106106
ValueError: If an unknown property is specified.
107+
108+
Todo: is that Liasion management?
109+
the inverse way
107110
"""
108111
if value is not None:
109112
assert np.isfinite(value), "Value must be finite"
@@ -164,7 +167,7 @@ class KickAngleCorrectorProxy(AddOnElementProxy):
164167

165168
def __init__(self, obj, *, correction_plane, **kwargs):
166169
assert correction_plane in ["horizontal", "vertical"], "Invalid correction plane"
167-
self.correction_planes = correction_plane
170+
self.correction_plane = correction_plane
168171
super().__init__(*obj, **kwargs)
169172

170173
async def update_kick(self, *, kick_x=None, kick_y=None, element_data):
@@ -176,7 +179,7 @@ async def update_kick(self, *, kick_x=None, kick_y=None, element_data):
176179
kick_y: Vertical kick angle.
177180
element_data: Element-specific conversion data.
178181
"""
179-
element, = self._obj
182+
element = self._obj
180183
kick_angles = self._obj.KickAngle.copy()
181184
if kick_x is not None:
182185
kick_angles[0] = kick_x * element_data.hw2phys

0 commit comments

Comments
 (0)