how to scan momentum_chrip parameter

Moderators: cyao, michael_borland

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

how to scan momentum_chrip parameter

Post by jtobin » 04 Jun 2010, 14:42

Hi elegant users,
I am new to elegant and learning the ropes so to speak. There are a couple of questions i need help with for my simulation that i am trying to compare with experiments.

a] Basically, i want to scan momentum_chirp and measure bunch length at a specific point inside a compressor (at the center of a double dogleg actually)? I want to be able to scan momentum_chirp parameter in elegant. How do i do it? Can someone let me know how you did it? Does anyone have a script that they could share?

b] How to measure bunch length say at a particular point inside the double dog leg? I set a marker but it outputs in coordinates. I just need the bunchlength as a number (or parameter) NOT as a function of s. [say at 100 cm from the third dipole.].

c] How to superimpose *.mag file inside the sddsplot on top of my bunch length variation along the double dogleg? I have seen many talks where people use this. I want to be able show the difference with and without CSR turned on/off.

Thanks in advance.

regards,
Charles

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

Re: how to scan momentum_chrip parameter

Post by michael_borland » 04 Jun 2010, 16:11

Charles,

Welcome to the elegant user's forum.

a) The best way to scan the momentum chirp is using a fictitious rf cavity (RFCA element) at the start of the beamline. Set LINEARIZE=1 to ensure that you are not adding any curvature, then vary the VOLT parameter using vary_elements (there are examples of using vary_elements in the example files on-line at
http://www.aps.anl.gov/Accelerator_Syst ... les.tar.gz)

You could also use a commandline macro and a loop in the shell. E.g,. in the input file (template.ele, say) have
&run_setup
...
rootname = <rootname>
...
&end

&bunched_beam
...
momentum_chirp = <chirp>
...
&end

Then, run in a loop like this (assuming bash shell)
for chirp in 1 2 3 4 5 ; do
elegant template.ele -macro=chirp=$chirp,rootname=run-$chirp
done

b) You can measure the beam parameters at any point using a WATCH element with mode="parameters". Also, asking for a "sigma" output file from &run_setup will give similar information along the beamline.

c) If the bunch length variation is in the sigma file, try

sddsplot -column=s,Ss run.sig -unsuppress=y -column=s,Profile run.mag -overlay=xmode=normal,yfactor=0.04

--Michael

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

Re: how to scan momentum_chrip parameter

Post by jtobin » 22 Jun 2010, 12:05

thanks a lot michael...It worked perfectly..sorry for the late reply ...I presented the elegant results at the AAC. Thanks!

Post Reply