Page 1 of 1

Lattice definition without drifts

Posted: 23 Feb 2015, 08:32
by MDP
Dear elegant users and experts,

I was wondering if there is a possibility to define an elegant lattice (like in mad) without drifts.

The problem is that we generate automatically a lattice file from a list of elements where the element's center positions and their lengths are defined. Depending on the chosen beamline, some of the dipoles (SBENDs) are switched on and others are off (e.g. the injector dump dipole...). The drift length before and after the dipoles depend on the arc length in the dipole and changed when the dipole is switched on. We would like to have a possibility to define the lattice without making a distinction of cases wether if the dipole is on or off when we define the drifts.

A lattice definition using only the positions of the elements would help. Do you know if that is possible in elegant?

Many thanks in advance!

Best,
Matthias

Re: Lattice definition without drifts

Posted: 23 Feb 2015, 09:15
by michael_borland
Matthias,

Unfortunately, there isn't a way to do this in elegant. The only thing I can suggest is to define MARK elements that have known positions in global coordinates. You can then use the optimizer to adjust drifts to move the MARK elements to the desired locations.

--Michael