ColwynGulliford/lume-gpt

Add rectmagnet element

Closed this issue · 5 comments

Users would like an element for handling the GPT rectmanget element.

Can this element be independent of the beam parameters? I would like a simple description of xstart, zstart, xend, zend, B0, gap. It could be also specified by its center, Lx, Lz and two xhat, yhat vectors for rotations but I personally do not need that.

I'll need to take a look at the GPT manual for that element, but I agree it's best to make it independent of the beam parameters if possible.

I looked into this and here are a few things:

  1. Using a rectmagnet with the Lattice designer will take a little extra work - the Lattice tools are really for making s-based lattice designs, where as GPT's rectmagnet object is more of a general 3d object. It can be made to work, but requires more work than I thought.

  2. In as s-based code you need a reference trajectory, and in order to make a reference particle follow that trajectory you need a reference momentum. One can of course simply set the field but even for the sectormagnet examples, the momentum there should be thought of as the reference momentum - which is often something that is known more easily than say, the B-field value.

Added rectmagnet to latest release.