Page 1 of 1

Chromatic amplitude functions

Posted: 22 Mar 2010, 09:34
by astecpete
Hi,

Is there a way of getting twiss_output to give me the chromatic amplitude functions at each element along with the usual twiss functions. i.e. W_x = Sqrt(a_x^2 + b_x^2) where b_x = 1/beta_x . d(beta_x)/d(delta) and a_x = d(alpha_x)/d(delta) - alpha_x/beta_x . d(beta_x)/d(delta)

and also the chromatic derivatives of dispersion?

I'd really like them so i can do a chromatic analysis on some transport lines.

Ta very much

Pete

Re: Chromatic amplitude functions

Posted: 23 Mar 2010, 08:52
by michael_borland
Pete,

Elegant doesn't do this computation directly, but it can be done with some scripting. See the attached file.

Do you have a reference for this quantity? I'm not familiar with it.

--Michael

Re: Chromatic amplitude functions

Posted: 23 Mar 2010, 10:26
by astecpete
I knew you'd have some labyrinthine script to hand involving sddsprocess :lol:
Although sddsvslopes is a new one for me ;)

In the NLS recirculator i need to transport beams with large relative energy chirp when i inject (merge) and extract (demerge) from the main linac. The transport has to be achromatic and isochronous to second order (or at least pretty close to this) so that i don't get emittance increase from filamentation. We've done this by brute force optimisation on number, strength and positions of sextupoles in our first order transport system. This works nicely, the system can now cope with putting a 3% energy chirp beam through and getting no emittance increase.

I'm now writing up the design. We have the system in MAD aswell as elegant and i wanted to check consistency. In section 1.5.4 of the MAD manual for version 8.19 it defines these chromatic amplitude functions and also chromatic phase functions and chromatic derivatives of dispersion. When i plot Wx and Wy before and after sextupole correction i can clearly see that they are reduced.
Also the T_{i,j,6} matrix elements are reduced.

On a more philosophical note, i'm not really sure why one would choose to define these functions rather than just looking at the T_{i,j,6} matrix elements. The mad manual refers to an old LEP technical note - i'll dig that out and see if i can decipher.

Pete

Re: Chromatic amplitude functions

Posted: 23 Mar 2010, 11:54
by astecpete
Hmm, i'm not quite able to get this working with my setup. sddsvslopes tells me there isn't enough data for a fit.

looking at the .tmp file, yours has 2 entries in the delta parameter, whereas mine only has one (the first one). But my .fin file has two entries for MAL.DP, the same as yours.

Is this some problem with pages?

here are my files...

thanks again Michael

Re: Chromatic amplitude functions

Posted: 23 Mar 2010, 12:54
by michael_borland
Pete,

I've attached modified files that seem to work. The differences are that you have acceleration, so you have to track a delta=0 fiducial as well as the delta=+/-1e-6 particles. Also, the laser modulator was left on, which messed things up. The script "run1" will run things.

--Michael

Re: Chromatic amplitude functions

Posted: 19 Apr 2010, 12:21
by astecpete
Michael,

I've found these really useful.

One small query - Wx and Wy agree with MAD, but when i plot the chromatic derivative of dispersion (d(D_x) / d \delta) elegant is exactly a factor of 2 bigger than MAD. I'm comparing the MAD value DDX with the etaxSlope from the .fit file.
Is this some non-division by the size of the interval in delta - i.e. the 2e-6 in delta - inside the sddsvslopes function?

Pete

Re: Chromatic amplitude functions

Posted: 19 Apr 2010, 12:43
by michael_borland
Pete,

I would guess that MAD using x = x0 + delta*eta1 + delta^2 * eta2, i.e., eta2 is the polynomial coefficient instead of the derivative. sddsvslopes should be giving the slope with correct normalization.

--Michael

Re: Chromatic amplitude functions

Posted: 20 Apr 2010, 03:46
by astecpete
Michael, once again you are correct! Thank you.

I've just checked the mad-x manual and they have corrected this, there is now a factor of 1/2 in their definition of DDX. So this is a bug in mad-8.

Pete