Page 1 of 1

sddsanalyzebeam Twiss parameters

Posted: 18 Oct 2022, 09:02
by Adam_Dixon
Hello,

I am looking into how slice Twiss parameters evolve through a bunch compressor. I do this by slicing the beam and assigning each particle to a slice, then I use sddsanalyzebeam on each slice to get the slice beta and alpha along the bunch compressor. Typically I do this with a 2,000,000 macro-particles and have used 20-600 longitudinal slices. I've noticed the slice Twiss parameters were larger than the whole beam Twiss parameters from twiss_output. I assigned the particles to a single slice to check whether the sddsanalyzebeam Twiss match that of twiss_output, in case there problem was the number of slices, but I still found the Twiss parameters from sddsanalyzebeam were much larger than from twiss_output. I find that more slices I use the larger the slice parameters get. The corrected geometric emittance and sigma beam size from sddsanalyzebeam match the sigma output file.

I have attached plots of beta, ecx and Sx along the bunch compressor using *twiss and *sigma output files, and using the equivalent single 'slice' beta, ecx and Sx from sddsanalyzebeam at each watch file. Also attached the *ele and *lte and initial bunch.

Do you understand why the beta from *twiss output and sddsanalyzebeam are different here?

Re: sddsanalyzebeam Twiss parameters

Posted: 18 Oct 2022, 09:04
by Adam_Dixon
Here are the figures comparing twiss and sigma output compared to those from sddsanalyzebeam. It also won't let me attached the initial bunch distribution.

Thanks,
Adam

Re: sddsanalyzebeam Twiss parameters

Posted: 20 Oct 2022, 12:34
by michael_borland
Adam,

Are you using the -correctedOnly option on sddsanalyzebeam, to get the true beta functions (with suppression of dispersive effects)? Either that, or look at the betacx, betacy, etc, values.

--Michael

Re: sddsanalyzebeam Twiss parameters

Posted: 21 Oct 2022, 04:17
by Adam_Dixon
Hi Michael,

I'm not using the -correctedOnly option, but in the above beta function plot betax and betacx are the uncorrected and corrected values from sddsanalyzebeam. Where both are larger than the twiss_output (betax.twi) values.

Adam

Re: sddsanalyzebeam Twiss parameters

Posted: 21 Oct 2022, 10:25
by michael_borland
Adam,

Can you provide the file input/BC2.W-INIT and any other input files I might need to run this?

--Michael

Re: sddsanalyzebeam Twiss parameters

Posted: 21 Oct 2022, 11:48
by Adam_Dixon
I have attached BC2.W-INIT. The script I used to slice the beam and track the slices, is similar to what you provided here - viewtopic.php?t=1201.

Adam

Re: sddsanalyzebeam Twiss parameters

Posted: 27 Oct 2022, 16:48
by michael_borland
Adam,

The discrepancy appears to be due to strong chromatic effects. If I convert the entire lattice to use matrix-based tracking (SBEN, QUAD, SEXT), then set default_order=1 in run_setup, the beta functions agree between max4.twi and max4.sig. However, if I set default_order=2, the discrepancy appears. If I set the energy spread to zero, there's agreement even with default_order=2.

The twiss parameter computation can't include such effects, whereas determination of twiss parameters from particle distributions necessarily has them (if the tracking is so configured).

--Michael

Re: sddsanalyzebeam Twiss parameters

Posted: 02 Nov 2022, 05:47
by Adam_Dixon
Thanks for the help Michael!