SAD Mails in 1997


Send any comments to ICFA@kekvax.kek.jp

SAD back to SAD Home Page





18-DEC-1997 11:22:59.79
From:   KEKVAX::OIDE
To:     @SADUSERS.
CC:     OIDE
Subj:   SAD Update.   V1.0.5.10.5b.   Result of MEASURE, 3D graphics.

   Dear Users:

1. Now FFS["MEASURE"] returns the center of mass and beam matrix as a list:

   {center-of-mass, beam-matrix} ,

where center-of-mass is a vector containing the center of mass of
{x, px, y, py, z, delta}, and beam-matrix is is a 6 by 6 symmetric matrix
having the beam matrix.

2. A very preliminary verion of 3D graphics has been installed.   It works only
with Tkinter and CanvasDrawer.   Now only 2 functions works:

a) ListPlot3D[list, options, ...] where list is a list of data
{{x1, y1, z1}, ...} .
Currently available options are PlotRange, PlotRegion, Box, EyePoint.

b) ListBirdsEyePlot[{{x1, ..., xn},
        {{z1, {y11, ..., y1n}}, ..., {zm, {yn1, ..., ymn}}}, options]
Currently available options are PlotRange, PlotRegion, Box, EyePoint,
Lighting, and LightSources.   LightSources is a list of list
{{r, phi, theta},{r, g, b}} to give the distance angles, and rgb color of
the light sources.   It is active when Lighting is True (default).   Multiple
light sources are possible.

   K. Oide

8-DEC-1997 12:00:52.44 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.5.10b. Definition by ?, etc. Dear Users: 1. Now ?expression works same as Definition[expression], unless expression is one of names of FFS flags. Expressions like as ?CELL returns the value of FFS flag CELL as before. 2. An internal logic for Table has been wrong when Table picks up a value of a symbol which is assigned in the Table itself. The simplest was something like Table[s={i},{i,2}] . This bug caused inconsistency in the memory usage of the interpreter. This bug is very old probably since the beginning of the SADScript interpreter. It is interesting that such a very primitive bug has survived for a long time. K. Oide
4-DEC-1997 21:12:30.99 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.5.9.2b. A bug. Dear Users: 1. A bug was found in output of error message during Get. Such an error message has been suppressed by this bug. This bug also has caused a destruction of memory (internal free area map), then very unpredictable things happened. By fixing this bug, things look OK so far, when an error occurs in Get, but probably we have to watch it for the time being. I also added a routine in MemoryCheck[] to see the consistency of the free area to detect this kind of problem. K. Oide
3-DEC-1997 13:38:27.26 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.5.9b. StringToStream, etc. Dear Users: 1. A new function StringToStream has been added. It is same as Mathematica's, and opens an input stream from character-string instead of a file. Usage: fn = StringToStream[string]; Read[fn, Word]; Close[fn]; With this modification, the internal logic for Open/Read is greatly updated. 2. New options NameFilter and Initialize have been introduced in OpticsPlot. NameFilter -> function specifies a function to replace the name of components to be displayed with function[name]. Names are now diplayed in semi-vertical way in CanvasDrawer. Initialize works only for CanvasDrawer. Initialize -> {{xmin,xmax},{ymin,ymax}}, where coordinates are in the relative window coordinates ({{0,1},{0,1}} is the graph area), erases items enclosed in the specified rectangle. Initialize -> Frame erases upper part of the canvas. Initialize -> Graph erases the graph area. 3. A bug when a shell command is executed by OpenRead with "!" mark is fixed. This bug stops entire program when OpenRead is done more than 2048 times. 4. DISPLAY now displays the name of the first component of an element with ".1" attached, when there are 2 or more components of the element exist in the beam line. K. Oide
27-NOV-1997 02:23:26.53 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.5.8b (cnt'd) PRINTGetMAIN, comment by ( Dear Users: 1. There are a few more updates on V1.0.5.8b which was not mentioned in the previous mail. One is a new function GetMAIN. GetMAIN[file] reads SAD MAIN commands such as lattice definitions from file. GetMAIN ignores FFS, EMIT, TRACK commands in the file. The parameters of components in the current line which FFS is using is not updated until RESET is issued. 2. Now any charaters enclosed by (* and *) are recognized as a comment. This is the Mathematica style. Comment can be laid through many lines. K. Oide
25-NOV-1997 19:09:42.16 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.5.8b. StringTrim, Fit, etc. Dear Users: 1. Bugs in Fit have been cured. This bug caused trouble when initial values of the fitting parameters are very close to the final result. 2. A new function StringTrim was introduced. It removes leading and trailing spaces and tabs from a character string. 3. Expression like {a, b, c, ..} = {d, e, f, ..} now works when a, b, c, .. have upvalue definitions (a = ..)^ = .. . K. Oide
16-NOV-1997 09:32:37.31 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.5.7.2b. Bug in matching. Dear Users: 1. A bug was found in the optics matching, when ROTATE was a variable. This bug was introduced when the flag CANON became obsolete, around 6/5 this year. The speed of matching was very slow or did not match at all. The result of optics calculation itself was OK. K. Oide
16-NOV-1997 07:52:21.13 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.5.7.1b. Bug in off-momentum matching. Dear Users: 1. Since around 10/30 this year, the off-momentum matching has been wrong, using a wrong momentum offset for off-momentum optics. 2. A function Literal has been introduced since the last version. It is same as Mathematica's to block evaluation for pattern matching, esp. for lhs of Rule or RuleDelayed. K. Oide
15-NOV-1997 04:48:27.57 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.5.7b. Bug in Times, etc. Dear Users: 1. A bug is found in an expression like as a * (b + c + d + ...) when a is a number and the number of terms for Plus is 3 or more. It wrongly calculated a * (b + c) and components after third were omitted. The time when this bug came is not easy to track, but it is not very new, at least 6 months before. Also expressions like (a ^ b ^ c ...) ^ d were wrong when the terms in the parenthesis was 3 or more. 2. Break[] did not work properly in While, leaving a wrong message. This bug was created around 4/26/1997. 3. The rouine to refer a function which contains definitions without patterns is updated to improve the speed when the number of definitions is large. K. Oide
6-NOV-1997 10:42:58.78 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.5.6b. TagSet, etc. Dear Users: 1. A new operator TagSet has been introduced. There are threee variations in its usage: symb/: lhs = rhs symb/: lhs := rhs symb/: lhs =. These define/undefine lhs, assciated only with the symbol symb. For instance, c/: a[b, c, d] = 3; defines the upvalue for c, leaving a, b, and d untouched. TagSet is effectively equivalent to Mathmatica's, but SAD does not have TagSetDelayed and TagUnset as separate operators. 2. There has been a problem in EMIT when RFSW is OFF and RADCOD is ON, since this July. The caculated COD with such setting of flags has been wrong. Now the COD is calculated as if there is an acceleration at the beginning of line to compensate the energy loss. 3. Extract[a, {i, j, ...}] was wrongly coded so that it did not evaluate after extraction. Now it is corrected to evaluate. K. Oide
30-OCT-1997 15:16:33.32 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.5.5.b. DDPI as a matching variable. Dear Users: 1. Now the initial momentum offset can be a matching variable, only for orbits DX, DPX, DY, DPY. Usage: FREE DDPI Now the central momentum DP0 changes as the result of matching if DDPI becomes a variable. Actually DP0 is equivalent to LINE["DDP",1]. K. Oide
15-OCT-1997 09:36:23.79 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.5.4b. Beam sizes by LINE. Dear Users: 1. The LINE function now returns beam-matrix element by "SIGab" keyword, where a and b are one of X, PX, Y, PY, Z, DP. If b is omitted, it returns sqrt of SIGaa, i.e., the usual beam size. If both a and b are omitted, it returns 6 by 6 beam matrix. The second argument of LINE can have a fractional part which means the fractional position (same as for "S" and "GAMMA"). The beam size is caluculated with twiss parameters given by CALC and numbers in EMITX, EMITY, and DP. Thus it is on the 4 by 5 basis. All quantities in z-derection are not calculated and meaningless at this time. 2. OpticsPlot now accepts function names "SIGab" as described above to denote the beam sizes. K. Oide
7-OCT-1997 10:47:03.13 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.5b. STACKSIZ. Dear Users: 1. The evaluation stack of the interpreter is now allocated dynamically. It reduces the size of the load module by about 3Mbytes, and also its size becomes configurable depending on applications. STACKSIZ = nnn; sets the size of the stack to nnn. This must be issued before the first FFS session, othewise does nothing. If you have a problem on the memory size during execution of SADScript, try this. The default is 200000. 2. A new attribute Constant is defined. If a symbols has Constant attribute, it is evaluated at the input time immediately. Symbols such as True, False, Pi, etc., and also all built-in functions are declared Constant. Therefore an expression like Hold[Cos[Pi]] always becomes Hold[-1]. K. Oide
7-OCT-1997 10:46:45.89 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.5b. STACKSIZ. Dear Users: 1. The evaluation stack of the interpreter is now allocated dynamically. It reduces the size of the load module by about 3Mbytes, and also its size becomes configurable depending on applications. STACKSIZ = nnn; sets the size of the stack to nnn. This must be issued before the first FFS session, othewise does nothing. If you have a problem on the memory size during execution of SADScript, try this. The default is 200000. 2. A new attribute Constant is defined. If a symbols has Constant attribute, it is evaluated at the input time immediately. Symbols such as True, False, Pi, etc., and also all built-in functions are declared Constant. Therefore an expression like Hold[Cos[Pi]] always becomes Hold[-1]. K. Oide
25-SEP-1997 20:28:29.06 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.4b. Message. Dear Users: 1. The message handling capability of SAD has been enhanced, and now it looks very similar to Mathematica's. The new operators and functions are: symbol::tag symbol::tag = message MessageName Message[symbol::tag] Message[symbol::tag, arg, ...] $MessageList MessageList On[symbol::tag] Off[symbol::tag] On[General::newsym] Check[exp1, exp2, symbol::tag, ...] These are basically same as Mathematica's. Please look at the Mathematica Book or SAD/Tkinter manual (in Japanese). K. Oide
25-SEP-1997 20:28:20.79 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.4b. Message. Dear Users: 1. The message handling capability of SAD has been enhanced, and now it looks very similar to Mathematica's. The new operators and functions are: symbol::tag symbol::tag = message MessageName Message[symbol::tag] Message[symbol::tag, arg, ...] $MessageList MessageList On[symbol::tag] Off[symbol::tag] On[General::newsym] Check[exp1, exp2, symbol::tag, ...] These are basically same as Mathematica's. Please look at the Mathematica Book or SAD/Tkinter manual (in Japanese). K. Oide
10-SEP-1997 09:52:24.86 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.3.11b. ColumnPlot. Dear Users: 1. A new plotting function ColumnPlot has been built to create a bar or column graph. Usage: ColumnPlot[data, options, ...] plots a column plot. 1) If data is a 1D vector, it makes a simple column plot. 2) If data is a 2D matrix, it makes a multiple-column plot. 3) If data is a 3D list, it makes a stacked, multiple-column plot. Besides options common for all plotting functions, ColumnPlot has its own options: Option Value Default Action --------------------------------------------------------------------------- ColumnOffset 0 30-AUG-1997 19:08:40.37 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.3.10b. SAD/Tkinter Manual, etc. Dear Users: 1. A manual of SAD/Tkinter is now ready for download from the SAD homepage: http://www-acc-theory.kek.jp/SAD/sad.html . 2. A new usage of Part is introduced. If an index is omitted or Null, a list of elements with all ranges of the omitted one having other indices as specified. For instance, a = {{1,2},{3,4}}; then a[[,2]] returns {2,4}. Thus a[[,k]] is equivalent to Thread[a][[k]] for a matrix, but runs much faster. 3. Variables in matching are now restricted in the MIN/MAX range, even started from outside of he range. 4. Logics of scoping of variables are updated. K. Oide
15-JUL-1997 18:44:41.62 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.3.9b. In[n]:= as prompt, OpenRead, TemporaryName, . Dear Users: 1. The style of the prompt for the terminal input is changed to "In[n]:= ", where n is the line number of the next output. Note that it is just appearance, and In[n] does not retain the input. Also the handling of the output is somewhat improved, when the output of the script is a symbol or an expression causing then "Undefined command or element" message. If you like the old style of the prompt, say FFSPRMPT. 2. The function OpenRead was so changed that it returns $Failed on error at opening a file. Also a form like f = OpenRead["!command"] returns a file number f which is used to read the output of command. 3. A function TemporaryName[] is introduced to return a unique name of a temporary file. 4. A function Skip is installed. The usage is same as Mathematica's. K. Oide
9-JUL-1997 11:42:08.14 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.3.8.1b. Read[f, {type1,..}]. Dear Users: 1. Now Read can be used as Read[f, {type1, type2, ...}, option] , where type1,.. are the types of objects to be read. This returns a list of objects read from the file. Currently allowed types are Real, Expression, Word, and String. options are WordSeparators, ReadNewRecord, and NullWords. You will also notice a significant improvement of the speed of Read. K. Oide
8-JUL-1997 10:21:17.83 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.3.8b. FFS without USE=LINE, etc. Dear Users: 1. FFS can be started without defining beam line. You can say just "FFS;" to start it. Thus a SADScript can be executed almost directly. Example: FFS; (FFS commands) .... ABORT 2. A few improvements have been made for Read, Plot, Fit, etc., but the user interface is not changed. 3. A new function Vectorize and Vector has been introduced to speed up the internal processing of a function, but it will be limited to the internal use for a time being. 4. In DPAERT and DynamicApertureSurvey, the minimum values of X and Y have been set to zero when the size of the range is zero. This was not a bug, but deliverately so coded. Though I do not remember the reason, I have removed this feature. K. Oide
24-JUN-1997 22:54:58.00 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.3.7b. Random[n], GaussRandom[n], etc. Dear Users: 1. Random and GaussRandom now takes arguments to return multiple random numbers at once. Random[] gives a uniform random number between 0 and 1. Random[n] gives a list of n uniform random numbers. Random[n1, n2, ..] gives a (n1 * n2 * .. ) tensor of uniform random numbers. and GaussRandom[] gives a Gaussian random number with average 0, standard deviation 1, cutoff at GCUT. GaussRandom[n] gives a list of n Gaussian random numbers. GaussRandom[n1, n2, ..] gives a (n1 * n2 * .. ) tensor of Gaussian random numbers. 2. EMIT now returns damping times for convenience. 3. A bug was found in the extended Twiss parameters calculated by EMIT. The formula on the web page is right, but in the coding a factor 1/(1+a) has been missed in the x-y terms of the matrix H. Thus the parameters were wrong in particular when zetas are nonzero. 4. A bug was found in Do with exceptional exit (by such as Return[]). This caused memory crash. This bug was generated on 4/14/1997, V1.0.2.1b. K. Oide
22-JUN-1997 21:38:54.01 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.3.6b. Extract, etc. Dear Users: 1. Functions Extract, Symbol, and SymbolName have been installed. These are same as Mathematica 3.0's. 2. Matching by GO has been wrong for weeks, when non-standard variables such as K0 of BEND are chosen. K. Oide
22-JUN-1997 12:15:54.33 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.3.6b. Extract, etc. Dear Users: 1. Functions Extract, Symbol, and SymbolName have been installed. These are sam as Mathematica 3.0's. 2. Matching by GO has been wrong for weeks, when non-standard variables such as K0 of BEND are chosen. K. Oide
17-JUN-1997 15:08:20.45 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.3.5.2b. Bug in CAVI. Dear Users: 1. A bug was found in CAVI in EMIT (when RFSW is OFF), CAL and GO (when RFSW is off or RING is ON). This bug makes the length of CAVI 1/2!!! This bug was created after 6/5, V1.0.3b, probably last week. Before that time there had been no such problem. K. Oide
16-JUN-1997 21:57:29.81 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.3.5b. Acceleration in MULT, etc. Dear Users: 1. MULT now accepts acceleration as CAVI. The parameters are VOLT, PHI, FREQ, and HARM. This is useful to express a trim winding on an accelrating structure. 2. The transformation of BEND in optics calculation and EMIT has been changed. It is now as exact as that of tracking, and no limitation in the size of the edge angle. 3. A few commands which accepts a number now accepts a Set form. For instance, SEED n can be written as SEED = n or seed = n. Such commands are AXI, BXI, AYI BYI, EXI, EPXI, EYI, EPYI, R1I, R2I, R3I, R4I, DXI, DPXI, DYI, DPYI, DZI, DDPI, and MAXI. 4. There were a few bugs created last week which is related to the item 1 above. Those now look fixed. K. Oide
10-JUN-1997 13:20:04.00 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.3.4b. Limits in FindRoot and Fit. Dear Users: 1. Limits on variables or fitting parameters now can be give as FindRoot[eqs, {var1, ini1, {min1, max1}},..] or Fit[data, fun, var, {par1, ini1, {min1, max1}}, .. ] 2. A problem with SEED and GaussRandom was solved. The value of GaussRandom was not uniquely determined by SEED, but now it was solved. This problem was only for SEED, and there has been no problem in SeedRandom. K. Oide
9-JUN-1997 12:12:27.36 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.3.3.3b.exe. FitPlot. Dear Users: 1. A new function FitPlot has been installed. Usage: FitPlot[data, fun, var, {par1, ini1}, .., {parn, inin}, option] makes a plot of data with a fitted function fun, with parameters par1, parn. Specification of data is same as ListPlot. This is just an application of Fit, but quite useful. Please try. K. Oide
8-JUN-1997 17:40:28.54 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.3.3b. Fit, Out, etc. Dear Users: 1. A new function Fit has been installed. Unlike Mathmatica's it does general nonlinear fitting of data. Usage: Fit[data, expr, var, {par1, ini1}, .. ,{parn, inin}] performs a nonlinear fitting of data with an expression expr. data: list of {xi,yi}, {xi,yi,dyi}, or {xi,yi,dxi,dyi}, where dxi and dyi are the standard deviation of the i-th point. expr: an exprssion containing var as the x-variable, and parameters par1,..,parn explicitly. Use Evaluate[fun] if an implicit expresison is necessary. var: a symbol to express the x-axis variable. par: parameter symbol to be varied in the fitting. ini: initial value of the parameter. It must be specified. Fit returns the result as a list: {par1 -> v1, .., parn->vn, ChiSquare -> chisq, GoodnessOfFit -> good, ConfidenceInterval -> {c1, .., cn}, ConvarianceMatrix -> cov}, where v1,..,vn are the values of the parameters which minimizes chi-square, chisq is the resulting minimum value of the chi-square, good is a number given by GammaRegularized[(ndata-npara)/2,chisq/2] to represent the goodness of the fit, c1, .., cn are the estimated errors in parameters, and cov is the covariance matrix. A typical criterion of the goodness is (good > 0.1). The current version of Fit does not handle the error in x. 2. Now all results of evaluation of an input line is stored in Out[n]. This is just the same mechanism as Mathematica's. Out[n] can be written as %n. A single % means Out[$Line], i.e., the last output, where $Line is the counter of the output line number. If one reset $Line to a number smaller than current value of $Line, the contents of Out between them are cleared. 3. A new operator @ has been introduced. It is same as Mathematica's, i.e., f@a is same as f[a]. K. Oide
7-JUN-1997 10:22:27.37 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.3.2.1b. Bug in f[..][..]. Dear Users: 1. Another bug in an expression f[x,..][y,..] was found. This occurred when the expression is either in the definition of function, or an argument of Do or Table in Module, containing the argupent pattern or the step variable in f[x,..], and also y,.. are all real numbers. K. Oide
7-JUN-1997 10:22:10.51 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.3.2.1b. Bug in f[..][..]. Dear Users: 1. Another bug in an expression f[x,..][y,..] was found. This occurred when the expression is either in the definition of function, or an argument of Do or Table in Module, containing the argupent pattern or the step variable in f[x,..], and also y,.. are all real numbers. K. Oide
5-JUN-1997 19:59:38.97 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.3b (supplement). Erf, Erfc, GammaRegularized, etc. Dear Users: 1. V1.0.3b has also installed functions Erf, Erfc, GammaRegularized, GammaRegularizedP, GammaRegularizedQ. These are currently valid for real arguments. Erf, Erfc, and GammaRegularized are same as Mathematica's. GammaRegularizedQ is same as GammaRegularized. GammaRegularizedP is equal to 1 - GammaRegularizedQ. K. Oide
5-JUN-1997 19:16:04.79 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.3b. InitialOrbits, WakeFunction, etc. Dear Users: 1. The new version 1.0.3b has two major upgrades in the calculation of optics in FFS. One is InitialOrbits to set a number of arbitrary initial orbits. Usage: InitialOrbits = { {x1, px1, y1, py1, z1, dp1}, ...}; specifies initial conditions of a number of orbits for the optics calculation by CALCULATE(CAL) and GO. Those coordinates are offset from the central orbit. If InitialOrbits are given, the off-momentum matching and finite-amplitude matching is disabled. InitialOrbits is also necessary to calculate optics with wake field. 2. The second change is optics calculation with wakefield: WakeFunction[Longitudinal, comp]={{z1, wl1}, ..., {zn, wln}}; WakeFunction[Transverse, comp]={{z1, wt1}, ..., {zn, wtn}}; specify logitudinal and transverse dipole wake functions at a component comp (string). Each functions is a list of {z, w} where z is the distance (z>=0) and w is the value of the wake, in unit of either V/C or V/C/m. The wake funcitons are applied at the componet comp, giving kicks to each orbit whose initial conditions are give by InitialOrbits. The sufficient number of orbits depends on the situation. WakeFunction is valid only when TRPT and INS, and also either TWAKE or LWAKE is ON. Utility functions to use WakeFunction easily are to be supplied soon. 3. New optical functions DZ and DDP are installed in FFS. These represent the logitudinal position z = -v(t - t0) and the momentum offset dp/p0. These can be displayed by DISP A. 4. Flags CANON and DIFCOD have become obsolete. 5. SCAN command has become obsolete. 6. A bug in some cases of evaluation of an expression such as f[a,..][b,..] was fixed. K. Oide
30-MAY-1997 06:08:09.68 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.2.9.2b.exe. Bugs in Thread, XIX, XIY. Dear Users: 1. A bug was found in XIX and XIY to make the chromaticity goal half. This bug looks very old and hard to track. 2. A bug to destroy a memory region is found in Thread. It is generated in the last weekend. K. Oide
27-MAY-1997 04:07:40.01 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.2.9b. NullWords in Read. Dear Users: 1. A new option NullWords is added to Read[f,Word]. When NullWords->True, as Mathematica, Read[f,Word] returns "" between successive WordSeparators. K. Oide
17-MAY-1997 03:09:13.74 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.2.7.1b.exe. Bug in K0 of BEND. Dear Users: 1. Bugs are found in BEND, when ANGLE=0 and K0<>0. The transformation of y and z was wrong. It was wrong but still symplectic. The discrepancy becomes significant when K0 is large, and the ordef of the error is in K0^3. Also another bug was in MARK with OFFSET<>0, and the MARK with OFFSET points inside a BEND. K. Oide
14-MAY-1997 11:53:02.03 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.2.7b. FindRoot,AppendTo,PrependTo. Dear Users: 1. New functions AppendTo, PrependTo are added. These are same as Mathematica's. 2. A new function FindRoot has beed added as a trial version. Usage: FindRoot[a[x,..]==b[x,..], {x, x0}, {y, y0},..., option] or FindRoot[{a[x,..]==b[x,..],c[x,..]==d[x,..]..},{x, x0},..,option] . The number of equations is unlimited. The number of variables is currently limited less than 1024. Although currently FindRoot is limited to Newton's method, it might be a littl advanced than Mathematica's, because it automatically determines the damping factor by a cubic interpolation. No bounded search on the variable are possible. There are two options in FindRoot. MaxIterations maximum number of iterations. (default 50) AccuracyGoal relative accuracy of the convergence (default 1e-20) This version of FindRoot is a trial version. Please try it and feedback to us. K. Oide
17-MAY-1997 03:08:52.46 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.2.7.1b.exe. Bug in K0 of BEND. Dear Users: 1. Bugs are found in BEND, when ANGLE=0 and K0<>0. The transformation of y and z was wrong. It was wrong but still symplectic. The discrepancy becomes significant when K0 is large, and the ordef of the error is in K0^3. Also another bug was in MARK with OFFSET<>0, and the MARK with OFFSET points inside a BEND. K. Oide
14-MAY-1997 11:52:30.63 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.2.7b. FindRoot,AppendTo,PrependTo. Dear Users: 1. New functions AppendTo, PrependTo are added. These are same as Mathematica's. 2. A new function FindRoot has beed added as a trial version. Usage: FindRoot[a[x,..]==b[x,..], {x, x0}, {y, y0},..., option] or FindRoot[{a[x,..]==b[x,..],c[x,..]==d[x,..]..},{x, x0},..,option] . The number of equations is unlimited. The number of variables is currently limited less than 1024. Although currently FindRoot is limited to Newton's method, it might be a littl advanced than Mathematica's, because it automatically determines the damping factor by a cubic interpolation. No bounded search on the variable are possible. There are two options in FindRoot. MaxIterations maximum number of iterations. (default 50) AccuracyGoal relative accuracy of the convergence (default 1e-20) This version of FindRoot is a trial version. Please try it and feedback to us. K. Oide
10-MAY-1997 19:06:30.50 MAIL From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.2.6b. Dear Users: 1. The upgrade this time is mostly on the improvement of the performance of the interpreter, esp. in pattern matching, replace, list operations, etc. This was necessary to make the new Tk interface as fast as possible. Actually it has become more or less acceptable in speed for regular panels. You may look at /SAD/share/Packages/Tkinter.n and /SAD/share/Packages/Canvas.n how Python/Tkinter is embedded in SAD. Some examples are available in /users/oide/WORK/oldsad/sad/examples.sad or /users/oide/WORK/oldsad/sad/canvas.sad . 2. A new function Pause is installed. It is same as Mathematica's and accepts fraction of seconds, down to microsecond. Sleep has become an alias of Pause. 3. A bug in complex numbers, such that I==1 or I>1 returned I, was fixed. K. Oide
26-APR-1997 11:44:55.63 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.2.4b. OpticsProlog and OpticsEpilog. Dear Users: 1. New variables OpticsProlog and OpticsEpilog are defined. OpticsProlog is a variable to assign a user-defined function which is to be executed everytime before an optics calculation is done in CALCULATE(CAL) or GO commands. In GO, OpticsProlog is called at the beginning of each iteration. This function is useful, for instance, for setting parameters which depends on the result of optics calculation. OpticsEpilog is a variable to assign a user-defined function which is to be executed everytime after an optics calculation is done in CALCULATE(CAL) or GO commands. In GO, OpticsEpilog is called at the end of each iteration. This function is useful, for instance, for setting parameters which depends on the result of optics calculation. K. Oide
21-APR-1997 16:10:03.86 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.2.2b. With, SwitchCases, etc. Dear Users: 1. New functions With and SwitchCases are introduced. With[{x, .., y=a, .. }, body] evaluates body assuming the value of x to be the current definition, or r.h.s. of Set ot SetDelayed, such as y=a or y:=a. In the latter cases, it is similar to Mathematica's With. With is useful to define a function efficiently. SwitchCases[list, {case1,..}] returns a list { list1, .. }, where list1 is a list of subexpressions which match case1, etc. SwitchCases does what are done by Cases and DeleteCases simultaneously. If the second argument is like {c1, .. , _}, the last of the returned list contains subexpressions which match none of c1, ... 2. The local variable in Module or Block now allow a form like {a,b,c}={u,v,w}. This is not allowed in Mathematica 2.2, but convenient. K. Oide
17-APR-1997 20:52:53.57 From: KEKVAX::YAMAMOTO "Noboru" To: @USER$DISK:[OIDE]SADUSERS. CC: Subj: SADUPDATE: CaOpen etc on DEC machine. Dear SAD users, The executable module in /SAD/bin is updated to support EPICS CA access on DEC machines. version number is still SAD1.0.2.1.1b ( it should be SAD1.0.2.1.2b). Noboru
14-APR-1997 09:23:43.07 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.2.1b. Formating, etc. Dear Users: 1. The routines for formatting output was updated to improve the conversion efficiency. The change in the output should be small, but not zero. K. Oide
20-MAR-1997 13:27:03.69 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.1.7.1b. Scoping, etc. Dear Users: 1. A problem in scoping of symbols was fixed. There was a problem a script such as h[a_]:=a; SetAttributes[h,HoldAll]; f[a_]:=h[Module[{},Do[i,{i,10}]]]; f[1] is executed, the scoping of symbols in unevaluated arguments of a function (the symbol i in the example above) was wrong. This fix required change of the internal logic of scoping, thus any undesirable side effects might be expected. 2. Matching of dispersions with orbit change was updated. 3. A bug in VariableRange in the case of returning a list was fixed. K. Oide
9-MAR-1997 20:15:58.06 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.1.6b. Factorial, matching, etc. Dear Users: 1. Matching routines for dispersion are improved, when a variable changes the orbit during the mathcing, such as K0 of a bend, etc. Before this change, converging speed was terribly slow. 2. New functions Factorial, Gamma, LogGamma are introduced. They accept real or complex numbers. K. Oide
3-MAR-1997 20:00:25.72 From: KEKVAX::KIKUCHIM To: @USER$DISK4:[OIDE]SADUSERS. CC: Subj: sad/cor update: Type option in Steer Dear users, Steer[...] has now an option of Type: Steer[pattern,error,option] At present the option Type is available. Example. Steer["OCT*",,Type->22] ! elements having name of "OCT*" and ! type of 22. Steer["OCT*",,Type->(LINE["type",#]==22&)] ! same as above. Steer["Z*",,Type->(LINE["k0",#]>1e-3&)] ! element Z* with K0 greater ! than 1e-3. Defualt is Type->(LINE["type",#]>0&) .
27-FEB-1997 19:57:11.57 From: KEKVAX::KIKUCHIM To: @USER$DISK4:[OIDE]SADUSERS. CC: Subj: sad/cor update: Weight option in CorrectOrbit Dear users, I have changed the Weight option in CorrectOrbit[] as follows. CorrectOrbit[kind,mon,str,optics,Weight->weight] 1. If weight is a numerical list, it is taken as a weight of monitors in the minimization. 2. Weight allows a function that maps on to mon[1] like (Twiss["bx",#]&) . 3. Default is (Twiss[kind,#]&) . KIKUCHI M.
26-FEB-1997 16:03:37.69 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.1.4.5b. Bug in Emittance[Emittance->False]. Dear Users: 1. A bug was found in Emittance[Emittance->False]. Calculation of transfer matrix, etc. was wrong when this option is used. Without this option, there is no problem. This bug was created probably on 1/11/96. K. Oide
24-FEB-1997 12:13:21.98 From: KEKVAX::YAMAMOTO "Noboru" To: @USER$DISK:[OIDE]SADUSERS. CC: Subj: Operation of SAD computer cluseter resumed. Dear SAD users, Operation of SAD computer is resumed. SAD computer is available for normal use. Noboru Yamamoto
24-FEB-1997 10:16:22.61 From: KEKVAX::YAMAMOTO "Noboru" To: @USER$DISK:[OIDE]SADUSERS. CC: Subj: SAD computers is not available NOW> Dear SAD-users, SAD computer is not availabe now. It will be available 1hour later. Sorry for incovenience. Noboru
24-FEB-1997 09:55:07.03 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SADV1.0.1.4.3b. Bug in MARK in SOL. Dear Users: 1. A bug was found in MARK, MONI, APERT when they are placed between SOLS, with an off-centered orbit. This bug was created on 7/12/1996. K. Oide
19-FEB-1997 18:58:46.27 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.1.4.2b. Bug in FitFunction & parallel. Dear Users: 1. A bug was found in FitFunction when it is processed in parallel (on acsad when number of variables is larger than 3). This bug was created on 2/13 in V1.0.1.2b. K. Oide
15-FEB-1997 21:49:03.50 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update V1.0.1.4.1b. Bug inHP-UX version. Dear Users: 1. The new version of parallel processing in optics calculation of FFS did not work on ahsad, when off-momentum matching was tried. It has been corrected. Katsunobu
14-FEB-1997 12:24:18.97 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.1.4b. Bug in BEND with ANGLE=0 and K0<>0. Dear Users: 1. A bug was found in routines for BEND with ANGLE=0, nonzero K0, when the sum of incoming angle and outgoing angle of the beam is zero or very close to zero. When it was zero, the vertical tracking, optics and emittcance calculation was wrong. When it was very close to zero, the accuracy of those thing might be lost. This bug was created when SAD was on HITAC, for tracking and emittance. For optics calculation in FFS, the bug was transferred from emit to FFS on 2/21/1996. 2. Another small bug was created yesterday, in off-momentum matching with CELL and nonlinear elements. K. Oide
13-FEB-1997 19:21:17.41 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. V1.0.1.3b. Bug in fraction of component. Dear Users: 1. A bug was created by the previous update, in calculating optics with a fraction of a component. This is done in DRAW, for instance, or OFFSET in MARK. This destructed some parts of memory. K. Oide
13-FEB-1997 11:07:29.79 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update V1.0.1.2b. Machine errors, parallel processing, etc. Dear Users: 1. It has been corrected that some elements such as MULT were ignored by machine-error-commands like DELX, etc. According to this change, a deck with such commands will not give the same result as before, because now the same commands gives the different machine errors even if the SEED is same. 2. The internal logic for parallel processing is updated to use shared memory instead of file to reduce overhead. 3. Function TrackParticles now run with parallel processing, on acsads. 4. The version number will represent: V1.0.1.2b ^ ^ ^ ^ | | | | | | | Small change or bug fix. No change of usage. | | | | | Small extension. Minor change in usage. | | | A big change in usage, such as 6D optics in FFS. | A very big change of the architecture: once in 100 years. 5. Current update plan by myself: This is just a plan. V1.0.2b: Versatile handling of COUPLE and machine errors. Clear description of design and actual optics. V1.1b: 6D optics calculation in FFS. K. Oide
6-FEB-1997 10:13:24.83 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update V1.0.1b. Individual component as variable, etc. Dear Users: 1. Now each component with same element name can be used in a matching independently. Example: INDEP QF.* FREE QF.2 QF.3 makes the default variable (initially K1) of QF.* independent from QF (=QF.1), then use QF.2 and QF.3 as the matching variable. The INDEPENDENT(INDEP) command is necessary, and only FREE does not work. The current status of the dependence is shown by ATTRIBUTE(ATTR) or VARIABLE(VAR) commands. The dependence of components is reset to the initial by DECOUPLE(DECOUP). See the SAD web page for more detail. 2. A new command RENUMBER(RENUM) is added to renumber the order of components. Usage: RENUM component renumbers the order starting from component. This is useful when the starting point of a bemline is changed by USE command. 3. SPLIT is now obsolete. Use OFFSET of MARK. 4. Now SAD load module prints out the version number at the beginning. The current version is 1.0.1b. This may be convenient to identify the version. K. Oide
20-JAN-1997 14:08:54.21 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. Bug in EMIT. Dear Users: 1. A bug was created on 1/18 in matrix multiplication in EMIT. K. Oide
17-JAN-1997 10:36:47.14 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. Reverting the fringe. Dear Users: 1. I reverted the integration of fringe (half nonlinear - linear - half nonlinea r) , introduced on 11/27/1996, to the original one, (nonlinear - linear at entrance). The reason is it is nothing but eating CPU, and does not improve the accuracy at all. K. Oide
13-JAN-1997 17:29:59.92 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. Bug in transferring EMITX, etc., from EMIT to TRACK. Dear Users: 1. A bug was found in transferring EMITX, EMITY, EMITZ from EMIT to TRACK. They were initialized to the values saved in the marker at the beginning of line when TRACK was called. This bug was created on 10/26/1996. 2. During fixing the bug above, I introduced another bug this afternoon, causing Segmentation Fault. K. Oide
11-JAN-1997 06:25:44.29 From: KEKVAX::OIDE To: @SADUSERS. CC: OIDE Subj: SAD Update. ^^^ and $$$, etc. Dear Users: 1. Now a special notation ^^^ can be used to specify the first component of a beam line. Thus ^^^+(n-1) means the entrance of the n-th component. Also the exit of the last component is represented by $$$ instead of ***, though latter can be used in input. 2. A symbol can be used to specify the keywords of functions Element, LINE, etc., unless values are not assigned to them. LINE[K1,QF] is same as LINE["K1","QF"], if no values are assigned to K1 and QF. 3. A bug was found in tracking in CAVI, when both HARM and FREQ are zero. This caused floating exception. K. Oide