Page 1 of 1

chromatic functions

Posted: 30 Jul 2016, 12:05
by Philippe Piot
Hi,
In ELEGANT is there a way to directly get the chromatic amplitude functions (Wx, Wy)? I see only dbetax/dp and dbetay/dp in the .twi file but not dalphax/dp and dalphy/dp -- both dalpha/dp and dbeta/dp are needed to get the chromatic amplitude.
Thank you, -- Philippe.

Re: chromatic functions

Posted: 30 Jul 2016, 17:04
by michael_borland
Philippe,

dalphax/dp and dalphay/dp were added in a recent version. If you update to the latest release you'll find them. They are present as parameters in the &twiss_output output file and also available in the optimizer.

--Michael

Re: chromatic functions

Posted: 31 Jul 2016, 12:48
by Philippe Piot
Michael,
Indeed I had an old version on my laptop -- also I think there is no mention [yet ;-)] of the dalphax/dp and dalphay/dp in the doc under the twiss output section. Thank you very much for your prompt answer. All the best, -- Philippe.

Re: chromatic functions

Posted: 01 Aug 2016, 07:52
by michael_borland
Philippe,

I didn't realize it wasn't in the manual. Thanks for pointing it out.

--Michael

Re: chromatic functions

Posted: 07 Sep 2016, 09:30
by Philippe Piot
Michael,
To follow up with this question about chromatic function (dbetax/dp and dalphax/dp). Would it be possible to dump these functions as a function of the distance along the beamline -- right now they are evaluated at the end of the beam line. Is there an easy way to do so without modifying elegant? Thank you, -- Philippe.

Re: chromatic functions

Posted: 09 Sep 2016, 15:52
by michael_borland
Philippe,

Unfortunately, elegant only computes the relevant quantities at the end of the beamline. In principle we could extend this to compute them vs s, but that would be a considerable modification of the code. I'll add it to the list of future improvements.

One not very pretty suggestion is to form beamlines that start and end at different locations, so end of the calculated beamline moves along the system. If your beamline is created by a script, this might not be too unpleasant.

--Michael

Re: chromatic functions

Posted: 06 Feb 2018, 15:12
by Björklund
Hi!

Is there a good way of obtaining the twiss functions as functions of relative momentum offset at one point in s, as in Figures 2 and 4 in C. A. Lindstrøm and E. Adli, Phys. Rev. Accel. Beams 19, 071002, 2016 (https://journals.aps.org/prab/abstract/ ... .19.071002), or perhaps plot the beta functions with energy spread along s as in Figure 1 of the same paper? I have optimized my beamline using the chromatic derivatives of the twiss functions and I want to plot in principle the same thing as in those figures, to examine the behavior.

Also, maybe a litte off-topic, is it possible to also obtain higher-order dispersion along s for single-pass lattices? I have some large-dp/p beams that exhibit some non-linear residual slice offsets when the dispersion and its momentum derivative is closed. I could post in a new thread about this if it seems warrated.

Best regards
Jonas