Biding error_elements
Posted: 23 Apr 2014, 14:49
Hi
I'm using Elegant for some time already and just now I ran into this problem, that I cannot really solve.
I had to introduce in my lattice some skew quadrupoles for coupling correction, however in our case they are extra windings into the sextuples. For this particular case I think there is not combined function magnets so what I did was to split the sextupole in two halves and put a think skew quad in the middle.
My problem now is when I assign an error to this new "element". I need both halves and the thin skew quad in the middle to have the same errors (DY, DX and TILT) and I already tried using the bind_number and bind_across_names flags however what I get is : I manage to get the 2 part of the sextuples with the same error however for the skew quadrupole it doesn't work. What I get at the end is that the values for DX, DY and TILT error for all the skew quads are the same and correspond to the error assigned to the first pair of sextupoles halves.
Is there a way to do this right?
Here is part of the code I'm trying to implement:
!Skew quadrupole
SD2S : KQUAD,L=0.0,K1=0.0,TILT=1.57079632679485
!Sextupole
SD2H : KSEXT,L=0.075,K2=-168.176239279206,N_KICKS=8
!combining the elements
sd2 : line = (sd2h,sd2s,sd2h)
!The error assignment part
!Binds elements error for the SD2 sextupole(SD2H) and skew quad(SD2S)
&error_element name = sd2*, type = gaussian, cutoff = 1.0, item = DX, bind = 1, bind_number = 2, bind_across_names = 1, amplitude = 40e-6 &end
&error_element name = sd2*, type = gaussian, cutoff = 1.0, item = DY, bind = 1, bind_number = 2, bind_across_names = 1, amplitude = 40e-6 &end
&error_element name = sd2*, type = gaussian, cutoff = 1.0, item = TILT, bind = 1, bind_number = 2, bind_across_names = 1, amplitude = 2e-4 &end
!The error file log
ParameterValue ParameterError ElementParameter ElementName ElementOccurence ElementType
--------------------------------------------------------------------------------------------------------
6.609127e-06 6.609127e-06 DX SD2H 1 KSEXT
6.609127e-06 6.609127e-06 DX SD2H 2 KSEXT
-2.010981e-05 -2.010981e-05 DX SD2H 3 KSEXT
-2.010981e-05 -2.010981e-05 DX SD2H 4 KSEXT
-4.063888e-06 -4.063888e-06 DX SD2H 5 KSEXT
-4.063888e-06 -4.063888e-06 DX SD2H 6 KSEXT
6.609127e-06 6.609127e-06 DX SD2S 1 KQUAD
6.609127e-06 6.609127e-06 DX SD2S 2 KQUAD
6.609127e-06 6.609127e-06 DX SD2S 3 KQUAD
Thanks a lot
Natalia
I'm using Elegant for some time already and just now I ran into this problem, that I cannot really solve.
I had to introduce in my lattice some skew quadrupoles for coupling correction, however in our case they are extra windings into the sextuples. For this particular case I think there is not combined function magnets so what I did was to split the sextupole in two halves and put a think skew quad in the middle.
My problem now is when I assign an error to this new "element". I need both halves and the thin skew quad in the middle to have the same errors (DY, DX and TILT) and I already tried using the bind_number and bind_across_names flags however what I get is : I manage to get the 2 part of the sextuples with the same error however for the skew quadrupole it doesn't work. What I get at the end is that the values for DX, DY and TILT error for all the skew quads are the same and correspond to the error assigned to the first pair of sextupoles halves.
Is there a way to do this right?
Here is part of the code I'm trying to implement:
!Skew quadrupole
SD2S : KQUAD,L=0.0,K1=0.0,TILT=1.57079632679485
!Sextupole
SD2H : KSEXT,L=0.075,K2=-168.176239279206,N_KICKS=8
!combining the elements
sd2 : line = (sd2h,sd2s,sd2h)
!The error assignment part
!Binds elements error for the SD2 sextupole(SD2H) and skew quad(SD2S)
&error_element name = sd2*, type = gaussian, cutoff = 1.0, item = DX, bind = 1, bind_number = 2, bind_across_names = 1, amplitude = 40e-6 &end
&error_element name = sd2*, type = gaussian, cutoff = 1.0, item = DY, bind = 1, bind_number = 2, bind_across_names = 1, amplitude = 40e-6 &end
&error_element name = sd2*, type = gaussian, cutoff = 1.0, item = TILT, bind = 1, bind_number = 2, bind_across_names = 1, amplitude = 2e-4 &end
!The error file log
ParameterValue ParameterError ElementParameter ElementName ElementOccurence ElementType
--------------------------------------------------------------------------------------------------------
6.609127e-06 6.609127e-06 DX SD2H 1 KSEXT
6.609127e-06 6.609127e-06 DX SD2H 2 KSEXT
-2.010981e-05 -2.010981e-05 DX SD2H 3 KSEXT
-2.010981e-05 -2.010981e-05 DX SD2H 4 KSEXT
-4.063888e-06 -4.063888e-06 DX SD2H 5 KSEXT
-4.063888e-06 -4.063888e-06 DX SD2H 6 KSEXT
6.609127e-06 6.609127e-06 DX SD2S 1 KQUAD
6.609127e-06 6.609127e-06 DX SD2S 2 KQUAD
6.609127e-06 6.609127e-06 DX SD2S 3 KQUAD
Thanks a lot
Natalia