Page 1 of 1

Scan quads to match phase advance?

Posted: 21 Jul 2014, 14:46
by Zamank
Hi All,

Sorry I didn't know which forum to put this in because it seems like a scanning/matching/optimization question. Anyways, I was wondering if there was an example or if one can direct me to how I would go about:

-Having Elegant scan a specified number of quads (and their strengths, "K") to achieve a specified phase advance, as well as twiss parameters (mainly betax,y and alphax,y), at some location (marker).

I was doing this type of work with MAD, but my Elegant file has been so heavily modified and edited that it would be a pain to apply the changes to MAD.

Thank you in advance!

PS. Please let me know if any of this doesn't make sense!

Re: Scan quads to match phase advance?

Posted: 21 Jul 2014, 16:28
by michael_borland
Zamank,

This is possible. You can use MARK elements in the the beamline and get information for the optimizer. For example

Code: Select all

M1: mark,fitpoint=1
M2: mark,fitpoint=1
bl: line=(...,M1,...,M2,...)
Then, in the .ele file, you can use commands like

Code: Select all

&optimization_term term = "M1#1.betax 2 0.01 sene" &end
which constrains betax at occurrence #1 of M1 to be 2m to within 0.01 m, or

Code: Select all

&optimization_term term = "M1#2.nux M1#1.nux - 0.5 0.01 sene" &end
which constrains the phase advance between the first and second instances of M1 to be 0.5 (in units of 2Pi) to within 0.01.

There are several examples of using the optimizer in the elegant examples file. See multiPartMatching1 for a complex example.

--Michael

Re: Scan quads to match phase advance?

Posted: 21 Jul 2014, 16:38
by Zamank
Great thanks Michael!