Skip to content

Commit ba1bc6a

Browse files
committed
Modify Python and MAD-X input
1 parent 63dca74 commit ba1bc6a

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

examples/chicane/chicane.madx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ D3: drift, L=2.0;
88
! theta=0.50037/10.35;
99
! inv_rho=1.0/10.35
1010
! TODO put `angle=theta` for SBENDs and `e1=theta` for DIPEDGEs with their right sign
11-
SB1: sbend, L=0.50037, angle=-0.04834492753623188, e1=0.000, e2=0.000, k1=0.00;
12-
SB2: sbend, L=0.50037, angle=0.04834492753623188, e1=0.000, e2=0.000, k1=0.00;
11+
SB1: sbend, L=0.500194828041958, angle=-0.04834492753623188, e1=0.000, e2=0.000, k1=0.00;
12+
SB2: sbend, L=0.500194828041958, angle=0.04834492753623188, e1=0.000, e2=0.000, k1=0.00;
1313
! dipole edge elements
14-
DIPE1: dipedge, H=-0.0966183574879227, e1=-0.048345620280243, fint=0.000, hgap=0.000, tilt=0.00;
15-
DIPE2: dipedge, H=0.0966183574879227, e1=0.048345620280243, fint=0.000, hgap=0.000, tilt=0.00;
14+
DIPE1: dipedge, H=-0.096653578905433, e1=-0.048345620280243, fint=0.000, hgap=0.000, tilt=0.00;
15+
DIPE2: dipedge, H=0.096653578905433, e1=0.048345620280243, fint=0.000, hgap=0.000, tilt=0.00;
1616

1717
CHICANE: Line=(M1,SB1,DIPE1,D1,DIPE2,SB2,D2,SB2,DIPE2,D1,DIPE1,SB1,D3,M1);
1818
USE, SEQUENCE = CHICANE;

examples/chicane/run_chicane.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,18 @@
4848

4949
# design the accelerator lattice
5050
ns = 25 # number of slices per ds in the element
51-
rc = 10.35 # bend radius (meters)
51+
rc = 10.3462283686195526 # bend radius (meters)
5252
psi = 0.048345620280243 # pole face rotation angle (radians)
53+
lb = 0.500194828041958 # projected bend length (meters)
5354

5455
# Drift elements
5556
dr1 = elements.Drift(ds=5.0058489435, nslice=ns)
5657
dr2 = elements.Drift(ds=1.0, nslice=ns)
5758
dr3 = elements.Drift(ds=2.0, nslice=ns)
5859

5960
# Bend elements
60-
sbend1 = elements.Sbend(ds=0.50037, rc=-rc, nslice=ns)
61-
sbend2 = elements.Sbend(ds=0.50037, rc=rc, nslice=ns)
61+
sbend1 = elements.Sbend(ds=lb, rc=-rc, nslice=ns)
62+
sbend2 = elements.Sbend(ds=lb, rc=rc, nslice=ns)
6263

6364
# Dipole Edge Focusing elements
6465
dipedge1 = elements.DipEdge(psi=-psi, rc=-rc, g=0.0, K2=0.0)

0 commit comments

Comments
 (0)