Fitting Beam Size Measurements

Moderators: cyao, michael_borland

Post Reply
tennant
Posts: 85
Joined: 31 Jul 2008, 07:19
Location: Jefferson Laboratory

Fitting Beam Size Measurements

Post by tennant » 17 Sep 2010, 11:40

Hi,

We have (rms) beam size measurements at various points along a transport channel. I'd like to use Elegant to vary the Twiss parameters at the entrance of the the transport channel to minimize the difference between observed and simulated beam sizes. I suppose I could create an optimization_term for each beam size measurement but that would become unwieldy to manually enter each new set of measurements. I've got to believe there is a faster way to do this...

Thanks,
chris

tennant
Posts: 85
Joined: 31 Jul 2008, 07:19
Location: Jefferson Laboratory

Re: Fitting Beam Size Measurements

Post by tennant » 20 Sep 2010, 11:42

So I grossly overestimated my ability to do what I described in my previous post and now have more fundamental questions. I want to vary the Twiss parameters and emittance at the start of a transport channel to minimize the difference between measured and simulated beam sizes at various locations. Presumably I use the 'Twiss' element to generate the optimization_variables for the beta and alpha in each plane. How do I vary the emittance? And how do I generate an optimization_term for the measured beam size? At the moment I have 'Watch' elements at all viewer locations in the lattice. Can I do something like: term = "Viewer01.SX(Y) 0.5e-3 - sqr"?

Thanks.
chris

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

Re: Fitting Beam Size Measurements

Post by michael_borland » 27 Sep 2010, 11:01

Chris,

Please see the attached file for an example of how to do this.

--Michael
Attachments
beamSizeMatch1.tar.gz
(1.37 KiB) Downloaded 798 times

tennant
Posts: 85
Joined: 31 Jul 2008, 07:19
Location: Jefferson Laboratory

Re: Fitting Beam Size Measurements

Post by tennant » 27 Sep 2010, 13:11

Michael,

Thanks for the example. I (think) I understand what you are doing, however when I apply it to my file I run into problems. After the optimizer runs, it has not changed any of the twiss parameters or emittances and the value of the fit function is ridiculously high. I don't understand it. I'm attaching the .ele and .lte if you'd like to have a look. I'm not expecting a super fit of the data, but I'm certainly something better than I'm currently getting!

Thanks,
chris
Attachments
cdt.lte
(1.44 KiB) Downloaded 890 times
cdt.ele
(3.18 KiB) Downloaded 848 times

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

Re: Fitting Beam Size Measurements

Post by michael_borland » 27 Sep 2010, 13:45

Chris,

I think the basic problem is that your MARK elements have names that begin with a digit. This is ok until you use them in RPN expressions. RPN doesn't properly recognize variable names beginning a sequence that looks like a number. So 8F03.SX gets interpreted as "8".

Another problem is that you refer to markers (e.g., 8F12) that don't exist. Finally, you use ".SX" and ".SY" instead of ".Sx" and ".Sy".

--Michael

tennant
Posts: 85
Joined: 31 Jul 2008, 07:19
Location: Jefferson Laboratory

Re: Fitting Beam Size Measurements

Post by tennant » 28 Sep 2010, 08:25

Ah, yes. Thank you. I also forgot to put the occurrence in (i.e. TV8F06#1.Sx).

tennant
Posts: 85
Joined: 31 Jul 2008, 07:19
Location: Jefferson Laboratory

Re: Fitting Beam Size Measurements

Post by tennant » 28 Sep 2010, 13:28

One more question, I've seen how you can change the Twiss parameters and emittance with the 'twiss' and 'emittance' elements, respectively. Is there a straightforward way to vary the initial longitudinal parameters (i.e. bunch length and energy spread) for fitting purposes?

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

Re: Fitting Beam Size Measurements

Post by michael_borland » 28 Sep 2010, 13:31

Chris,

You can use a MAGNIFY element to do this in a relative fashion (i.e., using factors relative to the initial bunch length or energy spread).

I should really add longitudinal emittance and beta function transformation in the same fashion as for transverse...

--Michael

jtobin
Posts: 47
Joined: 23 Jul 2008, 15:00

Re: Fitting Beam Size Measurements

Post by jtobin » 11 Mar 2013, 17:04

Hi Michael,
Is there now an element to vary the initial bunch length? Will be an useful one. Thanks!
-Charles

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

Re: Fitting Beam Size Measurements

Post by michael_borland » 11 Mar 2013, 17:07

jtobin wrote:Hi Michael,
Is there now an element to vary the initial bunch length? Will be an useful one. Thanks!
-Charles
Charles,

You should be able to do this with the MAGNIFY element, e.g.,

Code: Select all

MAGS: magnify,ms=2
should multiply the bunch length by a factor of 2. May not work well if the beam has a significant velocity spread.

--Michael

Post Reply