SAD Mails in 1992


Send any comments to ICFA@kekvax.kek.jp

SAD back to SAD Home Page



From:	KEKVAX::OIDE          9-JAN-1992 10:10:21.30
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   SAD is available.

   Dear Users,

1. A new load module is created for M880H.   All commands except Kikuchi's
correction routines are now available.
                                          K. Oide

From:	KEKVAX::OIDE         14-JAN-1992 17:25:01.61
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Linear fringe of bend.

   Dear Users,

1. Now you can calculate the effect of linear fringe of a bend.
The length of the fringe is specified by keyword F1, and the calculation 
is done when keyword FRINGE is nonzero.   The transformation at the entrance is

   exp(:V:),   V= -f^2/rhob px/p/24,

where f is the length of fringe, and rhob bending radius at design momentum.  
At the exit, the sign is changed.   This linear fringe also changes the path
length in the body of the bend as 

   l'=l-(phi0 f)^2/l/24

to maintain the geometric position of the design orbit, i.e., you have to
increase the bend field a little bit to keep the orbit unchange.   Unlike a
quadrupole, the effect of linear fringe is always applied at the both the
entrance and the exit, otherwise you cannot obtain a circular design orbit.

2. Topdrawer output routines TDINIT, TDPUT, TDTERM in TWSDRW are changed.
					K. Oide

From:	KEKVAX::OIDE         15-JAN-1992 16:51:46.81
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   fringe, EPS.

   Dear Users,

1. The transformation of the linear fringe of the entrance of a bend is

   exp(:V:),   V= -f^2/rhob px/p/24 - f/rhob^2 y^2/p/6,

where the notations are same as the previous mail.   At the exit, the sign of
rhob is changed.   (The second term was missed in the previous mail.)

2. You can use a quick solver in the c.o.d. correction if you say EPS 0 before
correction.   This routine is a simple linear solver which is much faster than
the usual SVD routine, but less stable to singularities.   The answers of these
two routines are same within the round-off error when the singular values are
big.
					K. Oide

From:	KEKVAX::OIDE         16-JAN-1992 14:31:06.78
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   SVD.

   Dear Users,   

1. The SVD solver becomes faster when the matrix is far from singular, even
EPS is nonzero.   The quick solver (EPS 0) reported in the previous mail 
is still faster than the new SVD even with theis improvement.
					K. Oide

From:	KEKVAX::OIDE         17-JAN-1992 09:19:32.03
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   FOURIER.

   Dear Users,

1. Some functions are added to the fourier expansion of the tracking.
a) DJPLOT=lfn;     The behavior of the residual deviation of J is plotted to
                   the file number lfn.   The default is zero and no plot is
                   done.
b) ADDTERMS=n;     You can add resonant terms of number n beyond the order
                   specified by MAXORDER.   This may improve the convergence in
                   some cases near resonance.   The resonance is determined by
                   the tune measured from the original data with FFT, therefore 
                   it cannot be the exact tune nor exact resonance.   The
                   default is zero.
c) ADDDENSE=d;     This number specifies the density of the resonant terms.  
                   This is the number of terms per 1/(number of turns) of tune.
                   The default is 6.   If this number is higher, the more
                   higher order terms are used near resonances.   If this is
                   lower, the terms of lower order but farther from resonances 
                   are used.
						K. Oide

From:	KEKVAX::OIDE         18-JAN-1992 09:51:07.91
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   New SVD.

   Dear Users,

1. Now you have a new SVD solver which is as fast as a quick solver when the
matrix is far from singular.   You do not need to set EPS 0 to improve the
speed.   The new SVD automatically choose a fast routine when it is far from
singular.
						K. Oide

From:	KEKVAX::OIDE         21-JAN-1992 12:42:24.37
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Fast Givens' Transformation.

   Dear Users,

1. The Fast Givens' Transformation (See below) is applied to the SVD 
and the eigen system routines, and they both become about 30 % faster for 
a 200*200 matrix.

   Fast Givens' Transformation (FGT):
   The usual Givens' method to anihilate an element of a matrix uses a rotation
of two columns like

   do i=1,n
     aa=a(j,i)
     a(j,i)= c*aa+s*a(k,i)
     a(k,i)=-s*aa+c*a(k,i)
   enddo

where c and s satisfies c^2 + s^2 = 1.   Instead of doing this, if we factorize
each vector by an appropreate factor v(j), we can rewrite the above
transformation as

   do i=1,n
     a(k,i)=a(k,i)-p*a(j,i)
     a(j,i)=a(j,i)+q*a(k,i)
   enddo

where parameters p and q are dtermined by c, s, v(j), and v(k).
Obviously, the number of the multiplication becomes half by this trick.  
Moreover, we can also eliminate the calculation of square root to obtain the
factors c and s in some cases.
					K. Oide

From:	KEKVAX::OIDE         28-JAN-1992 08:26:00.92
To:	@[-]SADUSERS.
CC:	OIDE
Subj:	SAD Update.   MAXI was wrong.

   Dear Users,

1. There was a bug on changing the maximum number of the iteration by 
MAXI_TERATION command in FFS.   
                                        K. Oide

From:	KEKVAX::OIDE          3-FEB-1992 22:13:06.43
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Bug in EMIT in steerings.BACK

   Dear Users,

1. A bug was found in the emittance calculation in steering magnets (bends
whose design bend angle = 0).   This bug was created around 11/28 last year.
Usual bends were OK even if you use them as correctors.
						K. Oide

From:	KEKVAX::OIDE          4-FEB-1992 12:12:36.72
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   2nd order integrator.

   Dear Users,

1. Now we have a new 2nd order integrator for SEXT and OCT for tracking.   The
new integrator for a 2n-pole magnet of thickness l is

   exp(:a l:)exp(:H/2:)exp(:b l:)exp(:V:)exp(:b l:)exp(:H/2:)exp(:a l:),

where a l and b l are the Hamiltonian for drifts of legth a l and b l.
The coefficients are a=1/2-1/Sqrt[12] and b=1/2-a.
The Hamiltonian H is a thin kick

   H=k/(n-1)! Re[ (x - i y)^(n-1) ],

where k is the integrated strength of the magnet k=B^(n-1) l/(B rho).
The higher order correction are made by the kick Hamiltonian

   V= SUM over j=(x,y), k=(x,y) [ -beta/2 (H,k)^2 + gamma (H,j H,k H,j,k) ],

where ,i represents the derivertive by x or y.   We have also introduces two
coefficients beta=1/6-1/Sqrt[48] and gamma=1/40-1/24/Sqrt[3].   This new
integrator gives a correct map for a particle up to the 2nd order of l, when
you write the variables at the exit of the magnet as functions of the entrance
values and k and l.   This integrator is different from those made by R. Ruth
or Yoshida, because they express the exit values with K=k l and l.
   The form of the 2nd order integrator is not uniquely determined.   For
example, you can use an alternative

   exp(:a l:)exp(:(H+V)/2:)exp(:2 b l:)exp(:(H+V)/2:)exp(:a l:).

   For comparison, we remind the old first order integrator:

   exp(:l/6:)exp(:H/2:)exp(:2/3 l:)exp(:H/2:)exp(:l/6:).

The old module with the old integrator is kept as KO04.SAD.LOAD(\SAD0).
					K. Oide

From:	KEKVAX::OIDE          4-FEB-1992 19:57:36.57
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Transverse cavity.

   Dear Users,

1. We have installed a new element, transverse rf cavity.   Usage is:

TCAVI  name = ( K0       = peak horizontal kick angle,
                HARM     = harmonic number,
                PHI      = rf phase,
                FREQ     = rf frequency, which is effective only when HARM is 
                           not specified,
                DX       = horizontal displacement,
                DY       = vertical displacement,
                ROTATE   = skew rotation angle,
                RANKICK  = random turn by turn jitter of K0 in the tracking,
                RANPHASE = random turn by turn jitter of PHI in the tracking.
              );

2. New keywords RANVOLT and RANPHASE are added to CAVI, similar to the above.
RANVOLT means the random jitter of VOLT.
						K. Oide

From:	KEKVAX::OIDE          8-FEB-1992 12:15:58.97
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Bug in eigensystem routine.

   Dear Users,

1. A bug was found in the eigensystem routine, which is used in the emittance
calculation.   If the transfer matrix has an off-diagonal zero element, the
eigen value was wrong.   Emittance with machine errors or the RADCOD flag was
all right.   This bug was created around 1/21 this year when the FGT algorithm
was newly installed.   As I get rid of this bug from the Hessenberg routine
this time, have made a modification which gives better accuracy than before on
the FGT part.   This is the way how I create a new bug every time when I fix an
old bug.                                    K. Oide

From:	KEKVAX::KIKUCHIM      5-MAR-1992 22:24:49.88
To:	OIDE
CC:	
Subj:	DRAW

Fixed scales are now supported in the DRAW command. Parameters max and min can be specified for each varyable:

  DRAW var1 [max] [min] var2 [max] [min]&var3 .....

Max and min parameters can be replaced with @ to specify the automatic scaling:

  ex., DRAW BX 100 DX 0.01 DY @ -0.01

From:	KEKVAX::OIDE          6-MAR-1992 10:42:56.41
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   DRAW scales.

   Dear Users,

1.   Kikuchi san added a new fuction to DRAW.   The description by him 
follows:

Fixed scales are now supported in the DRAW command. Parameters max and 
min can be specified for each varyable:

  DRAW var1 [max] [min] var2 [max] [min]&var3 .....

Max and min parameters can be replaced with @ to specify the automatic scaling:

  ex., DRAW BX 100 DX 0.01 DY @ -0.01

From:	KEKVAX::OIDE          7-MAR-1992 08:10:06.77
To:	@SADUSERS.
CC:	OIDE
Subj:	CORINIT.

   Dear users,

1. You may have noticed that the new module I linked yesterday has a bug about
CORINIT.    It is fixed temporarily, but I am not sure the COD correction works
properly or not.   Please ask Kikuchi san if you have something.    K. Oide

From:	KEKVAX::OIDE          9-MAR-1992 05:36:50.37
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Intrabeam.   Important.

   Dear Users,

1. In the 4th Generation Light Source Workshop, (SLAC, Feb.) Tor Raubenheimer 
has pointed out that it is important to eliminate the contribution of beam tail
to the emittance estimation.   It is done to set the minimum impact parameter
bmin as (bmin^2/gamma) vtrans (N/vol) tdamp is nearly equal to 1, which means
that the eliminates large amplitude collisions whose collision rate is less
than 1/(tdamp).   (Actually, Tor's specification is a bit different from this.)
In the above, vtrans is the transverese velocity, (N/vol) the particle density
in the lab frame, and tdamp the damping time.   The effect is large when the
damping time is small, as for the damping ring.   In the case of the ATF
damping ring (Urakawa's &ATFDR56), the horizontal emittnace for 3 10^10
partices/bunch becomes 1.43 nm, while the old estimation is 1.67 nm, and the
emittance without intrabeam is 1.12 10^-9 nm.    
   A new module with the new method is created, and KO04.SAD.LOAD(\SAD0) gives
the old answer.
						K. Oide

From:	KEKVAX::OIDE         10-MAR-1992 08:25:02.15
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Small changes in output format.

   Dear users,

1. A small change is made in the output format of CAL and GO commands.   You
may see the difference.   By the way, the Hitachi's FORTRAN output on 2020 or
TN3270 is a little bit strange because it starts to write from column 2 in each
line and leaves column 1 always blank, and if you write a line of 80
characters, it automatically puts an extra blank line after the line.   I 
wonder why Hitachi always does such uncomfortable stupid crazy things for us.
					K. Oide

From:	KEKVAX::OIDE         18-MAR-1992 07:54:05.32
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   LTR_ACK.  A New tool.

   Dear Users,

1. A new tool, LTR_ACK is experimentally installed in FFS.   This is a tool to
estimate the momentum acceptance of a ring limited by the modulation of the
linear betatron oscillation by the synchrotron motion.   This routine assumes a
sinusoidal motion of the momentum of a particlewith an amplitude dp/p, and map
x, x', y, y' using the linear one-turn transformation for the momentum during
6100 turns. The off-momentum transformation is obtained using spline fit of 10
parameters of the 4 by 4 symplectic matrix, which always gives a symplectic
transformation. The initial emittance is 1 10^-6 m both x and y.  The change of
c.o.d. due to the momentum change is included. If both the amplitudes x and y
of a particle exceed 1 m, the tracking of the particle is aborted.   The number
of turns is printed in a 2D map in (nus,dp/p) plane, like DAPERT.   

Usage:     LTR_ACK nus_from nus_to nus_step ,

where nus_from and nus_to specify the range of the synchrotron tune to be
surveyed.   The step size of nus is given by nus_step.   All three parameters
must be specified.   The step size in dp/p is 0.05 %.
   This method is not very effective when the transverse nonlinearity dominates
the linear modulation.
						K. Oide

From:	KEKVAX::KIKUCHIM     24-MAR-1992 11:49:40.76
To:	OIDE
CC:	
Subj:	MON modified

Monitor setting error can now be specified independently for x and y plane in the MON command. Syntax is as follows;

 MON [x_error] [y_error] [x-precision] [y_precision] name1 [name2] .....

Errors can be replaced with @ to specify the default value or the value specifird previously. If y_error is not given, x_error is taken as y_error:

ex. MON 10e-6 Q* 
is equivalent to
    MON 10e-6 10e-6 Q*

From:	KEKVAX::OIDE         24-MAR-1992 11:53:29.14
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   MON errors.

   Dear Users,

1. Kikuchi san has updated the MON command.  His description follows.
							K. Oide

Monitor setting error can now be specified independently for x and y plane in
t;

 MON [x_error] [y_error] [x-precision] [y_precision] name1 [name2] .....

Errors can be replaced with @ to specify the default value or the value
specifi:

ex. MON 10e-6 Q*
is equivalent to
    MON 10e-6 10e-6 Q*


From:	KEKVAX::OIDE          2-APR-1992 18:01:51.32
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Fringe.   Implicit scheme.

   Dear Users,

1. The integrator of fringe field of a quadrupole is changed.   The new
one is the Poincare's implicit scheme:

   x1 = x + dH/dp ((x1+x)/2, (p1+p)/2)
   p1 = p - dH/dx ((x1+x)/2, (p1+p)/2),

which looks better in this case, since it can avoid the unphysical 
excitation of y-coordinate of a particle which sits in the horizontal 
plane.   A new parameter FRINGDIV is also created to specify the number
of divisions of the integration.   Say FRINGDIV=n; in the main level.
The default value of FRINGDIV is 1.   
					K. Oide

From:	KEKVAX::OIDE         10-APR-1992 16:04:14.39
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   New fringe integrator.

   Dear users,

1. I have found a new integrator for the fringe field of a quadrupole:

    u  = u0+a/p0 v0^3/3; 
    pu = (pu0-a/p0 u0^2pv0)/(1-(a/p0)^2u0^2v0^2);
    v  = v0+a/p0 u0^3/3;
    pv = (pv0-a/p0 v0^2pu0)/(1-(a/p0)^2u0^2v0^2);
    z  = z0-a/p0^2 (v0^3pu+u0^3pv)/3;
    p  = p0;

where u=x+y, v=x-y, pu=(px+py)/2, pv=(px-py)/2, a= +/- k/l/4.   The
positive sign is chosen at the entrance.   This integrator is the best
among all integrators I ever made.   This is physically acceptable
because a pure  horizontal motion never excites vertical motion, and
faster than the implicit scheme which needs iteration.   In general, a
Hamiltonian which is linear in px and py may be integrated in a similar
way.
						K. Oide


From:	KEKVAX::OIDE         13-APR-1992 10:43:21.46
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Exact solution of fringe.   New.

   Dear Users,

1. I have found the exact solution of the fringe field of a 2n-pole 
magnet. The Hamiltonian is written as

   H = Kn/p (2)^(n/2)pu u^(n+1)/2/(n+1)! delta(s) + c.c. ,

where u = (x + i y)/sqrt(2) and pu = (px - i py)/sqrt(2) are the 
canonical variables, and Kn is +/- B^(n)/Brho.   The positive sign 
is chosen at entrance.   This Hamiltonian is same as Forest's but 
represented using complex canonical variables. This Hamiltonian has 
the solution

  u = u0 (1 - n(2)^(n/2)u0^(n)/2/(n+1)! Kn/p)^(-1/n)
  pu = pu0 (u0/u)^(n+1)                                  .
  z = z0 - Re[(2)^(n/2)pu u0^(n+1)/2/(n+1)! Kn/p^2]

The integrator of a quadrupole is changed to use this exact solution.
   Now we can evaluate the fringe of a sextupole and an octupole in 
the tracking.   SEXT and OCT have a new keyword DISFRING to disable the
fringe field, as QUAD.   If DISFRING is not zero, fringe field is 
ignored.   
					K. Oide

From:	KEKVAX::OIDE         19-APR-1992 11:40:48.13
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   I was wrong on fringe.

   Dear users,

1. I was wrong on the fringe solution.   Please forget about the mail on
the last Monday.    The module is returned to that with the previous
integrator, which was informed on 4/10 for quads, and fringe for sexts
were removed. I have to apologize to everyone who listened to my stupid
statements on the fringe.                     K. Oide


From:	KEKVAX::OIDE         20-APR-1992 10:52:07.42
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   New fringe integrator.

   Dear Users,

1. A new integrator for the fringe field of 2n-pole magnet is implemented
instead of the wrong "exact solution".   The transformation is

Kn=+/- K/l/4/n!
d =1-Kn^2/p0^2((u0^n-v0^n)^2+n^2u0^n v0^n);
u =u0(1-Kn/p0 u0^n/(n+1)+Kn/p0 v0^n);
pu=((1+Kn/p0(u0^n-v0^n))pu0-Kn/p0 n u0^(n-1)v0 pv0)/d;
v =v0(1-Kn/p0 v0^n/(n+1)+Kn/p0 u0^n);
pv=((1+Kn/p0(v0^n-u0^n))pv0-Kn/p0 n v0^(n-1)u0 pu0)/d;
z =z0+Kn/p0^2/(n+1)(pu u0^(n+1)+pv v0^(n+1))-
      Kn/p0^2(pv u0^n v0+pu v0^n u0);
p=p0;

where u = x + i y, pu = px - i py, v = x - i y, pv = px + i py.
Note that z contains pu and pv, not pu0 and pv0.   This transformation is
correct up to the first order of K.
                                 K. Oide

From:	KEKVAX::OIDE         23-APR-1992 11:50:59.03
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Display tune at TRACK.

   Dear users,

1. Changes are made to display the tunes of top 8 peaks of FFT spectrum
for each particle after TRACK.
                                      K. Oide

From:	KEKVAX::KIKUCHIM      7-MAY-1992 15:37:21.50
To:	OIDE
CC:	
Subj:	Tolerances formula

New Command TOR was added. TOR displays Tor Raubenheimer's formula for alignment
tolerances of rings;

   TOR [FULL]

The contribution of each magnet is shown if FULL is specified.

From:	KEKVAX::KIKUCHIM      7-MAY-1992 20:22:12.81
To:	OIDE
CC:	
Subj:	MICADO

MICADO was installed as a solver in the context of correction.
Usage:
   .....
   COR MICADO no_of_correctors
   COR [x] [y] [Ex] [Ey] 

This is equivalent to:
   COR [x] [y] [Ex] [Ey] MICADO no_of_correctors

Solver is reset to usual SVD simply typing,
   COR SVD

From:	KEKVAX::KIKUCHIM      8-MAY-1992 16:43:08.58
To:	OIDE
CC:	
Subj:	DRAW updated

TWSDRW was modified to display the orbit at the monitor.
Dead monitors are not seen.  Usage is:
   DRAW [from_element] [to_element] MONitor [DX] [DY] [..] .....

From:	KEKVAX::OIDE          8-MAY-1992 17:56:45.59
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   TWSDRW by Kikuchi san.

   Dear Users,

1. Kikuchi san has updated DRAW as

TWSDRW was modified to display the orbit at the monitor.
Dead monitors are not seen.  Usage is:
   DRAW [from_element] [to_element] MONitor [DX] [DY] [..] .....

                        K. Oide

From:	KEKVAX::OIDE         28-MAY-1992 13:59:40.03
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   "Momentum dependence" of machine parameters.   New.

   Dear users,

1. A new tool to calcualte the so-called momentum dependences of machine
parameters in EMIT is installed.   What actually calculated are not the
"momentum dependence" but the dependences on the orbit dilatation devided by the
momentum compaction.   Say 

   EMIT dp                  (in FFS)

or 
  
   PSPAN=dp;EMIT USE=....;   (in MAIN)

to calculate them.   The parameter dp is the span of the "momentum", where EMIT
do its calculation at 5 points and estimates the dependences.   The default
value of dp is zero and no "momentum" dependence calculation is made.
Please try to use it.
						K. Oide

From:	KEKVAX::OIDE         28-MAY-1992 18:31:45.50
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   # of off-momentum points in the matching.

   Dear Users,

1. The maximum number of the off-momentum matching conditions is increased to
13 from 7.   If this number is larger than 9, only the values of the functions
in the outer region are displayed.
						K. Oide

From:	KEKVAX::OIDE          1-JUN-1992 15:52:26.39
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Changes in QCELL.

   Dear users,

1. QCELL is changed to improve the off-momentum matching.   COD finding in
QCELL is changed.   The messages when the COD is not found is also changed.
You may feel a better convergence in an off-momentum matching of a ring.
				K. Oide

From:	KEKVAX::OIDE          5-JUN-1992 10:02:16.94
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   QDCELL

   Dear Users,

1. I changed QDCELL to fix bugs in the derivative of dispersions and tunes. 
Matching with CELL will be improved, but I guess affected matching conditions
are not usually applied even with these bugs.
						K. Oide

From:	KEKVAX::OIDE         16-JUN-1992 11:59:42.98
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Weights in matching. RELW and ABSW.

   Dear users,

1. A new flag RELW (opposite is ABSW) is created to change the weights of
variables.   If RELW (or NOABSW) is specified, the weights are determined to
minimize

   Sum over i [ Ni ki (dki/ki)^2 ] ,

where Ni is the number of "independent" (i.e., placed with a finite separation)
magnets, ki the strength (or length), and dki its change.   If ABSW (or NORELW)
is specified, the weights are determined to minimize

   Sum over i [ f(m) dki^2 ] ,

where f(m) is a number specified to the type of an element.   The default is
ABSW, which is the same mode as before this change.
   RELW has a merit on combining different kinds of variables naturally, and
cancelling reltive strength errors which is randomly assigned to magnets (by DK
command).   However it has a demerit when the expected change is not a relative
but absolute.    You notice that in many cases the change of strength of quads
is not proportional to its strength.   Sometimes you start matching with zero
initial values of some quads.   Anyway RELW can give a different answer from
that by ABSW, so you can try RELW when a matching satulates with ABSW.
                                      K. Oide

From:	KEKVAX::OIDE         17-JUN-1992 13:39:29.43
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   {}, etc.

   Dear Users,

1. I modified the string pattern matching to accept < and > in place of { and
}, because Hitachi's interface to TN3270 does not handle { and }.   { and } are
still valid, but I made a mistake on this modification in this morning.   Sorry
for the late notice and the bug.

2. The matching changing a bending magnet does not work by an unknown reason.  
Now inspecting.                         
					K. Oide

From:	KEKVAX::OIDE         17-JUN-1992 14:48:05.18
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Matching with bend.

   Dear users,

1. I corrected the bug in the matching with bends.   The bug was a mistake on
the declaration of an array IVAL in TFFSA.   A few days ago when I modified
TFFSA to install RELW I also changed some array declarations in TFFSA (nothing
to do with the modification, actually it was not necesssary at all.)  I said
R*8 IVAL in place of I*4, but the surprising is that this serious mistake 
only caused this bug, because this array is just used as a reference except for
the bend thing.   On the bend part it is refered as i=iv(k).
						K. Oide

From:	KEKVAX::OIDE         30-JUN-1992 09:24:00.88
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Bug in radiation in solenoid.

   Dear Users,

1. I have found a bug in the tracking routine for radiation in solenoid, and
fixed it.   If RAD is ON, this bug simply skips the body of a solenoid.
					K. Oide

From:	KEKVAX::OIDE          6-JUL-1992 10:59:10.95
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Beamsize by EMIT.   DISP B.

   Dear users,

1. A change is made to see the beam size calculated by EMIT all around a ring.  
If you specify CODPLOT and say EMIT in FFS, you can see the beam size by
DISP B command after that.   You can also calculate the beam size by a new
command BEAM_SIZE in FFS using the 4*5 matrix.   Unlike as before this change, 
you cannot see the the size without saying EMIT or BEAM_SIZE.   You cannot DRAW
the beamsize by EMIT until DRAW is modified in future.
						K. Oide

From:	KEKVAX::OIDE         18-SEP-1992 07:42:44.58
To:	@SADUSERS.
CC:	OIDE
Subj:	Acceleration optics.   New.

   Dear Users:

1. Acceleration in linac has been included in optics calculation and tracking.
This release is the first one for that.   Drawing and orbiut correction will
follow soon, by Kikuchi san.

(Accelerating cavity)
The definition of cavity is same as before, except the keyword L(cavity
length) is now activated.   The following example 

   CAVI CA=(L=1 VOLT=100 MV FREQ=2856 MHZ PHI=-90 DEG);

defines an accelerating cavity of 1 m length, 100 MV peak accelrating voltage,
S band, and the phase is at the top of crest.   The convention of the phase is
compatible with a cavity in a ring.

(Design momentum along a line)
The flag TRPT specifies whether the acceleration is taken into account.  This
flag is automatically set when TURNS=1 in the tracking.   In FFS this flag is
ON as the default.   The antonym of TRPT is RING.
   When TRPT is ON, a design momentum is defined along the line.   The design
momentum is determined only by the initial momentum, which is set in the same
way as before, and the accelerating voltage and phase of cavities.   After a
cavity the design momentum is increased by -VOLT*sin(PHI).   This is just a
definition of the design momentum and not necessary to be equal to an actual
momentum of any physical particle.
   The strengths of magnets are defined for the design momentum.   Therefore, if
you change the phase of a cavity, SAD automatically scales the magnetic fields
of magnets in the downstream of the cavity.   I think that this is very 
confortable to define magnets in the same manner as before.

(Tracking)
The result of tracking is described in (x,px/p1,y,py/p1,z,dp/p1), where p1 is
the design momentum at the measured point.   Tracking does a full symplectic 
map in 6 dimension (if RAD is off).

(Optics in FFS)
FFS now defines optical functions in the way that is maximally compatible with 
the usual constant momentum optics.   Note that FFS calculates only transverse
optics in 4 by 5 formalism, not 6 by 6.   It does not include the change of z
coordinate.   The accelerating phase
   FFS uses a vector u=(x,px/p,y,py/p)^t to describe the optics.   The transfer
matrics M of u from point 1 to 2 is written as

   u_2 = M u_1 = sqrt(p_2/p_1) S u_1,

where p_1 and p_2 are the momenta of the particle (not the design momenta) at 1
and 2, and S is a symplectic matrix.   This matrix S defines all optical
functions in the same way as the constant momentum case.   Note that this
definition is only valid when there is no reaction from the transverse motion
to the logitudinal motion.
   Once you accept this definition, you can calculate the beam size as

   = beta emitx + eta_x^2 ,

where emitx and  are the local emittance and the momentum spread,
which scale as the acceleration.   Thus the definition of optical parameters
are actually same as the conventional way.
   You can do matching and everything in FFS as usual.   Kikuchi will change
DRAW and the orbit correction soon.

(New commands in FFS)

   DISP_LAY A_CCELERATION [parameters...] displays the design momentum and 
physical emittances along the line.

   MAT_RIX [{S_YMPLECTIC,P_HYSICAL}] [ele1 [ele2]] displays either S (default)
or M above, from ele1 to ele2.

(Modified routines)
TFFS,TFFSA,QCELL,QTWISS,QCAV,TFGEO,TFDISP,TFBEAM,TFMAT,TCAV,TCAVE,DOLINE

                                         K. Oide


From:	KEKVAX::OIDE         18-SEP-1992 11:46:58.35
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Radiation in steering.

   Dear Users:

1. Radiation in tracking in steering (zero angle bend) is updated.   Now it
becomes same as in a bend.                K. Oide

From:	KEKVAX::OIDE         23-SEP-1992 09:43:45.52
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Change of module.

   Dear users:

1. The load module in KO04.SAD.LOAD is replaced with a new one.   Please call
me (6409) if you find something strange.   The old one had a problem on saving
parameter of MARK since Monday.   The new one not only fixes it, but modifies
other parts for future extension, especially in tracking with cavity.
					K. Oide

From:	KEKVAX::OIDE         24-SEP-1992 09:52:33.25
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.    DRAW MOMENTUM.

   Dear Users:

1. Kikuchi san has updated DRAW.   His message follows.   K. Oide

DRAW command is now compatible with acceleration. It also has
a new attribute MOMENTUM to draw momentum along the lattice.
Usage;
      DRAW MOMENTUM



From:	KEKVAX::OIDE         24-SEP-1992 10:00:37.06
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Wakefiled tracking.

   Dear users:

1. I have installed a preliminary version of a wakefiled simulation in linac.
You can simulate either single or multi bunch beam breakup with a realistic
lattice of linac.   This is the first version and requires debugging and
improvement in a lot of parts.   Please look at KO04.SAD.FORT(&ACC) for the
usage.                                     K. Oide

From:	KEKVAX::OIDE          1-OCT-1992 13:49:13.29
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Tracking in bend, etc.

   Dear Users:

1. Tracking in a flat bend is updated.   The transformation at edges becomes
"exact".   This transformation is similar to Forest's, but a little different
from his. A discription note on that is available.   I will send you if 
requested.

2. The output of MEAS_URE command is changed.   Now x-y decoupled beam
parameter are printed as well as the projected.

3. A new command TERM_INATE is added.   You can return to the original input
file by TERM.

   IN 7
     IN 6
	...
     TERM     !Now the input returns to file 7.
   TERM   

If you say END all the input filed are closed and you cannot return to them.

						K. Oide

From:	KEKVAX::OIDE          5-OCT-1992 08:43:50.89
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Lineas fringe of bend.

   Dear users,

1. Transformation of the linear fringe of a bend is modified.
						K. Oide

From:	KEKVAX::OIDE         12-OCT-1992 11:02:09.52
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Bug in saving markers.

   Dear Users,
   A bug is found in SAVE(and also STOP) for markers.   The value of ALPHAX has
been wrongly saved.   This bug was made after Sept 18.
						K. Oide

From:	KEKVAX::OIDE         15-OCT-1992 16:26:58.06
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Phase Space Plot for Tracking.   New.

   Dear Users,

1. A new plot becomes available for tracking.   The new one plots coordinates
of all particles, every turn.   This plot is suitable to see a resonance
structure in the phase space.  If you specify

   PHSPLOTS=filenumber;

before tracking, the new plot is created in file of the file number.   Three
pictures (X,PX), (Y,PY), (Z,PZ) are created automatically.
   An example is available in KO04.SAD.FORT(TD), where the second picture looks
most popular.
						K. Oide

From:	KEKVAX::OIDE         28-OCT-1992 11:34:24.57
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Bug in fringe of sext.

   Dear users:

1. A bug is found in the tracking in the fringe of sextupole and octupole.
This bug is created on 4/20/1992.   The anounce on 4/20 was correct but the
coding had a mistake of a sign of a term.   The correct transformation is

Kn=+/- K/l/4/n!
d =1-Kn^2/p0^2((u0^n-v0^n)^2+n^2u0^n v0^n);
u =u0(1-Kn/p0 u0^n/(n+1)+Kn/p0 v0^n);
pu=((1+Kn/p0(u0^n-v0^n))pu0-Kn/p0 n u0^(n-1)v0 pv0)/d;
v =v0(1-Kn/p0 v0^n/(n+1)+Kn/p0 u0^n);
pv=((1+Kn/p0(v0^n-u0^n))pv0-Kn/p0 n v0^(n-1)u0 pu0)/d;
z =z0+Kn/p0^2/(n+1)(pu u0^(n+1)+pv v0^(n+1))-
      Kn/p0^2(pv u0^n v0+pu v0^n u0);
p=p0;

The wrong one was

Kn=+/- K/l/4/n!
d =1-Kn^2/p0^2(-(u0^n-v0^n)^2+n^2u0^n v0^n);
u =u0(1-Kn/p0 u0^n/(n+1)+Kn/p0 v0^n);
pu=((1+Kn/p0(u0^n-v0^n))pu0-Kn/p0 n u0^(n-1)v0 pv0)/d;
v =v0(1-Kn/p0 v0^n/(n+1)+Kn/p0 u0^n);
pv=((1+Kn/p0(v0^n-u0^n))pv0-Kn/p0 n v0^(n-1)u0 pu0)/d;
z =z0+Kn/p0^2/(n+1)(pu u0^(n+1)+pv v0^(n+1))-
      Kn/p0^2(pv u0^n v0+pu v0^n u0);
p=p0;

					K. Oide

From:	KEKVAX::OIDE         13-NOV-1992 11:23:47.76
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Change in radiation in tracking in sext.

   Dear Users:

1. Radiation in sext, in tracking for a ring, is changed to be irrelevant to
the flag RADCOD.   The previous module causes a problem when RADCOD is OFF and
RAD is ON in the case of a ring.   The new module does not see the flag RADCOD
in the tracking for a ring.
						K. Oide

From:	KEKVAX::OIDE          2-DEC-1992 17:51:23.34
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   COD of momentum, etc.

   Dear Users:

1. A change is made to display the momentum along COD with radiation.
In FFS say

   .....
   CODPLOT RADCOD
   EMIT
   DISP A

to see the momentum.
						K. Oide

2. (From KIKUCHIM)
Correction commnads manual is now available. You can fetch it from a file
named PublicBT212 in Macintosh BT212 which is connected to 1Goukan Network.


From:	KEKVAX::OIDE          4-DEC-1992 09:37:22.13
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Alignment of adjacent elements.

   Dear Users:

1. The alignment error for elements which are placed with zero-thickness
spacing is always adjusted to the first element by DELX, DELY, and DELC 
commands.  This change may affect results by the old module.   The old module
will be kept as KO04.SAD.LOAD(\SAD0) for a while.
						K. Oide

From:	KEKVAX::OIDE          9-DEC-1992 16:03:04.42
To:	@SADUSERS.
CC:	OIDE
Subj:	Partial manual.

   Dear Users:

1. A partial manual of SAD main level is available at Public holder of K. Oide
Mac (3 goukan 4f).   Please do not expect too much.
						K. Oide


From:	KEKVAX::OIDE          9-DEC-1992 16:20:00.91
To:	TOGE
CC:	OIDE
Subj:	

   Dear Users:

1. A partial manual of SAD main level is available at Public holder of K  
Please do expect too much.
                                           K. OIDE

From:	KEKVAX::OIDE         10-DEC-1992 19:24:24.90
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Bug in machine error routine.

   Dear Users:

1. A bug was found in the change on 12/4 about the misalignment.   This bug
destructs the data of some elements once you specify any kind of error like
DELX, DELY, etc.   Calculation since 12/4 with errors should be redone.
		                         K. Oide

From:	KEKVAX::OIDE         25-DEC-1992 11:08:38.86
To:	@SADUSERS.
CC:	OIDE
Subj:	SAD Update.   Touchek lifetime by transverse aperture.   New.

   Dear Users:

1. EMIT now calculates the Touchek lifetime which is limited by transverse
apertures as well as the longitudinal one.   It assumes that the apertures in
x, y, z directions are independent.   In the actual situation this assumption
is not valid, but you can estimate the lifetime from the lifetimes for the
independent apertures with some approximation.
						K. Oide