[430] | 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=twiss,column=name,s,betx,bety,dx,dy; |
---|
| 12 | |
---|
| 13 | TWISS,file=twiss_madx_ring; |
---|
| 14 | |
---|
| 15 | SHOW,TWSSip; ! SHOW parameters (see "*.out" file) |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | ! Initialize PTC |
---|
| 19 | ptc_create_universe; |
---|
| 20 | ptc_create_layout,model=2,method=6,nst=10,exact; |
---|
| 21 | ptc_align; |
---|
| 22 | |
---|
| 23 | select,flag=ptc_twiss,column=name,s,beta11,beta21, |
---|
| 24 | beta12,beta22,disp1,disp3,x,px,y,py; |
---|
| 25 | |
---|
| 26 | ptc_twiss,closed_orbit,icase=5,file=twiss_ptc_ring,no=2; |
---|
| 27 | |
---|
| 28 | PTC_NORMAL,closed_orbit,maptable,icase=5,no=2; |
---|
| 29 | |
---|
| 30 | ptc_end; |
---|
| 31 | |
---|
| 32 | !write,table="map_table",file="map_table"; |
---|
| 33 | write,table="map_table",file="ring_matrix_at_end"; |
---|
| 34 | |
---|
| 35 | !=========== TRANSFER-LINE PARAMETERS ==================================== |
---|
| 36 | |
---|
| 37 | call, file = "../share/line_lattice/line.seq"; |
---|
| 38 | |
---|
| 39 | select,flag=ptc_twiss,clear; |
---|
| 40 | select,flag=ptc_twiss,column=name,s,beta11,beta21,beta12,beta22,disp1,disp3; |
---|
| 41 | ptc_create_universe; |
---|
| 42 | ptc_create_layout,model=2,method=6,nst=5,exact; |
---|
| 43 | |
---|
| 44 | ! Example 3: Read transfer matrix from table ============================ |
---|
| 45 | |
---|
| 46 | !ptc_setswitch, debuglevel=3; |
---|
| 47 | |
---|
| 48 | ptc_twiss,icase=5,no=2,initial_matrix_table, file=twiss_ptc_line; |
---|
| 49 | |
---|
| 50 | ptc_end; |
---|
| 51 | stop; |
---|