1 | !TITLE,'Test input for PTC_TWISS'; |
---|
2 | |
---|
3 | !=========== RING PARAMETERS =========================================== |
---|
4 | call, file = "../share/ring_lattice/ring.seq"; |
---|
5 | |
---|
6 | |
---|
7 | ! At the end of the ring the data_block is produced |
---|
8 | |
---|
9 | SAVEBETA, label=TWSSip, place=#E,sequence=fivecell; |
---|
10 | |
---|
11 | !select,flag=my_sect_table,! added 16:10 |
---|
12 | !column=name,pos,k1,r1,r36,t1,t216; ! added 16:10 |
---|
13 | !sectormap,sectortable=my_sect_table,sectorfile=my_sect_file; ! added 16:10 |
---|
14 | |
---|
15 | select,flag=twiss,column=name,s,betx,bety,dx,dy; ! dx, dy are dispersions |
---|
16 | TWISS,centre,file=twiss_madx_ring; ! jluc : centre |
---|
17 | |
---|
18 | SHOW,TWSSip; ! SHOW parameters (see "*.out" file) |
---|
19 | |
---|
20 | ! added 20 nov 2008: |
---|
21 | plot vaxis1=betx,vaxis2=dx,haxis=s; |
---|
22 | |
---|
23 | ! Initialize PTC |
---|
24 | ptc_create_universe; |
---|
25 | ptc_create_layout,model=2,method=6,nst=10,exact; |
---|
26 | !ptc_create_layout,model=2,method=6,nst=1,exact; ! steps pb more apparent |
---|
27 | !ptc_create_layout,model=2,method=6,nst=4,exact; ! looks like 2 is minimum to split the element at the middle... |
---|
28 | ptc_align; |
---|
29 | |
---|
30 | select,flag=ptc_twiss,column=name,s,beta11,beta21, |
---|
31 | beta12,beta22,disp1,disp3,x,px,y,py; |
---|
32 | |
---|
33 | ptc_twiss,closed_orbit,icase=5,file=twiss_ptc_ring,summary_file=twiss_ptc_summary,no=4; |
---|
34 | ptc_twiss,closed_orbit,icase=5,slice_magnets,file=twiss_ptc_ring_slices,no=4; |
---|
35 | |
---|
36 | PTC_NORMAL,closed_orbit,maptable,icase=5,no=4; |
---|
37 | |
---|
38 | ptc_end; |
---|
39 | |
---|
40 | !write,table="map_table",file="map_table"; |
---|
41 | write,table="map_table",file="ring_matrix_at_end"; |
---|
42 | |
---|
43 | !=========== TRANSFER-LINE PARAMETERS ==================================== |
---|
44 | |
---|
45 | call, file = "../share/line_lattice/line.seq"; |
---|
46 | |
---|
47 | select,flag=ptc_twiss,clear; |
---|
48 | select,flag=ptc_twiss,column=name,s,beta11,beta21,beta12,beta22,disp1,disp3; |
---|
49 | |
---|
50 | ptc_create_universe; |
---|
51 | ptc_create_layout,model=2,method=6,nst=5,exact; |
---|
52 | |
---|
53 | ! Example 2: Input twiss parameters manually ============================== |
---|
54 | ptc_twiss,icase=5,no=4, |
---|
55 | betx=177.6823337,bety=32.05718846,alfx=-2.411683347,alfy=0.4797516839, |
---|
56 | dx=2.176379444,dpx=0.02964538223,mux=1.254518853,muy=1.25446531, |
---|
57 | x= 8.897806712109201E-05,px=7.283918352660537E-07, |
---|
58 | y=5.216050332314255E-05, py=-6.748041062611770E-07, |
---|
59 | file=twiss_ptc_line; |
---|
60 | ptc_end; |
---|
61 | stop; |
---|