1 | <head> |
---|
2 | <title>PRINT / SELECT</title> |
---|
3 | <!-- Changed by: Chris ISELIN, 27-Jan-1997 --> |
---|
4 | <!-- Changed by: Frank Schmidt, 28-Jun-2002 --> |
---|
5 | <!-- Changed by: Hans Grote, 23-Sep-2002 --> |
---|
6 | </head> |
---|
7 | |
---|
8 | <body bgcolor="#ffffff"> |
---|
9 | |
---|
10 | <h1>Output Selection Statements</h1> |
---|
11 | |
---|
12 | <hr> |
---|
13 | <a href="beam.html"> |
---|
14 | <img src="/icons/left.gif" alt="Previous:" align=middle> |
---|
15 | BEAM: Set Beam Parameters</a> |
---|
16 | <a href="action.html"> |
---|
17 | <img src="/icons/up.gif" alt="Up:" align=middle> |
---|
18 | Action Commands</a> |
---|
19 | <a href="split.html"> |
---|
20 | <img src="/icons/right.gif" alt="Next:" align=middle> |
---|
21 | SPLIT: Request Interpolation for OPTICS</a> |
---|
22 | <hr> |
---|
23 | |
---|
24 | Each position in the beam line carries several associated selection flags. |
---|
25 | They are initially cleared by the USE command when the beam line is expanded. |
---|
26 | Output is <a href="ranges.html">selected</a> by setting some of these flags |
---|
27 | by one of the commands |
---|
28 | <pre> |
---|
29 | PRINT,RANGE=range{,range},TYPE=type{,type},FULL,CLEAR |
---|
30 | SELECT,FLAG=name,RANGE=range{,range},TYPE=type{,type},FULL,CLEAR |
---|
31 | </pre> |
---|
32 | (See <a href="ranges.html">obsolete element selection</a>). |
---|
33 | As from Version 8.18 the <a href="new_select.html">new element selection</a> |
---|
34 | is used: |
---|
35 | <pre> |
---|
36 | PRINT,RANGE=range,CLASS=class,PATTERN=pattern[,FULL][,CLEAR] |
---|
37 | SELECT,FLAG=name,RANGE=range,CLASS=class,PATTERN=pattern[,FULL][,CLEAR] |
---|
38 | </pre> |
---|
39 | The PRINT command always affects the print flag for |
---|
40 | <a href="survey.html">SURVEY</a>, or |
---|
41 | <a href="survey.html">TWISS</a>. |
---|
42 | In SELECT the flag type is chosen by the attribute FLAG: |
---|
43 | Three of its possible values affect action commands: |
---|
44 | <p>TWISS: |
---|
45 | A SELECT,TWISS statement is equivalent to PRINT: |
---|
46 | The two commands |
---|
47 | <pre> |
---|
48 | PRINT, FULL |
---|
49 | SELECT, FLAG=TWISS,FULL |
---|
50 | </pre> |
---|
51 | have identical effect. |
---|
52 | <p>OPTICS: |
---|
53 | Selects output positions for <a href="optics.html">OPTICS</a>. |
---|
54 | <p>TRACK: |
---|
55 | Selects print positions for <a href="track.html">TRACK</a>. |
---|
56 | Care must be taken in using this option, as it may generate a lot of |
---|
57 | output. |
---|
58 | <p> |
---|
59 | Four more values are intended for debugging only: |
---|
60 | <ul> |
---|
61 | <li>FIRST: |
---|
62 | Selects dumping of first-order transfer matrices for selected |
---|
63 | elements during closed orbit search in TWISS: |
---|
64 | <li>SECOND: |
---|
65 | Selects dumping of second-order TRANSPORT maps for selected |
---|
66 | elements during their accumulation in TWISS: |
---|
67 | <li>REFER: |
---|
68 | Selects dumping of first-order transfer matrices for selected |
---|
69 | elements during accumulation for adjusting RF cavities. |
---|
70 | <li>LIE: |
---|
71 | Selects dumping of Lie-algebraic maps during their accumulation. |
---|
72 | <li>ERROR: |
---|
73 | Selects error definition and/or printing for the commands |
---|
74 | <a href="error_align.html">EALIGN</a>, |
---|
75 | <a href="error_field.html">EFIELD</a>, |
---|
76 | <a href="error_field.html">EFCOMP</a>, and |
---|
77 | <a href="error_print.html">EPRINT</a>. |
---|
78 | </ul> |
---|
79 | PRINT and/or SELECT command(s) |
---|
80 | must be placed after the USE command, |
---|
81 | and before any action command (e.g. TWISS) to be affected. |
---|
82 | Regardless of the setting of print flags, |
---|
83 | start and end points of the computation range are always printed |
---|
84 | by NORMAL, SURVEY, and TWISS: |
---|
85 | <p> |
---|
86 | Examples: |
---|
87 | <pre> |
---|
88 | USE,OCT ! print at beginning and end only |
---|
89 | PRINT,#35/37 ! print at positions number 35 to 37 |
---|
90 | SELECT,TWISS,FULL ! set all print flags |
---|
91 | PRINT,CLEAR ! clear all print flags |
---|
92 | PRINT,OCT ! set all print flags |
---|
93 | PRINT,CELL[3],CLEAR ! clear all flags, |
---|
94 | ! then set flags for all of third CELL |
---|
95 | </pre> |
---|
96 | |
---|
97 | <H2><a name=example>Examples for Element Selections</a></H2> |
---|
98 | First example: |
---|
99 | <pre> |
---|
100 | ! Define element classes for a simple cell: |
---|
101 | B: SBEND,L=35.09, ANGLE = 0.011306116 |
---|
102 | QF: QUADRUPOLE,L=1.6,K1=-0.02268553 |
---|
103 | QD: QUADRUPOLE,L=1.6,K1=0.022683642 |
---|
104 | SF: SEXTUPOLE,L=0.4,K2=-0.13129 |
---|
105 | SD: SEXTUPOLE,L=0.76,K2=0.26328 |
---|
106 | ! Define the cell as a sequence: |
---|
107 | CELL: SEQUENCE |
---|
108 | B1: B, AT=19.115 |
---|
109 | SF1: SF, AT=37.42 |
---|
110 | QF1: QF, AT=38.70 |
---|
111 | B2: B, AT=58.255,ANGLE=B1[ANGLE] |
---|
112 | SD1: SD, AT=76.74 |
---|
113 | QD1: QD, AT=78.20 |
---|
114 | ENDM: MARKER, AT=79.0 |
---|
115 | ENDSEQUENCE |
---|
116 | USE,CELL |
---|
117 | SELECT,OPTICS,SBEND,QUAD,SEXT |
---|
118 | OPTICS,FILENAME="cell.optics.f",EXIT,COLUMN=NAME,S,BETX,BETY |
---|
119 | </pre> |
---|
120 | The resulting table file is: |
---|
121 | <pre> |
---|
122 | @ GAMTR %f 64.3336 |
---|
123 | @ ALFA %f 0.241615E-03 |
---|
124 | @ XIY %f -.455678 |
---|
125 | @ XIX %f 2.05279 |
---|
126 | @ QY %f 0.250049 |
---|
127 | @ QX %f 0.249961 |
---|
128 | @ CIRCUM %f 79.0000 |
---|
129 | @ DELTA %f 0.000000E+00 |
---|
130 | @ COMMENT %20s "DATA FOR TEST CELL" |
---|
131 | @ ORIGIN %24s "MAD 8.01 IBM - VM/CMS" |
---|
132 | @ DATE %08s "19/06/89" |
---|
133 | @ TIME %08s "09.47.40" |
---|
134 | * NAME S BETX BETY |
---|
135 | $ %16s %f %f %f |
---|
136 | B1 36.6600 24.8427 126.380 |
---|
137 | SF1 37.6200 23.8830 130.925 |
---|
138 | QF1 39.5000 23.6209 132.268 |
---|
139 | B2 75.8000 124.709 25.2153 |
---|
140 | SD1 77.1200 130.933 23.8718 |
---|
141 | QD1 79.0000 132.277 23.6098 |
---|
142 | </pre> |
---|
143 | Second Example. |
---|
144 | The following is an excerpt of the LEP description: |
---|
145 | <pre> |
---|
146 | ! Bending magnet pairs: |
---|
147 | ! The definitions take into account the different magnetic length |
---|
148 | ! for the inner and outer pairs of a group of six. |
---|
149 | B2: RBEND, L=11.55,ANGLE=KMB2,K1=KQB,K2=KSB, & |
---|
150 | E1=-.25*B2[ANGLE],E2=-.25*B2[ANGLE] |
---|
151 | B2OUT: B2, ANGLE=1.00055745184472*KMB2, & |
---|
152 | E1=-.25*B2OUT[ANGLE],E2=-.25*B2OUT[ANGLE] |
---|
153 | B2MID: B2, ANGLE=1.00111490368947*KMB2, & |
---|
154 | E1=-.25*B2MID[ANGLE],E2=-.25*B2MID[ANGLE] |
---|
155 | |
---|
156 | ! Quadrupoles: |
---|
157 | MQ: QUADRUPOLE,L=1.6 ! standard quadrupoles = |
---|
158 | QD: MQ, K1=KQD ! cell quadrupoles, defocussing |
---|
159 | QF: MQ, K1=KQF !cell quadrupoles, focussing |
---|
160 | |
---|
161 | ! Sextupoles: |
---|
162 | MSF: SEXTUPOLE, L=0.40 ! F sextupoles |
---|
163 | MSD: SEXTUPOLE, L=0.76 ! D sextupoles |
---|
164 | SF1.2: MSF, K2=KSF1.2 ! F family 1, circuit 2 |
---|
165 | SF2.2: MSF, K2=KSF2.2 ! F family 2, circuit 2 |
---|
166 | SF3.2: MSF, K2=KSF3.2 ! F family 3, circuit 2 |
---|
167 | SD1.2: MSD, K2=KSD1.2 ! D family 1, circuit 2 |
---|
168 | SD2.2: MSD, K2=KSD2.2 ! D family 2, circuit 2 |
---|
169 | SD3.2: MSD, K2=KSD3.2 ! D family 3, circuit 2 |
---|
170 | |
---|
171 | ! Orbit correctors and monitors: |
---|
172 | CH: HKICK, L=0.4 ! Horizontal orbit correctors |
---|
173 | CV: VKICK, L=0.4 ! Vertical orbit correctors |
---|
174 | MHV: MONITOR, L=0 ! Orbit position monitors |
---|
175 | |
---|
176 | LEP:SEQUENCE |
---|
177 | ... |
---|
178 | QF23.R1: QF, AT=639.180037 |
---|
179 | SF2.QF23.R1: SF2.2, AT=640.460037 |
---|
180 | B2L.QF23.R1: B2OUT, AT=647.257037 |
---|
181 | B2M.QD24.R1: B2MID, AT=659.147037 |
---|
182 | B2R.QD24.R1: B2OUT, AT=671.037037 |
---|
183 | CV.QD24.R1: CV, AT=677.392037, KICK=KCV24.R1 |
---|
184 | PU.QD24.R1: MHV, AT=677.712037 |
---|
185 | QD24.R1: QD, AT=678.680037 |
---|
186 | SD2.QD24.R1: SD2.2, AT=680.140037 |
---|
187 | B2L.QD24.R1: B2OUT, AT=686.757037 |
---|
188 | B2M.QF25.R1: B2MID, AT=698.647037 |
---|
189 | B2R.QF25.R1: B2OUT, AT=710.537037 |
---|
190 | CH.QF25.R1: CH, AT=716.942037, KICK=KCH25.R1 |
---|
191 | QF25.R1: QF, AT=718.180037 |
---|
192 | SF1.QF25.R1: SF1.2, AT=719.460037 |
---|
193 | B2L.QF25.R1: B2OUT, AT=726.257037 |
---|
194 | B2M.QD26.R1: B2MID, AT=738.147037 |
---|
195 | B2R.QD26.R1: B2OUT, AT=750.037037 |
---|
196 | CV.QD26.R1: CV, AT=756.392037, KICK=KCV26.R1 |
---|
197 | PU.QD26.R1: MHV, AT=756.712037 |
---|
198 | QD26.R1: QD, AT=757.680037 |
---|
199 | SD1.QD26.R1: SD1.2, AT=759.140037 |
---|
200 | B2L.QD26.R1: B2OUT, AT=765.757037 |
---|
201 | B2M.QF27.R1: B2MID, AT=777.647037 |
---|
202 | B2R.QF27.R1: B2OUT, AT=789.537037 |
---|
203 | QF27.R1: QF, AT=797.180037 |
---|
204 | SF3.QF27.R1: SF3.2, AT=798.460037 |
---|
205 | B2L.QF27.R1: B2OUT, AT=805.257037 |
---|
206 | B2M.QD28.R1: B2MID, AT=817.147037 |
---|
207 | B2R.QD28.R1: B2OUT, AT=829.037037 |
---|
208 | PU.QD28.R1: MHV, AT=835.712037 |
---|
209 | QD28.R1: QD, AT=836.680037 |
---|
210 | SD3.QD28.R1: SD3.2, AT=838.140037 |
---|
211 | B2L.QD28.R1: B2OUT, AT=844.757037 |
---|
212 | B2M.QF29.R1: B2MID, AT=856.647037 |
---|
213 | B2R.QF29.R1: B2OUT, AT=868.537037 |
---|
214 | CH.QF29.R1: CH, AT=874.942037, KICK=KCH29.R1 |
---|
215 | ... |
---|
216 | ENDSEQUENCE |
---|
217 | </pre> |
---|
218 | In the above structure it is easy to select many sets of observation |
---|
219 | points: |
---|
220 | <p>Print at all F sextupoles: |
---|
221 | <pre> |
---|
222 | PRINT,MSF |
---|
223 | </pre> |
---|
224 | <p>Split all quadrupoles at 1/3 of their length for OPTICS command: |
---|
225 | <pre> |
---|
226 | SPLIT,QUADRUPOLE,FACTOR=1/3 |
---|
227 | </pre> |
---|
228 | <p>Misalign two quadrupole QF25.R1 and QD26.R1: |
---|
229 | <pre> |
---|
230 | EALIGN,QF25.R1,QD26.R1,DX=0.001*GAUSS(),DY=0.0005*GAUSS() |
---|
231 | </pre> |
---|
232 | <p>Print first-order matrices for elements B2L.QD24.R1 |
---|
233 | through CV.QD26.R1: |
---|
234 | <pre> |
---|
235 | SELECT,FIRST,B2L.QD24.R1[1]/CV.QD24.R1[1] |
---|
236 | </pre> |
---|
237 | <p>Print lattice functions at all F-sextupoles of the first family, |
---|
238 | if connected to the second circuit: |
---|
239 | <pre> |
---|
240 | PRINT,SF1.2 |
---|
241 | </pre> |
---|
242 | |
---|
243 | <hr> |
---|
244 | <a href="beam.html"> |
---|
245 | <img src="/icons/left.gif" alt="Previous:" align=middle> |
---|
246 | BEAM: Set Beam Parameters</a> |
---|
247 | <a href="action.html"> |
---|
248 | <img src="/icons/up.gif" alt="Up:" align=middle> |
---|
249 | Action Commands</a> |
---|
250 | <a href="split.html"> |
---|
251 | <img src="/icons/right.gif" alt="Next:" align=middle> |
---|
252 | SPLIT: Request Interpolation for OPTICS</a> |
---|
253 | <hr> |
---|
254 | |
---|
255 | <address> |
---|
256 | <a href="http://www.cern.ch/Hans.Grote/hansg_sign.html">hansg</a>, |
---|
257 | January 27, 1997 |
---|
258 | </address> |
---|
259 | |
---|
260 | </body> |
---|