K0 attribute in RBend
It seems that the attribute K0 (to set the magnetic field) is not working in the RBend element. In the regression test, if I am not wrong, only the Angle attribute is tested.
From a simple RBend test:
1- if ANGLE attribute is used
RBend [2]> 1DPROFILE1-DEFAULT (1D Profile type 1)
RBend [2]> BEND using file 1DPROFILE1-DEFAULT (1D Profile type 1)
RBend [2]>
RBend [2]> Start of field map: 0.146472 m (in s coordinates)
RBend [2]> End of field map: 0.484418 m (in s coordinates)
RBend [2]> Entrance edge of magnet: 0.25 m (in s coordinates)
RBend [2]>
RBend [2]> Reference Trajectory Properties
RBend [2]> ===============================
RBend [2]>
RBend [2]> Bend angle magnitude: 0.523599 rad (30 degrees)
RBend [2]> Entrance edge angle: 0.261799 rad (15 degrees)
RBend [2]> Exit edge angle: 0.261799 rad (15 degrees)
RBend [2]> Bend design radius: 0.249982 m
RBend [2]> Bend design energy: 7e+06 eV
RBend [2]>
RBend [2]> Bend Field and Rotation Properties
RBend [2]> ==================================
RBend [2]>
RBend [2]> Field amplitude: 1.53217 T
RBend [2]> Field index: 0
RBend [2]> Rotation about x axis: 0 rad (0 degrees)
RBend [2]> Rotation about y axis: 0 rad (0 degrees)
RBend [2]> Rotation about z axis: 0 rad (0 degrees)
RBend [2]>
RBend [2]> Reference Trajectory Properties Through Bend Magnet with Fringe Fields
RBend [2]> ======================================================================
RBend [2]>
RBend [2]> Reference particle is bent: 0.523599 rad (30 degrees) in x plane
RBend [2]> Reference particle is bent: 0 rad (0 degrees) in y plane
RBend [2]>
2- if K0 attribute is used:
RBend [2]> 1DPROFILE1-DEFAULT (1D Profile type 1)
RBend [2]> BEND using file 1DPROFILE1-DEFAULT (1D Profile type 1)
RBend [2]>
RBend [2]> Start of field map: 0.146472 m (in s coordinates)
RBend [2]> End of field map: -nan m (in s coordinates)
RBend [2]> Entrance edge of magnet: 0.25 m (in s coordinates)
RBend [2]>
RBend [2]> Reference Trajectory Properties
RBend [2]> ===============================
RBend [2]>
RBend [2]> Bend angle magnitude: -nan rad (-nan degrees)
RBend [2]> Entrance edge angle: 0.261799 rad (15 degrees)
RBend [2]> Exit edge angle: -0.261799 rad (-15 degrees)
RBend [2]> Bend design radius: 0.25001 m
RBend [2]> Bend design energy: 7e+06 eV
RBend [2]>
RBend [2]> Bend Field and Rotation Properties
RBend [2]> ==================================
RBend [2]>
RBend [2]> Field amplitude: 1.532 T
RBend [2]> Field index: 0
RBend [2]> Rotation about x axis: 0 rad (0 degrees)
RBend [2]> Rotation about y axis: 0 rad (0 degrees)
RBend [2]> Rotation about z axis: 0 rad (0 degrees)
RBend [2]>
RBend [2]> Reference Trajectory Properties Through Bend Magnet with Fringe Fields
RBend [2]> ======================================================================
RBend [2]>
RBend [2]> Reference particle is bent: -0 rad (-0 degrees) in x plane
RBend [2]> Reference particle is bent: 0 rad (0 degrees) in y plane
RBend [2]>
Could, please, someone check?