source: PSPA/madxPSPA/tests/test-ptc-twiss-old2/test-ptc-twiss-old2.madx

Last change on this file was 430, checked in by touze, 11 years ago

import madx-5.01.00

File size: 1.6 KB
Line 
1!TITLE,'Test input for PTC_TWISS';
2
3!=========== RING PARAMETERS ===========================================
4call, file = "../share/ring_lattice/ring.seq";
5
6
7! At the end of the ring the data_block is produced
8
9SAVEBETA, label=TWSSip, place=#E,sequence=fivecell;
10
11select,flag=twiss,column=name,s,betx,bety,dx,dy;
12
13TWISS,file=twiss_madx_ring;
14
15SHOW,TWSSip;     ! SHOW parameters (see "*.out" file)
16
17
18! Initialize PTC
19ptc_create_universe;
20ptc_create_layout,model=2,method=6,nst=10,exact;
21ptc_align;
22
23select,flag=ptc_twiss,column=name,s,beta11,beta21,
24                                  beta12,beta22,disp1,disp3,x,px,y,py;
25
26ptc_twiss,closed_orbit,icase=5,file=twiss_ptc_ring,no=1;
27
28PTC_NORMAL,closed_orbit,maptable,icase=5,no=1;
29
30ptc_end;
31
32!write,table="map_table",file="map_table";
33write,table="map_table",file="ring_matrix_at_end";
34
35!=========== TRANSFER-LINE PARAMETERS ====================================
36
37call, file = "../share/line_lattice/line.seq";
38
39select,flag=ptc_twiss,clear;
40select,flag=ptc_twiss,column=name,s,beta11,beta21,beta12,beta22,disp1,disp3;
41
42ptc_create_universe;
43ptc_create_layout,model=2,method=6,nst=5,exact;
44                                   
45! Example 2: Input twiss parameters manually  ==============================
46ptc_twiss,icase=5,no=1,
47          betx=177.6823337,bety=32.05718846,alfx=-2.411683347,alfy=0.4797516839,
48          dx=2.176379444,dpx=0.02964538223,mux=1.254518853,muy=1.25446531,
49          x= 8.897806712109201E-05,px=7.283918352660537E-07,
50          y=5.216050332314255E-05, py=-6.748041062611770E-07,
51          file=twiss_ptc_line;
52ptc_end;
53stop;
Note: See TracBrowser for help on using the repository browser.