csrcsbend reflection bug

Moderators: michael_borland, soliday

Post Reply
michael_borland
Posts: 1927
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

csrcsbend reflection bug

Post by michael_borland » 08 Sep 2010, 08:30

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
Attachments
mad_parse.c
(32.73 KiB) Downloaded 1172 times

Post Reply