source: PSPA/madxPSPA/doc/usrguide/error/error_save.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: 2.8 KB
Line 
1<head>
2<title>ESAVE</title>
3<!-- Changed by: Hans Grote, 13-Sep-2000 -->
4<!-- Changed by: Werner Herr, 19-Jun-2002 -->
5<!-- Changed by: Hans Grote, 30-Sep-2002 -->
6</head>
7
8<body bgcolor="#ffffff">
9
10<h1>ESAVE: Save Machine Imperfections and read back from file</h1>
11
12<br>
13<b>Writing errors to a file:</b>
14<br>
15This command saves a table of errors assigned to elements on a file,
16using a format which can be read in again to obtain the same results.
17This allows dumping the errors and reloading them after a new USE command.
18The range for these elements has to be specified.
19An error save is requested by the statement
20<pre>
21ESAVE,FILE=string;
22</pre>
23<font COLOR="#ff0000">
24<pre>
25Example:
26
27SELECT,FLAG=ERROR,RANGE=range,CLASS=name,PATTERN=string;
28ESAVE,FILE=err.file;
29</pre>
30</font>
31and elements selected by the
32<a href="../Introduction/select.html">SELECT</a> command are saved to the file.
33<br>
34<br>
35To save the errors of all elements to a file, one can use:
36<font COLOR="#ff0000">
37<br>
38<pre>
39SELECT,FLAG=ERROR,FULL;                                   
40ESAVE,FILE=err.file;
41</pre>
42</font>
43<br>
44<br>
45<b>Please note: in case of field errors, the absolute errors are saved and not relative errors. </b>
46<br>
47<br>
48<br>
49<b>Setting errors from a table or file:</b>
50<br>
51To assign errors from a file is not a priori straightforward.
52It may be required to re-assign existing errors after a <b>USE</b>
53command was executed (which deletes all errors attached to a
54sequence).
55<br>
56Errors stored in the form of an internal table (<i>errtab</i>) can
57be directly attached to the
58appropriate positions in the sequence with the command:
59<pre>
60SETERR,TABLE=errtab;
61</pre> 
62The table <i>errtab</i> can be generated internally or from
63an external file (<i>errfile</i>) with the generic command READMYTABLE.
64<br>
65The command sequence:
66<pre>
67READMYTABLE,file=errfile,table=errtab;
68SETERR,TABLE=errtab;
69</pre> 
70reads the file <i>errfile</i> into the table <i>errtab</i> and
71the command SETERR attaches the errors to the elements in
72the active sequence.
73<br>
74The file <i>errfile</i> can be produced by a preceding ESAVE command
75or any other utility. It should follow the format of a file generated
76with ESAVE (see example program).
77<br>
78<b>Please note:  </b>
79<br>
801. To assign correctly the errors from the file to the elements in the sequence,
81all elements must have individual names, otherwise an identification is not possible.
82Elements in the file not identified in the active sequence are ignored.
83<br>
842. Errors are assigned to ALL elements found in the file and the FLAG=ERROR is set.
85Therefore the number of elements selected corresponding to a command like: <br>
86SELECT, FLAG=ERROR,...;<br>
87can be different after the execution of SETERR.
88<br>
89<br>
90<br>
91<br>
92<address>
93<a href="http://consult.cern.ch/xwho/people/1808">Werner Herr</a>
9418.6.2002
95</address>
96
97</body>
Note: See TracBrowser for help on using the repository browser.