Page 1 of 1

Wien filter

Posted: 02 Dec 2025, 04:53
by EsraaKh
Hallo Michael

Would you explain how to insert in the accelerator beam line addtional element - Wien filter in the Elegant simulation program?
Would you also provide an example?
Let's assume in units of meters that the x-direction is horizontal, the y-direction is vertical, and the z-direction is the direction of the moving beam.
The Wien filter is defined as a box containing homogeneous electrical Ex and magnetic By fields independent of the z coordinate.

Best regards
Esraa

Re: Wien filter

Posted: 15 Dec 2025, 18:57
by michael_borland
Esraa,

There's no built-in way to do this in elegant. I used ChatGPT to write a python script that can be used with the SCRIPT element to insert a Wien filter into a beamline.

See the attached files.

--Michael