Page 1 of 1

Error In X-Plane Emittance Calculation

Posted: 26 May 2016, 11:01
by Zamank
Hi All,

Have a sort of odd problem I ran into yesterday with ELEGANT. I wrote a script manually calculating the x-plane emittance of a beam at some watch point at the exit of a bunch compressor (BX24DEND.out). The issue comes from a significant discrepancy from my calculated emittance and the emittance that ELEGANT gives in the *.sig file. I am specifically looking at BX24DEND.out.

*.sig file gives for {ex,enx} = {1.752717e-08 ,6.803332e-06}

My manual calculation gives {ex,enx} = {4.244864e-08 ,1.661392e-05}

Was wondering if anyone has any idea as to why this is happening?

Relevant files are attached.

Thanks in advance!

Re: Error In X-Plane Emittance Calculation

Posted: 26 May 2016, 14:13
by michael_borland
The problem is that the beam has a non-zero x and x' centroid. These must be subtracted off before you compute the emittance. This is done for the emittance calculations report in the .sig file.

I modified your script to do this. Also, you can use the sddsanalyzebeam program.

--Michael

Re: Error In X-Plane Emittance Calculation

Posted: 26 May 2016, 14:14
by michael_borland
Here's the modified script.

--Michael

Re: Error In X-Plane Emittance Calculation

Posted: 26 May 2016, 14:22
by Zamank
Hi Michael,

First thank for the reply; very helpful! Second, just to check my understanding:

The x,xp value of the *.out file are then measured with respect to the beam's centroid coordinates and not the on energy ideal particle?

Thanks

Re: Error In X-Plane Emittance Calculation

Posted: 26 May 2016, 14:33
by michael_borland
The coordinates in the output file are measured with respect to the reference axis of the accelerator, which would nominally be the location of the ideal on-momentum particle (assuming no correctors are powered, etc).

The version of the script that I sent does not modify the elegant output file, but simply prints the results after doing the computations with the average values removed.

--Michael