Matrix of dipole edge

https://www.dacm-logiciels.fr/tracewin
Post Reply
Francesmorard
Neophyte
Neophyte
Posts: 11
Joined: Fri 6 Mar 2026 13:47
Country:
France (fr)
France

Matrix of dipole edge

Post by Francesmorard »

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
Attachments
202611_dipole_edge.py
(2.09 KiB) Downloaded 6 times
test_dispesion_dipole.ini
(43.77 KiB) Downloaded 7 times
test_dispesion_dipole.dat
(114 Bytes) Downloaded 15 times
User avatar
FranceDidier
Administrator
Administrator
Posts: 1367
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: Matrix of dipole edge

Post by FranceDidier »

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
Francesmorard
Neophyte
Neophyte
Posts: 11
Joined: Fri 6 Mar 2026 13:47
Country:
France (fr)
France

Re: Matrix of dipole edge

Post by Francesmorard »

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
User avatar
FranceDidier
Administrator
Administrator
Posts: 1367
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: Matrix of dipole edge

Post by FranceDidier »

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
Francesmorard
Neophyte
Neophyte
Posts: 11
Joined: Fri 6 Mar 2026 13:47
Country:
France (fr)
France

Re: Matrix of dipole edge

Post by Francesmorard »

Dear Didier,

You are right. But 0.04 is not the curvature radius which means I forgot a parameter in EDGE. Thanks.

Regards,
Sophie
Francegwhitlock68
Beginner
Beginner
Posts: 7
Joined: Sat 31 Oct 2026 04:36
Country:
France (fr)
France

Re: Matrix of dipole edge

Post by Francegwhitlock68 »

smorard wrote:But 0.04 is not the curvature radius which means I forgot a parameter in 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 it 👍
Post Reply