File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 2727
2828def 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" ,
You can’t perform that action at this time.
0 commit comments