source: PSPA/madxPSPA/doc/usrguide/ptc_auxiliaries/PTC_Select.html @ 430

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

import madx-5.01.00

File size: 6.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
5<html xmlns="http://www.w3.org/1999/xhtml">
6
7<head>
8<meta http-equiv=Content-Type content="text/html; charset=iso-8889-2">
9<meta name=Generator content="NEdit">
10<meta name=Originator content="Skowron">
11<link rel="stylesheet" type="text/css" href="../ptc_general/madxdoc_ps.css" />
12<title>PTC_SELECT</title>
13<style>
14</style>
15</head>
16
17<body bgcolor="#ffffff"'>
18
19<div style="text-align:center;">
20<center>
21  EUROPEAN ORGANIZATION FOR NUCLEAR RESEARCH
22  <IMG SRC="http://cern.ch/madx/icons/mx7_25.gif" align="right">
23  <h1>PTC_SELECT</h1>
24 
25</center>
26</div>
27
28
29<!--  ##########################################################              -->
30
31<div class="madxdocContent">
32
33
34<!--  ##########################################################              -->
35<!--  ##########################################################              -->
36<!--  ##########################################################              -->
37
38<h3 align=center style='margin-top:0cm;text-align:left;text-indent:0cm'>
39 <span>
40  USER MANUAL
41 </span>
42</h3>
43
44<div>
45
46<!--  ##########################################################              -->
47
48<h4>SYNOPSIS</h4>
49
50<pre>
51<big>
52PTC_SELECT,
53table      = [s, none, none],
54column     = [s, none, none],
55polynomial = [i, none] ,
56monomial   = [s, none] ,
57parametric = [l, false, true],
58quantity   = [s, none] ; "
59
60</big>
61</pre>
62
63</div>
64 
65<!--  ##########################################################              -->
66
67<h4> Description </h4>
68
69<div>
70Selects map elements to be:
71<p>
72   a) <b>Stored in a user specified table and column.</b> <i>Table</i> and <i>column</i> must be specified than,
73      and such table with such column must exists.
74<p>
75   b) <b>Stored as a function (taylor series) of
76      <a href="PTC_Knob.html">knobs</a>,  if any is defined.</b> 
77      Than, <i>parametric</i> should be set to true.
78
79Both a) and b) can be joined in one command.
80
81
82</div>
83
84<h4> Examples</h4>
85
86<p>
87<a href="http://cern.ch/frs/mad-X_examples/ptc_madx_interface/ptc_secordmatch/chicane.madx">  dog leg chicane </a> :
88strength of quads is matched to obtain required T112 value.
89
90
91<p>
92<a href="http://cern.ch/frs/mad-X_examples/ptc_madx_interface/eplacement/chicane.madx">  dog leg chicane </a> :
93postion of quads is matched to obtain required T566 value.
94
95<p>
96<a href="http://cern.ch/frs/mad-X_examples/ptc_madx_interface/matchwithknobs/matchwithknobs.madx">  dog leg chicane </a> :
97dipols and quads strengths are matched with the help of knobs to obtain required momentum compaction and Twiss functions.
98
99<!--  ##########################################################              -->
100
101<h4> Command parameters and switches </h4>
102<div>
103
104<dl>
105<dt><b> table </b></dt> 
106  <dd>
107  <i> string, </i>
108  <p> Specifies name of the table where values should be stored.
109  </dd>
110
111
112<dt><b> column </b></dt> 
113  <dd>
114  <i> string, </i>
115  <p> Specifies name of the table where values should be stored.
116  </dd>
117
118<dt><b> polynomial </b></dt> 
119  <dd>
120  <i> integer, </i>
121  <p> Specifies row of the map.
122  </dd>
123
124
125<dt><b> monomial </b></dt> 
126  <dd>
127  <i> string composed of digits </i>
128  <p> Defines monomial of the polynomial in PTC nomenclature.
129      Its lengh should be equal to number of variables. Each of digits corresponds
130      to the exponent of a variable. Monomial 'ijklmn' defines
131      x<sup>i</sup>p<sub>x</sub><sup>j</sup>y<sup>k</sup>p<sub>y</sub><sup>l</sup>
132      &Delta;T<sup>m</sup>(&Delta;p/p)<sup>n</sup>.
133      For example, element=2 and monomial=1000000
134      defines coefficient of the second polynomial (that defines p<sub>x</sub>)
135      close to x, in the other words it is R21.
136 
137  </dd>
138
139
140<dt><b> parametric </b></dt> 
141  <dd>
142  <i> logical, default false, if value explicitly not specified then true</i>
143  <p> If it is true, and any
144      <a href="PTC_Knob.html">knobs</a> 
145      are defined the map element is stored as the parametric result.
146     
147  </dd>
148
149
150
151</dl>
152
153
154
155<!-- ############################################################ -->
156<!-- ############################################################ -->
157<!-- ############################################################ -->
158<h4> PROGRAMMERS MANUAL </h4>
159
160<p> 
161The command is implemented pro_ptc_select function in madxn.c and
162by subroutine addpush in madx_ptc_knobs.f90, that is part of
163madx_ptc_knobs_module
164
165<p>
166On the very beginning the existance of the table and within column is checked.
167In the case of failure, error message is printed and the function is abandoned.
168
169<p>
170The command parameters are passed as the arguments of addpush Fortran routine.
171A selection is stored in a type called tablepush_poly defined madx_ptc_knobs.inc.
172A newly created object is added to array named pushes.
173
174<p>
175More then one element might be stored in a single table, so the module must assure that
176each of tables is augmented only ones for each magnet (or integration slice).
177For that purpose array of tables to be augmented (named tables) is stored separately and
178we assure that a table is listed here only ones. This is simply done by checking
179if a table name is not already listed before adding a new element to the array.
180
181<p>
182In case the user requested an element to be stored in the paramteric format,
183and column in the array of parametric results is reserved and the index of the column is
184remembered in index field of tablepush_poly type is filled. In the other case this field
185is equal to zero.
186
187<p>
188The routine ptc_twiss (defined in file madx_ptc_twiss.f90), after tracking each of magnets
189in the sequence, calls putusertable routine. This routine loops over selected elemetns defined
190in the pushes table. For each of them it extracts the requested element from the map using .sub.
191operator of PTC and stores it in the defined table and column.
192If index field is not zero and any knob is defined, it extracts the polynomial using .par.
193operator, and stores it in the 2D array called results, in the row corresponding to the number
194of the magnet (or integration step) and column defined by the index field.
195
196
197
198</div>
199
200</body>
201
202</html>
Note: See TracBrowser for help on using the repository browser.