Dear Didier,
As I was trying to evaluate the dispersion of a dipole, I found that I get different values from TraceWin, Trace3D and matrix calculation. While looking in more detail, I found difference between tracewin EDGE matrix and the matrix calculation I did using the same definitions as in the documentation of TraceWin. However Trace3D is in agreement with my calculation. I would like to clarify if some definition changed in TraceWin or if we can understand where these differences come from.
Thanks in advance,
Sophie
Matrix of dipole edge
Matrix of dipole edge
- Attachments
-
- 202611_dipole_edge.py
- (2.09 KiB) Downloaded 6 times
-
- test_dispesion_dipole.ini
- (43.77 KiB) Downloaded 6 times
-
- test_dispesion_dipole.dat
- (114 Bytes) Downloaded 15 times
Re: Matrix of dipole edge
Dear Sophie,
I don't think the definitions of dipoles and edge have changed in TraceWin, but it's difficult to verify based on the documentation, so I give the documentation, the source code, your Python code, and the *.dat file to 2 AI and both concluded that the three were identical except for the rounding you do in the Python code with the line "round(..., 1)” that appears throughout the code.
Of course, they could be wrong, could you show me the differences you’ve noticed? That might help me dig a little deeper.
Regards,
Didier
I don't think the definitions of dipoles and edge have changed in TraceWin, but it's difficult to verify based on the documentation, so I give the documentation, the source code, your Python code, and the *.dat file to 2 AI and both concluded that the three were identical except for the rounding you do in the Python code with the line "round(..., 1)” that appears throughout the code.
Of course, they could be wrong, could you show me the differences you’ve noticed? That might help me dig a little deeper.
Regards,
Didier
Re: Matrix of dipole edge
Dear Didier,
The difference that I noticed are directly linked to the edge matrix calculation. For example, the term tan(beta)/|rho| gives me in 2.1 in my code, but in TraceWin simulation, the matrix term of the first element is 10.355339 in structure matrix term.
Regards,
Sophie
The difference that I noticed are directly linked to the edge matrix calculation. For example, the term tan(beta)/|rho| gives me in 2.1 in my code, but in TraceWin simulation, the matrix term of the first element is 10.355339 in structure matrix term.
Regards,
Sophie
Re: Matrix of dipole edge
Dear Sophie,
Unless I'm mistaken, with "EDGE 22.5 40 0.45 2.80 20 0," beta = 22.5° and rho = 0.04 m, which does indeed give tan(beta)/|rho| = 10.355!
Regards,
Didier
Unless I'm mistaken, with "EDGE 22.5 40 0.45 2.80 20 0," beta = 22.5° and rho = 0.04 m, which does indeed give tan(beta)/|rho| = 10.355!
Regards,
Didier
Re: Matrix of dipole edge
Dear Didier,
You are right. But 0.04 is not the curvature radius which means I forgot a parameter in EDGE. Thanks.
Regards,
Sophie
You are right. But 0.04 is not the curvature radius which means I forgot a parameter in EDGE. Thanks.
Regards,
Sophie
-
gwhitlock68 - Beginner

- Posts: 7
- Joined: Sat 31 Oct 2026 04:36
- Country:
France (fr)
Re: Matrix of dipole edge
smorard, happens to everyone mate, had the exact same thing go wrong on a beam optics calc years back, missed a parameter and spent half a day chasing a ghost. at least the rest of the matrix checked out fine, ta for sorting itsmorard wrote:But 0.04 is not the curvature radius which means I forgot a parameter in EDGE.

