One feature that would be very useful is the ability to use formulas to define magnet settings directly in the lattice file.
I often do that when I design a chicane or other symmetric piece of beam line. I am aware we can use expressions in the command file but is it
possible in the lattice file?
using formulas in lattice files.
Moderators: cyao, michael_borland
Re: using formulas in lattice files.
never mind. I think I answered my own question. I can define the variable in the lattice file and write the expressions in the command file.
-
- Posts: 1831
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: using formulas in lattice files.
Yves,
You can also put expressions directly into the lattice file, e.g,.
! Define a rectangular bend for a ring with 80 equal bends
% pi 40 / sto myAngle
B1: SBEN,L=1.0,ANGLE=''myAngle'',E1=''myAngle 2 /'',E2=''myAngle 2 /''
-Michael
You can also put expressions directly into the lattice file, e.g,.
! Define a rectangular bend for a ring with 80 equal bends
% pi 40 / sto myAngle
B1: SBEN,L=1.0,ANGLE=''myAngle'',E1=''myAngle 2 /'',E2=''myAngle 2 /''
-Michael