Skip to content

Commit cf90b66

Browse files
committed
Merge remote-tracking branch 'origin/main' into dev
2 parents b1b0947 + 473bd50 commit cf90b66

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

xplt/line.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@
2727

2828
def nominal_order(element):
2929
"""Get nominal element order (even if coefficients might be zero)"""
30-
if element.__class__.__name__ in ["Bend", "RBend"]: # avoid using type to support Views
30+
if element.__class__.__name__ in [
31+
"Bend",
32+
"RBend",
33+
"ThickSliceBend",
34+
"ThickSliceRBend",
35+
]: # avoid using type to support Views
3136
return 0
3237
if hasattr(element, "length"):
3338
for n in range(10, -1, -1):
@@ -375,10 +380,15 @@ def ang(a):
375380
# map element type to order when order is not in survey
376381
for type, o in {
377382
"Bend": 0,
383+
"ThickSliceBend": 0,
378384
"RBend": 0,
385+
"ThickSliceRBend": 0,
379386
"Quadrupole": 1,
387+
"ThickSliceQuadrupole": 1,
380388
"Sextupole": 2,
389+
"ThickSliceSextupole": 2,
381390
"Octupole": 3,
391+
"ThickSliceOctupole": 3,
382392
"Multipole": 999,
383393
}.items():
384394
ORDER[(ORDER < 0) & (TYPE == type)] = o
@@ -443,7 +453,7 @@ def ang(a):
443453
color=f"C{order}" if order >= 0 else "k",
444454
length=length or 0,
445455
label={
446-
0: "Bending magnet" if arc else None,
456+
0: "Bending magnet" if (arc or ("Bend" in TYPE[i])) else None,
447457
1: "Quadrupole magnet",
448458
2: "Sextupole magnet",
449459
3: "Octupole magnet",

0 commit comments

Comments
 (0)