Page 1 of 1

Multipole error in combined function magnets

Posted: 23 Oct 2024, 23:37
by ranamonikaa
Hi,
I have dipole+quadrupole magnets in a storage ring. I have defined them as csbend in the lattice file giving systematic normal multipoles as follows:
Q4 : CSBEND, L=0.20, ANGLE = -0.00084027131508015, K1 = 2.598000, E1= 0.0000, E2= 0.0000, N_SLICES= 40, &
xreference=10.0e-03, F1=-14.4e-04, F2=9.0E-04, F3=-18.9E-04, F4=16.8E-04, F5=-6.2E-04, F6=12.7E-04, &
F7=-15.2E-04
I want to introduce random multipole errors for these magnets upto 18th order. I did this in the .ele file as follows:

&error_element name=Q4, element_type=csbend, item=F1, amplitude=10.5E-04, type="gaussian", cutoff=1.0,fractional=1,&end
&error_element name=Q4, element_type=csbend, item=F2, amplitude=12.5E-04, type="gaussian", cutoff=1.0,fractional=1,&end
&error_element name=Q4, element_type=csbend, item=F3, amplitude=3.0E-04, type="gaussian", cutoff=1.0,fractional=1,&end
&error_element name=Q4, element_type=csbend, item=F4, amplitude=5.5E-04, type="gaussian", cutoff=1.0,fractional=1,&end
&error_element name=Q4, element_type=csbend, item=F5, amplitude=1.5E-04, type="gaussian", cutoff=1.0,fractional=1,&end
&error_element name=Q4, element_type=csbend, item=F6, amplitude=2.0E-04, type="gaussian", cutoff=1.0,fractional=1,&end
&error_element name=Q4, element_type=csbend, item=F7, amplitude=0.5E-04, type="gaussian", cutoff=1.0,fractional=1,&end
&error_element name=Q4, element_type=csbend, item=F8, amplitude=1.0E-04, type="gaussian", cutoff=1.0,fractional=1,&end
&error_element name=Q4, element_type=csbend, item=F9, amplitude=0.5E-04, type="gaussian", cutoff=1.0,fractional=1,&end
&error_element name=Q4, element_type=csbend, item=F10, amplitude=0.5E-04, type="gaussian", cutoff=1.0,fractional=1,&end
&error_element name=Q4, element_type=csbend, item=F11, amplitude=0.5E-04, type="gaussian", cutoff=1.0,fractional=1,&end
&error_element name=Q4, element_type=csbend, item=F12, amplitude=0.5E-04, type="gaussian", cutoff=1.0,fractional=1,&end
&error_element name=Q4, element_type=csbend, item=F13, amplitude=0.5E-04, type="gaussian", cutoff=1.0,fractional=1,&end
&error_element name=Q4, element_type=csbend, item=F14, amplitude=0.5E-04, type="gaussian", cutoff=1.0,fractional=1,&end
&error_element name=Q4, element_type=csbend, item=F15, amplitude=0.5E-04, type="gaussian", cutoff=1.0,fractional=1,&end
&error_element name=Q4, element_type=csbend, item=F16, amplitude=0.5E-04, type="gaussian", cutoff=1.0,fractional=1,&end
&error_element name=Q4, element_type=csbend, item=F17, amplitude=0.5E-04, type="gaussian", cutoff=1.0,fractional=1,&end
&error_element name=Q4, element_type=csbend, item=F18, amplitude=0.5E-04, type="gaussian", cutoff=1.0,fractional=1,&end

but I got an error saying that "cannot vary F9--no such parameter for Q4".
I have three questions:
1. How should I go about the above problem?
2. How to introduce integrated multipole errors (systematic) for quadrupoles.
3. In sddsplot command, how to draw gridlines in the plot?

Thanks in advance.

Re: Multipole error in combined function magnets

Posted: 12 Nov 2024, 17:36
by michael_borland
The CSBEND element is limited to 8th order in the multipole errors. The reason is that do implement multipole errors correctly requires working out the recursion relations in curvilinear coordinates, which results in very complex expressions that make for slow execution.

For quadrupoles, you can use the systematic_multipoles parameter to provide the name of a file giving the multipole errors. If you want to have random multipole errors, use the random_multipoles parameter.

To make a grid on sddsplot, use, for example

Code: Select all

sddsplot -ticks=xgrid,ygrid,linetype=1
--Michael