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!
Error In X-Plane Emittance Calculation
Moderators: cyao, michael_borland
Error In X-Plane Emittance Calculation
- Attachments
-
- example.zip
- (11.73 MiB) Downloaded 322 times
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Error In X-Plane Emittance Calculation
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
I modified your script to do this. Also, you can use the sddsanalyzebeam program.
--Michael
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Error In X-Plane Emittance Calculation
Here's the modified script.
--Michael
--Michael
- Attachments
-
- example1.zip
- (451 Bytes) Downloaded 352 times
Re: Error In X-Plane Emittance Calculation
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
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
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Error In X-Plane Emittance Calculation
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
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