You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
! ring definition----------------------------------------------------
CELL1:Line=(D11,Q11,D12,HB11,D13,PU11,D14,CY11,D15,
SR11,D16,Q12,D17,CX11,D18,SH11,D16,Q13,
D12,HB12,D19,PU12,D1a);
CELL2:Line=(CY22,D21,SV21,D22,HB22,D23,Q23,D24,SR21,
D25,Q22,D26,C21,D27,PU21,D28,HB21,D23,
Q21,D29);
CELL3:Line=(D31,PU31,D32,CX31,D33,Q31,D34,HB31,D35,
PU32,D32,CY31,D36,SR31,D37,Q32,D3c,CX32,D3b,SH31,
D37,Q33,D34,HB32,D39,CY32,D3a,PU33);
CELL4:Line=(D41,SV41,D42,HB42,D43,Q43,D44,SR41,D4b,CX42,D4c,
Q42,D46,CY41,D47,PU42,D48,HB41,D43,Q41,
D44,S41,D49,CX41,D49,PU41,D4a);
MYRING: Line=(CELL1,CELL2,CELL3,CELL4);
BEAM, particle = proton, energy = 150;
USE SEQUENCE = MYRING;
!--------------------------------------------------------------------
However, when I run a sequence with sequence syntax definition not a line definition, no KeyError occurs. I think if the line definition is the source of this error.
The text was updated successfully, but these errors were encountered:
Hey, try print(list(madx.sequences.keys())) to get a list of available sequence names. My guess is that the sequence name is converted to lower case by MAD-X (which is generally the case for pretty much everything that isn't quoted).
In general, you should only use lower-case names / columns / etc from inside cpymad.
Hi, Thomas
When I run my sequence under cpymad, a
KeyError
occurs as follows:My python code is below:
My sequence definition is below:
However, when I run a sequence with
sequence
syntax definition not aline
definition, noKeyError
occurs. I think if theline
definition is the source of this error.The text was updated successfully, but these errors were encountered: