Biding error_elements

Moderators: cyao, michael_borland

Post Reply
n.milas
Posts: 5
Joined: 23 Apr 2014, 11:31

Biding error_elements

Post by n.milas » 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

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Biding error_elements

Post by michael_borland » 30 Apr 2014, 08:31

Natalia,

Sorry for the delayed reply.

There are two ways I can suggest to do this:
1. Create the errors externally and load them using the load_parameters command. You could run elegant once to create an error log file for the errors on the sextupoles, then use sddsprocess to modify that file to assign the same errors to the skew quads. Following, you'd load all the files using load_parameters.

2. Use paired MALIGN elements that bracket the SEXT-QUAD-SEXT element groups. Assign errors to the MALIGN elements rather than the magnets directly. When assigning errors to these MALIGN elements, be sure that bind=-1 so the offsets are compensated.

--MIchael

n.milas
Posts: 5
Joined: 23 Apr 2014, 11:31

Re: Biding error_elements

Post by n.milas » 12 May 2014, 11:13

Thanks a lot!! That was really helpful!

Post Reply