Skip to content

Commit 72f8543

Browse files
authored
Merge pull request #68 from xsuite/fix/support_rbend
Add support for RBend
2 parents c250c79 + 3b0fe3f commit 72f8543

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xplt/line.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def element_strength(element, n):
3636

3737
def nominal_order(element):
3838
"""Get nominal element order (even if coefficients might be zero)"""
39-
if element.__class__.__name__ == "Bend": # avoid using type to support Views
39+
if element.__class__.__name__ in ["Bend", "RBend"]: # avoid using type to support Views
4040
return 0
4141
if hasattr(element, "length"):
4242
for n in range(10, -1, -1):
@@ -384,6 +384,7 @@ def ang(a):
384384
# map element type to order when order is not in survey
385385
for type, o in {
386386
"Bend": 0,
387+
"RBend": 0,
387388
"Quadrupole": 1,
388389
"Sextupole": 2,
389390
"Octupole": 3,

0 commit comments

Comments
 (0)