Page 1 of 1

csrcsbend reflection bug

Posted: 08 Sep 2010, 08:30
by michael_borland
Versions 23.1 and earlier have a bug in reflection of CSRCSBEND elements. Consider a beamline formed as follows:

d1: drift,l=1
b1: csrcsbend,l=1.0,angle=0.1,e1=0,e2=0.1
b2: csrcsbend,l=1.0,angle=-0.1,e1=-0.1,e2=0.0
bl: line=(b1,d1,b2,d1,-b2,d1,-b1)

One would expect that the edge angles will be swapped for the -b1 and -b2 instances. This will happen for CSBEND and SBEND elements, but not for CSRCSBEND.

This bug will be fixed in the next release. If you build from source, use the attached file in place of the released version of mad_parse.c

Thanks to Ryoichi Hajima for reporting this bug.

--Michael