{"id":82,"date":"2020-05-13T14:55:25","date_gmt":"2020-05-13T05:55:25","guid":{"rendered":"http:\/\/localhost:8888\/SAD\/?p=82"},"modified":"2020-08-31T13:28:33","modified_gmt":"2020-08-31T04:28:33","slug":"sad-ffs-command-sad-script","status":"publish","type":"post","link":"https:\/\/acc-physics.kek.jp\/SAD\/how-to-use-sad\/sad-ffs-command-sad-script\/","title":{"rendered":"SAD\/FFS Command &amp; SAD Script"},"content":{"rendered":"<p><center><\/p>\n<h2>Welcome to SAD\/FFS &#038; SADScript<br \/>\n<\/h2>\n<p><\/center><br \/>\n<center> SAD\/FFS SADScript Version: 1.1.9.0.1k64, Updated: 08\/31\/2020<\/center><\/p>\n<pre> Please use browser's search to find an item.\r\n\r\n The FFS commands are shown in uppercases. The minimum abbreviated form of each command is enclosed\r\nin (). Each command can be shorten down to that. The optional arguments for the commands are usually\r\nshown in []. The notation ===> reads \"equivalent to\" below.<\/pre>\n<p><a href=\"\/SAD\/\"><\/p>\n<h4><img decoding=\"async\" src=\"\/SAD\/SADHelp_img\/SAD.jpg\" align=\"middle\" \nalt=\"SAD\" width=90>Back to SAD Home Page<\/h4>\n<p><\/a><br \/>\n<a href=\"\/SAD\/how-to-use-sad\/sad-ffs-examples\/\"><\/p>\n<h4>SAD\/FFS Examples<\/h4>\n<p><\/a><\/p>\n<hr>\n<pre>\r\n<a href=#L > <\/a>\r\n   <a href=#LABORT>ABORT<\/a>\r\n   <a href=#LAPPEND(APP)>APPEND(APP)<\/a>\r\n   <a href=#LATTRIBUTE(ATTR)>ATTRIBUTE(ATTR)<\/a>\r\n   <a href=#Lbeam-line>beam-line<\/a>\r\n      <a href=#Lbeam-line-functions>beam-line-functions<\/a>\r\n         <a href=#LBeamLine>BeamLine<\/a>\r\n         <a href=#LBeamLineName>BeamLineName<\/a>\r\n         <a href=#LExtractBeamLine>ExtractBeamLine<\/a>\r\n         <a href=#LPrintBeamLine>PrintBeamLine<\/a>\r\n         <a href=#LWriteBeamLine>WriteBeamLine<\/a>\r\n      <a href=#Lorientation-of-an-element>orientation-of-an-element<\/a>\r\n   <a href=#LBEAMSIZE(BEAM)>BEAMSIZE(BEAM)<\/a>\r\n   <a href=#LBYE>BYE<\/a>\r\n   <a href=#Lcharacter-string>character-string<\/a>\r\n      <a href=#LFromCharacterCode>FromCharacterCode<\/a>\r\n      <a href=#LStringFill>StringFill<\/a>\r\n      <a href=#LStringJoin>StringJoin<\/a>\r\n      <a href=#LStringLength>StringLength<\/a>\r\n      <a href=#LStringMatchQ>StringMatchQ<\/a>\r\n      <a href=#LStringPart>StringPart<\/a>\r\n      <a href=#LStringPosition>StringPosition<\/a>\r\n      <a href=#LStringReplace>StringReplace<\/a>\r\n      <a href=#LStringTrim>StringTrim<\/a>\r\n      <a href=#LSymbol>Symbol<\/a>\r\n      <a href=#LToCharacterCode>ToCharacterCode<\/a>\r\n      <a href=#LToExpression>ToExpression<\/a>\r\n      <a href=#LToString>ToString<\/a>\r\n   <a href=#Lcommand-syntax>command-syntax<\/a>\r\n   <a href=#Lcomponents>components<\/a>\r\n   <a href=#Lconstants>constants<\/a>\r\n   <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a>\r\n   <a href=#LCHROMATICITY(CHRO)>CHROMATICITY(CHRO)<\/a>\r\n   <a href=#LCLOSE(CLO)>CLOSE(CLO)<\/a>\r\n   <a href=#LCOUPLE(COUP)>COUPLE(COUP)<\/a>\r\n   <a href=#Ldata-structure>data-structure<\/a>\r\n      <a href=#LExtract>Extract<\/a>\r\n      <a href=#LHead>Head<\/a>\r\n      <a href=#LLength>Length<\/a>\r\n      <a href=#LList>List<\/a>\r\n      <a href=#LPart>Part<\/a>\r\n   <a href=#Ldefining-functions>defining-functions<\/a>\r\n   <a href=#Ldynamics>dynamics<\/a>\r\n      <a href=#Lindependent-variable>independent-variable<\/a>\r\n      <a href=#LLagrangean>Lagrangean<\/a>\r\n      <a href=#LHamiltonian>Hamiltonian<\/a>\r\n         <a href=#L2nd-order-Hamiltonian>2nd-order-Hamiltonian<\/a>\r\n            <a href=#Lsolution-H2>solution-H2<\/a>\r\n            <a href=#Lsolution-dH>solution-dH<\/a>\r\n      <a href=#Lremarks-on-dynamics>remarks-on-dynamics<\/a>\r\n      <a href=#Lx-y-coupling>x-y-coupling<\/a>\r\n      <a href=#Lextended-Twiss-parameters>extended-Twiss-parameters<\/a>\r\n         <a href=#Ldefinitions>definitions<\/a>\r\n      <a href=#Lsynchrotron-radiation>synchrotron-radiation<\/a>\r\n      <a href=#Lequilibrium-beam-envelope>equilibrium-beam-envelope<\/a>\r\n   <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a>\r\n      <a href=#LACCELERATION(A)>ACCELERATION(A)<\/a>\r\n      <a href=#LALL>ALL<\/a>\r\n      <a href=#LBEAM(B)>BEAM(B)<\/a>\r\n      <a href=#LDREFERENCE(DRE)>DREFERENCE(DRE)<\/a>\r\n      <a href=#LDUMPOPTICS(D)>DUMPOPTICS(D)<\/a>\r\n      <a href=#LGAMMA(GA)>GAMMA(GA)<\/a>\r\n      <a href=#LGEOMETRY(G)>GEOMETRY(G)<\/a>\r\n      <a href=#LOGEOMETRY(OG)>OGEOMETRY(OG)<\/a>\r\n      <a href=#LORBIT(O)>ORBIT(O)<\/a>\r\n      <a href=#Lpattern-string>pattern-string<\/a>\r\n      <a href=#LPHYSICAL(P)>PHYSICAL(P)<\/a>\r\n      <a href=#Lregion>region<\/a>\r\n      <a href=#LREFERENCE(RE)>REFERENCE(RE)<\/a>\r\n      <a href=#LRMATRIX(R)>RMATRIX(R)<\/a>\r\n      <a href=#LZ>Z<\/a>\r\n   <a href=#LDRAW>DRAW<\/a>\r\n      <a href=#LDraw$Option>Draw$Option<\/a>\r\n   <a href=#LDUMP>DUMP<\/a>\r\n   <a href=#Lelements>elements<\/a>\r\n      <a href=#LAPERT>APERT<\/a>\r\n      <a href=#LBEND>BEND<\/a>\r\n         <a href=#LAE1>AE1<\/a>\r\n         <a href=#LAE2>AE2<\/a>\r\n         <a href=#LANGLE>ANGLE<\/a>\r\n         <a href=#LDISFRIN>DISFRIN<\/a>\r\n         <a href=#LDISRAD>DISRAD<\/a>\r\n         <a href=#LDROTATE>DROTATE<\/a>\r\n         <a href=#LDX>DX<\/a>\r\n         <a href=#LDY>DY<\/a>\r\n         <a href=#LE1>E1<\/a>\r\n         <a href=#LE2>E2<\/a>\r\n         <a href=#LF1>F1<\/a>\r\n         <a href=#LFB1>FB1<\/a>\r\n         <a href=#LFB2>FB2<\/a>\r\n         <a href=#LFRINGE>FRINGE<\/a>\r\n         <a href=#LK0>K0<\/a>\r\n         <a href=#LK1>K1<\/a>\r\n         <a href=#LL>L<\/a>\r\n         <a href=#LROTATE>ROTATE<\/a>\r\n         <a href=#Ltransformation:BEND>transformation:BEND<\/a>\r\n      <a href=#LCAVI>CAVI<\/a>\r\n         <a href=#LDISFRIN>DISFRIN<\/a>\r\n         <a href=#LDPHI>DPHI<\/a>\r\n         <a href=#LDVOLT>DVOLT<\/a>\r\n         <a href=#LDX>DX<\/a>\r\n         <a href=#LDY>DY<\/a>\r\n         <a href=#LFREQ>FREQ<\/a>\r\n         <a href=#LHARM>HARM<\/a>\r\n         <a href=#LL>L<\/a>\r\n         <a href=#LPHI>PHI<\/a>\r\n         <a href=#LROTATE>ROTATE<\/a>\r\n         <a href=#LV02>V02<\/a>\r\n         <a href=#LV1>V1<\/a>\r\n         <a href=#LV11>V11<\/a>\r\n         <a href=#LVOLT>VOLT<\/a>\r\n      <a href=#LCOORD>COORD<\/a>\r\n      <a href=#Ldefault-keyword>default-keyword<\/a>\r\n      <a href=#LDECA>DECA<\/a>\r\n         <a href=#LDISFRIN>DISFRIN<\/a>\r\n         <a href=#LDISRAD>DISRAD<\/a>\r\n         <a href=#LDX>DX<\/a>\r\n         <a href=#LDY>DY<\/a>\r\n         <a href=#LK4>K4<\/a>\r\n         <a href=#LL>L<\/a>\r\n         <a href=#LROTATE>ROTATE<\/a>\r\n         <a href=#Ltransformation:THIN>transformation:THIN<\/a>\r\n      <a href=#LDODECA>DODECA<\/a>\r\n         <a href=#LDISFRIN>DISFRIN<\/a>\r\n         <a href=#LDISRAD>DISRAD<\/a>\r\n         <a href=#LDX>DX<\/a>\r\n         <a href=#LDY>DY<\/a>\r\n         <a href=#LK5>K5<\/a>\r\n         <a href=#LL>L<\/a>\r\n         <a href=#LROTATE>ROTATE<\/a>\r\n         <a href=#Ltransformation:THIN>transformation:THIN<\/a>\r\n      <a href=#LDRIFT>DRIFT<\/a>\r\n         <a href=#LL>L<\/a>\r\n         <a href=#LRADIUS>RADIUS<\/a>\r\n         <a href=#Ltransformation:DRIFT>transformation:DRIFT<\/a>\r\n      <a href=#Lkeywords>keywords<\/a>\r\n      <a href=#LMARK>MARK<\/a>\r\n         <a href=#LOFFSET>OFFSET<\/a>\r\n      <a href=#LMULT>MULT<\/a>\r\n         <a href=#LK0>K0<\/a>\r\n         <a href=#LSK0>SK0<\/a>\r\n         <a href=#LK1>K1<\/a>\r\n         <a href=#LSK1>SK1<\/a>\r\n         <a href=#LK2>K2<\/a>\r\n         <a href=#LSK2>SK2<\/a>\r\n         <a href=#LK3>K3<\/a>\r\n         <a href=#LSK3>SK3<\/a>\r\n         <a href=#LK4>K4<\/a>\r\n         <a href=#LSK4>SK4<\/a>\r\n         <a href=#LK5>K5<\/a>\r\n         <a href=#LSK5>SK5<\/a>\r\n         <a href=#LK6>K6<\/a>\r\n         <a href=#LSK6>SK6<\/a>\r\n         <a href=#LK7>K7<\/a>\r\n         <a href=#LSK7>SK7<\/a>\r\n         <a href=#LK8>K8<\/a>\r\n         <a href=#LSK8>SK8<\/a>\r\n         <a href=#LK9>K9<\/a>\r\n         <a href=#LSK9>SK9<\/a>\r\n         <a href=#LK10>K10<\/a>\r\n         <a href=#LSK10>SK10<\/a>\r\n         <a href=#LK11>K11<\/a>\r\n         <a href=#LSK11>SK11<\/a>\r\n         <a href=#LK12>K12<\/a>\r\n         <a href=#LSK12>SK12<\/a>\r\n         <a href=#LK13>K13<\/a>\r\n         <a href=#LSK13>SK13<\/a>\r\n         <a href=#LK14>K14<\/a>\r\n         <a href=#LSK14>SK14<\/a>\r\n         <a href=#LK15>K15<\/a>\r\n         <a href=#LSK15>SK15<\/a>\r\n         <a href=#LK16>K16<\/a>\r\n         <a href=#LSK16>SK16<\/a>\r\n         <a href=#LK17>K17<\/a>\r\n         <a href=#LSK17>SK17<\/a>\r\n         <a href=#LK18>K18<\/a>\r\n         <a href=#LSK18>SK18<\/a>\r\n         <a href=#LK19>K19<\/a>\r\n         <a href=#LSK19>SK19<\/a>\r\n         <a href=#LK20>K20<\/a>\r\n         <a href=#LSK20>SK20<\/a>\r\n         <a href=#LK21>K21<\/a>\r\n         <a href=#LSK21>SK21<\/a>\r\n         <a href=#LAE1>AE1<\/a>\r\n         <a href=#LAE2>AE2<\/a>\r\n         <a href=#LANGLE>ANGLE<\/a>\r\n         <a href=#LDISFRIN>DISFRIN<\/a>\r\n         <a href=#LDISRAD>DISRAD<\/a>\r\n         <a href=#LDPHI>DPHI<\/a>\r\n         <a href=#LDVOLT>DVOLT<\/a>\r\n         <a href=#LE1>E1<\/a>\r\n         <a href=#LE2>E2<\/a>\r\n         <a href=#LF1>F1<\/a>\r\n         <a href=#LF2>F2<\/a>\r\n         <a href=#LFB1>FB1<\/a>\r\n         <a href=#LFB2>FB2<\/a>\r\n         <a href=#LFREQ>FREQ<\/a>\r\n         <a href=#LFRINGE>FRINGE<\/a>\r\n         <a href=#LHARM>HARM<\/a>\r\n         <a href=#LL>L<\/a>\r\n         <a href=#Lmisalignments>misalignments<\/a>\r\n         <a href=#Lmultipole_with_nonzero_ANGLE>multipole_with_nonzero_ANGLE<\/a>\r\n         <a href=#LPHI>PHI<\/a>\r\n         <a href=#LRADIUS>RADIUS<\/a>\r\n         <a href=#LVOLT>VOLT<\/a>\r\n      <a href=#LOCT>OCT<\/a>\r\n         <a href=#LDISFRIN>DISFRIN<\/a>\r\n         <a href=#LDISRAD>DISRAD<\/a>\r\n         <a href=#LDX>DX<\/a>\r\n         <a href=#LDY>DY<\/a>\r\n         <a href=#LK3>K3<\/a>\r\n         <a href=#LL>L<\/a>\r\n         <a href=#LROTATE>ROTATE<\/a>\r\n         <a href=#Ltransformation:THIN>transformation:THIN<\/a>\r\n      <a href=#LQUAD>QUAD<\/a>\r\n         <a href=#LDISFRIN>DISFRIN<\/a>\r\n         <a href=#LDISRAD>DISRAD<\/a>\r\n         <a href=#LDX>DX<\/a>\r\n         <a href=#LDY>DY<\/a>\r\n         <a href=#LF1>F1<\/a>\r\n         <a href=#LF2>F2<\/a>\r\n         <a href=#LFRINGE>FRINGE<\/a>\r\n         <a href=#LK1>K1<\/a>\r\n         <a href=#LL>L<\/a>\r\n         <a href=#LROTATE>ROTATE<\/a>\r\n         <a href=#Ltransformation:QUAD>transformation:QUAD<\/a>\r\n      <a href=#LSEXT>SEXT<\/a>\r\n         <a href=#LDISFRIN>DISFRIN<\/a>\r\n         <a href=#LDISRAD>DISRAD<\/a>\r\n         <a href=#LDX>DX<\/a>\r\n         <a href=#LDY>DY<\/a>\r\n         <a href=#LK2>K2<\/a>\r\n         <a href=#LL>L<\/a>\r\n         <a href=#LROTATE>ROTATE<\/a>\r\n         <a href=#Ltransformation:THIN>transformation:THIN<\/a>\r\n      <a href=#LSOL>SOL<\/a>\r\n         <a href=#LBOUND>BOUND<\/a>\r\n         <a href=#LBZ>BZ<\/a>\r\n         <a href=#LDISFRIN>DISFRIN<\/a>\r\n         <a href=#LDPX>DPX<\/a>\r\n         <a href=#LDPY>DPY<\/a>\r\n         <a href=#LDX>DX<\/a>\r\n         <a href=#LDY>DY<\/a>\r\n         <a href=#LF1>F1<\/a>\r\n         <a href=#LGEO>GEO<\/a>\r\n   <a href=#Lexpression>expression<\/a>\r\n      <a href=#L(-)>(-)<\/a>\r\n      <a href=#L(\/)>(\/)<\/a>\r\n      <a href=#LAddTo(+=)>AddTo(+=)<\/a>\r\n      <a href=#LAlternatives(|)>Alternatives(|)<\/a>\r\n      <a href=#LAnd(&#038;&#038;)>And(&&)<\/a>\r\n      <a href=#LApply (@@)>Apply (@@)<\/a>\r\n      <a href=#LCompoundExpression(;)>CompoundExpression(;)<\/a>\r\n      <a href=#LDecrement(--)>Decrement(--)<\/a>\r\n      <a href=#LDivideBy(\/=)>DivideBy(\/=)<\/a>\r\n      <a href=#LDot(.)>Dot(.)<\/a>\r\n      <a href=#LEqual(==)>Equal(==)<\/a>\r\n      <a href=#LFunction(&#038;)>Function(&)<\/a>\r\n      <a href=#LGreater(>)>Greater(>)<\/a>\r\n      <a href=#LGreaterEqual(>= or =>)>GreaterEqual(>= or =>)<\/a>\r\n      <a href=#LIncrement(++)>Increment(++)<\/a>\r\n      <a href=#LLess(<)>Less(<)<\/a>\r\n      <a href=#LLessEqual(<= or =<)>LessEqual(<= or =<)<\/a>\r\n      <a href=#LList({})>List({})<\/a>\r\n      <a href=#LMap (\/@)>Map (\/@)<\/a>\r\n      <a href=#LMapAll(\/\/@)>MapAll(\/\/@)<\/a>\r\n      <a href=#LMember(@)>Member(@)<\/a>\r\n      <a href=#LMessageName(::)>MessageName(::)<\/a>\r\n      <a href=#LNot(~)>Not(~)<\/a>\r\n      <a href=#LOr(||)>Or(||)<\/a>\r\n      <a href=#LPart([[]])>Part([[]])<\/a>\r\n      <a href=#LPatternTest(?)>PatternTest(?)<\/a>\r\n      <a href=#LPlus(+)>Plus(+)<\/a>\r\n      <a href=#LPower(^)>Power(^)<\/a>\r\n      <a href=#LRepeated(..)>Repeated(..)<\/a>\r\n      <a href=#LRepeatedNull(...)>RepeatedNull(...)<\/a>\r\n      <a href=#LReplaceAll(\/.)>ReplaceAll(\/.)<\/a>\r\n      <a href=#LReplaceRepeated(\/\/.)>ReplaceRepeated(\/\/.)<\/a>\r\n      <a href=#LRule(->)>Rule(->)<\/a>\r\n      <a href=#LRuleDelayed(:>)>RuleDelayed(:>)<\/a>\r\n      <a href=#LSameQ(===)>SameQ(===)<\/a>\r\n      <a href=#LSequence([])>Sequence([])<\/a>\r\n      <a href=#LSet(=)>Set(=)<\/a>\r\n      <a href=#LSetDelayed(:=)>SetDelayed(:=)<\/a>\r\n      <a href=#LStringJoin (\/\/)>StringJoin (\/\/)<\/a>\r\n      <a href=#LSubtractFrom(-=)>SubtractFrom(-=)<\/a>\r\n      <a href=#LTagSet(\/:)>TagSet(\/:)<\/a>\r\n      <a href=#LTimes(*)>Times(*)<\/a>\r\n      <a href=#LTimesBy(*=)>TimesBy(*=)<\/a>\r\n      <a href=#LUnequal(<>)>Unequal(<>)<\/a>\r\n      <a href=#LUnsameQ(<=>)>UnsameQ(<=>)<\/a>\r\n      <a href=#LUnset(=.)>Unset(=.)<\/a>\r\n   <a href=#LELSE>ELSE<\/a>\r\n   <a href=#LELSEIF>ELSEIF<\/a>\r\n   <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a>\r\n   <a href=#LEND>END<\/a>\r\n   <a href=#LENDIF>ENDIF<\/a>\r\n   <a href=#LEXECUTE(EXEC)>EXECUTE(EXEC)<\/a>\r\n   <a href=#LEXPAND>EXPAND<\/a>\r\n   <a href=#Lflags>flags<\/a>\r\n      <a href=#LABSW>ABSW<\/a>\r\n      <a href=#LBIPOL>BIPOL<\/a>\r\n      <a href=#LCALC4D>CALC4D<\/a>\r\n      <a href=#LCALC6D>CALC6D<\/a>\r\n      <a href=#LCELL>CELL<\/a>\r\n      <a href=#LCMPLOT>CMPLOT<\/a>\r\n      <a href=#LCOD>COD<\/a>\r\n      <a href=#LCODPLOT>CODPLOT<\/a>\r\n      <a href=#LCONV>CONV<\/a>\r\n      <a href=#LCONVCASE>CONVCASE<\/a>\r\n      <a href=#LDAMPONLY>DAMPONLY<\/a>\r\n      <a href=#LDAPERT>DAPERT<\/a>\r\n      <a href=#LDIFFRES>DIFFRES<\/a>\r\n      <a href=#LECHO>ECHO<\/a>\r\n      <a href=#LEMIOUT>EMIOUT<\/a>\r\n      <a href=#LFFSPRMPT>FFSPRMPT<\/a>\r\n      <a href=#LFIXSEED>FIXSEED<\/a>\r\n      <a href=#LFLUC>FLUC<\/a>\r\n      <a href=#LGAUSS>GAUSS<\/a>\r\n      <a href=#LGEOCAL>GEOCAL<\/a>\r\n      <a href=#LGEOFIX>GEOFIX<\/a>\r\n      <a href=#LHALFRES>HALFRES<\/a>\r\n      <a href=#LIDEAL>IDEAL<\/a>\r\n      <a href=#LINS>INS<\/a>\r\n      <a href=#LINTRA>INTRA<\/a>\r\n      <a href=#LINTRES>INTRES<\/a>\r\n      <a href=#LJITTER>JITTER<\/a>\r\n      <a href=#LLOG>LOG<\/a>\r\n      <a href=#LLOSSMAP>LOSSMAP<\/a>\r\n      <a href=#LLWAKE>LWAKE<\/a>\r\n      <a href=#LMOVESEED>MOVESEED<\/a>\r\n      <a href=#LPHOTONS>PHOTONS<\/a>\r\n      <a href=#LPOL>POL<\/a>\r\n      <a href=#LPRSVCASE>PRSVCASE<\/a>\r\n      <a href=#LPSPAC>PSPAC<\/a>\r\n      <a href=#LQUIET>QUIET<\/a>\r\n      <a href=#LRAD>RAD<\/a>\r\n      <a href=#LRADCOD>RADCOD<\/a>\r\n      <a href=#LRADLIGHT>RADLIGHT<\/a>\r\n      <a href=#LRADPOL>RADPOL<\/a>\r\n      <a href=#LRADTAPER>RADTAPER<\/a>\r\n      <a href=#LREAL>REAL<\/a>\r\n      <a href=#LRELW>RELW<\/a>\r\n      <a href=#LRFSW>RFSW<\/a>\r\n      <a href=#LRING>RING<\/a>\r\n      <a href=#LSELFCOD>SELFCOD<\/a>\r\n      <a href=#LSORG>SORG<\/a>\r\n      <a href=#LSPAC>SPAC<\/a>\r\n      <a href=#LSTABLE>STABLE<\/a>\r\n      <a href=#LSUMRES>SUMRES<\/a>\r\n      <a href=#LSUS>SUS<\/a>\r\n      <a href=#LTRPT>TRPT<\/a>\r\n      <a href=#LTWAKE>TWAKE<\/a>\r\n      <a href=#LUNIFORM>UNIFORM<\/a>\r\n      <a href=#LUNIPOL>UNIPOL<\/a>\r\n      <a href=#LUNSTABLE>UNSTABLE<\/a>\r\n      <a href=#LWSPAC>WSPAC<\/a>\r\n   <a href=#Lfunctions>functions<\/a>\r\n      <a href=#LData-Manipulation>Data-Manipulation<\/a>\r\n         <a href=#LFit>Fit<\/a>\r\n         <a href=#LFitEmit>FitEmit<\/a>\r\n         <a href=#LFitGaussian>FitGaussian<\/a>\r\n         <a href=#LNIntegrate>NIntegrate<\/a>\r\n         <a href=#LPolynomialFit>PolynomialFit<\/a>\r\n         <a href=#LSpline>Spline<\/a>\r\n      <a href=#LDownhillSimplex>DownhillSimplex<\/a>\r\n      <a href=#Lfunctional-operations>functional-operations<\/a>\r\n         <a href=#LApply>Apply<\/a>\r\n         <a href=#LCases>Cases<\/a>\r\n         <a href=#LDeleteCases>DeleteCases<\/a>\r\n         <a href=#LDifference>Difference<\/a>\r\n         <a href=#LFixedPoint>FixedPoint<\/a>\r\n         <a href=#LFixedPointList>FixedPointList<\/a>\r\n         <a href=#Llevel-spec>level-spec<\/a>\r\n         <a href=#LMap>Map<\/a>\r\n         <a href=#LMapThread>MapThread<\/a>\r\n         <a href=#LPosition>Position<\/a>\r\n         <a href=#LScan>Scan<\/a>\r\n         <a href=#LScanThread>ScanThread<\/a>\r\n         <a href=#LSelectCases>SelectCases<\/a>\r\n         <a href=#LSwitchCases>SwitchCases<\/a>\r\n         <a href=#LThread>Thread<\/a>\r\n      <a href=#LFFS-dedicated-functions>FFS-dedicated-functions<\/a>\r\n         <a href=#LAccelerateParticles>AccelerateParticles<\/a>\r\n         <a href=#LBeamMatrix>BeamMatrix<\/a>\r\n         <a href=#LDynamicApertureSurvey>DynamicApertureSurvey<\/a>\r\n         <a href=#LElement>Element<\/a>\r\n            <a href=#Lkey-strings:Element>key-strings:Element<\/a>\r\n         <a href=#LEmittance>Emittance<\/a>\r\n         <a href=#LExternalMap>ExternalMap<\/a>\r\n            <a href=#LCompiledMap>CompiledMap<\/a>\r\n         <a href=#LFFS>FFS<\/a>\r\n         <a href=#LFFS$SHOW>FFS$SHOW<\/a>\r\n         <a href=#LFitValue>FitValue<\/a>\r\n         <a href=#LFitWeight>FitWeight<\/a>\r\n         <a href=#LGaussianCoulomb>GaussianCoulomb<\/a>\r\n         <a href=#LGeoBase>GeoBase<\/a>\r\n         <a href=#LLINE>LINE<\/a>\r\n            <a href=#Lkey-strings:LINE>key-strings:LINE<\/a>\r\n         <a href=#LOptimizeOptics>OptimizeOptics<\/a>\r\n         <a href=#LOrbitGeo>OrbitGeo<\/a>\r\n         <a href=#LRadiationField>RadiationField<\/a>\r\n         <a href=#LRadiationSpectrum>RadiationSpectrum<\/a>\r\n         <a href=#LSetElement>SetElement<\/a>\r\n         <a href=#LSurvivedParticles>SurvivedParticles<\/a>\r\n         <a href=#LSymplecticJ>SymplecticJ<\/a>\r\n         <a href=#LSynchroBetaEmittance>SynchroBetaEmittance<\/a>\r\n         <a href=#LTouschekLifetime>TouschekLifetime<\/a>\r\n         <a href=#LTrackParticles>TrackParticles<\/a>\r\n         <a href=#LTwiss>Twiss<\/a>\r\n         <a href=#LVariableRange>VariableRange<\/a>\r\n         <a href=#LVariableWeight>VariableWeight<\/a>\r\n         <a href=#LWakeFunction>WakeFunction<\/a>\r\n      <a href=#LGraphics>Graphics<\/a>\r\n         <a href=#LBeamPlot>BeamPlot<\/a>\r\n         <a href=#LColumnPlot>ColumnPlot<\/a>\r\n         <a href=#LFitPlot>FitPlot<\/a>\r\n         <a href=#LGeometryPlot>GeometryPlot<\/a>\r\n         <a href=#LHistoPlot>HistoPlot<\/a>\r\n         <a href=#LListContourPlot>ListContourPlot<\/a>\r\n         <a href=#LListDensityPlot>ListDensityPlot<\/a>\r\n         <a href=#LListPlot>ListPlot<\/a>\r\n         <a href=#LOpticsPlot>OpticsPlot<\/a>\r\n         <a href=#LPlot>Plot<\/a>\r\n      <a href=#LInput\/Output>Input\/Output<\/a>\r\n         <a href=#L$FORM>$FORM<\/a>\r\n         <a href=#L$Input>$Input<\/a>\r\n         <a href=#L$Output>$Output<\/a>\r\n         <a href=#LClose>Close<\/a>\r\n         <a href=#LOpenAppend>OpenAppend<\/a>\r\n         <a href=#LOpenRead>OpenRead<\/a>\r\n         <a href=#LOpenWrite>OpenWrite<\/a>\r\n         <a href=#LPageWidth>PageWidth<\/a>\r\n         <a href=#LPrint>Print<\/a>\r\n         <a href=#LRead>Read<\/a>\r\n         <a href=#LReadString>ReadString<\/a>\r\n         <a href=#LStandardForm>StandardForm<\/a>\r\n         <a href=#LStringToStream>StringToStream<\/a>\r\n         <a href=#LWrite>Write<\/a>\r\n         <a href=#LWriteString>WriteString<\/a>\r\n      <a href=#LMultiprocessing>Multiprocessing<\/a>\r\n         <a href=#LFork>Fork<\/a>\r\n         <a href=#LOpenShared>OpenShared<\/a>\r\n         <a href=#LShared>Shared<\/a>\r\n         <a href=#LSharedSize>SharedSize<\/a>\r\n      <a href=#LObject-oriented-programing>Object-oriented-programing<\/a>\r\n         <a href=#LClass>Class<\/a>\r\n      <a href=#LRandom-number-functions>Random-number-functions<\/a>\r\n         <a href=#LRandom>Random<\/a>\r\n         <a href=#LGaussRandom>GaussRandom<\/a>\r\n         <a href=#LParabolaRandom>ParabolaRandom<\/a>\r\n         <a href=#LSeedRandom>SeedRandom<\/a>\r\n         <a href=#LListRandom>ListRandom<\/a>\r\n      <a href=#LSystem-interface>System-interface<\/a>\r\n         <a href=#LSystem>System<\/a>\r\n         <a href=#LTemporaryName>TemporaryName<\/a>\r\n      <a href=#LUtilities>Utilities<\/a>\r\n         <a href=#LDateString>DateString<\/a>\r\n         <a href=#LMemoryCheck>MemoryCheck<\/a>\r\n         <a href=#LTimeUsed>TimeUsed<\/a>\r\n         <a href=#LTiming>Timing<\/a>\r\n         <a href=#LTracePrint>TracePrint<\/a>\r\n   <a href=#LFIT>FIT<\/a>\r\n   <a href=#LFITPOINTS(FITP)>FITPOINTS(FITP)<\/a>\r\n   <a href=#LFIX>FIX<\/a>\r\n   <a href=#LFREE>FREE<\/a>\r\n      <a href=#Ldefault-keyword>default-keyword<\/a>\r\n   <a href=#Lgeometric-functions>geometric-functions<\/a>\r\n   <a href=#LGO>GO<\/a>\r\n   <a href=#LIF>IF<\/a>\r\n   <a href=#LINPUT(IN)>INPUT(IN)<\/a>\r\n   <a href=#Lmachine-error-commands>machine-error-commands<\/a>\r\n   <a href=#Lmatching-function-commands>matching-function-commands<\/a>\r\n   <a href=#Lmulti-turn-tracking>multi-turn-tracking<\/a>\r\n   <a href=#LMATRIX(MAT)>MATRIX(MAT)<\/a>\r\n   <a href=#LMEASURE(MEA)>MEASURE(MEA)<\/a>\r\n   <a href=#Loff-momentum-matching>off-momentum-matching<\/a>\r\n   <a href=#Loptical-functions>optical-functions<\/a>\r\n   <a href=#LORG>ORG<\/a>\r\n   <a href=#LOUTPUT(OUT)>OUTPUT(OUT)<\/a>\r\n   <a href=#Lpattern>pattern<\/a>\r\n      <a href=#LMatchQ>MatchQ<\/a>\r\n   <a href=#Lphysical-constants>physical-constants<\/a>\r\n   <a href=#LPRINT(PRI)>PRINT(PRI)<\/a>\r\n   <a href=#LQUIT>QUIT<\/a>\r\n   <a href=#LRADINT>RADINT<\/a>\r\n   <a href=#LREAD>READ<\/a>\r\n   <a href=#LRECOVER(REC)>RECOVER(REC)<\/a>\r\n   <a href=#LREFERENCE(REF)>REFERENCE(REF)<\/a>\r\n      <a href=#Lreference-optics>reference-optics<\/a>\r\n   <a href=#LREJECT(REJ)>REJECT(REJ)<\/a>\r\n   <a href=#LRENUMBER(RENUM)>RENUMBER(RENUM)<\/a>\r\n   <a href=#LREPEAT(REP)>REPEAT(REP)<\/a>\r\n   <a href=#LRESET>RESET<\/a>\r\n   <a href=#LRESUME(RES)>RESUME(RES)<\/a>\r\n   <a href=#LREVERSE(REV)>REVERSE(REV)<\/a>\r\n   <a href=#Lset-value-of-element>set-value-of-element<\/a>\r\n      <a href=#Lkeywords>keywords<\/a>\r\n      <a href=#Ldefault-keyword>default-keyword<\/a>\r\n   <a href=#Lspecial-variables>special-variables<\/a>\r\n      <a href=#L$Line>$Line<\/a>\r\n      <a href=#LCASE>CASE<\/a>\r\n      <a href=#LCHARGE>CHARGE<\/a>\r\n      <a href=#LCONVERGENCE>CONVERGENCE<\/a>\r\n      <a href=#LDAPWIDTH>DAPWIDTH<\/a>\r\n      <a href=#LDP>DP<\/a>\r\n      <a href=#LDP0>DP0<\/a>\r\n      <a href=#LDTSYNCH>DTSYNCH<\/a>\r\n      <a href=#LEFFRFFREQ>EFFRFFREQ<\/a>\r\n      <a href=#LEFFVC>EFFVC<\/a>\r\n      <a href=#LEFFVCRATIO>EFFVCRATIO<\/a>\r\n      <a href=#LElementValues>ElementValues<\/a>\r\n      <a href=#LEMITX>EMITX<\/a>\r\n      <a href=#LEMITXE>EMITXE<\/a>\r\n      <a href=#LEMITY>EMITY<\/a>\r\n      <a href=#LEMITYE>EMITYE<\/a>\r\n      <a href=#LEMITZ>EMITZ<\/a>\r\n      <a href=#LEMITZE>EMITZE<\/a>\r\n      <a href=#LExponentOfResidual>ExponentOfResidual<\/a>\r\n      <a href=#LFFS$NumericalDerivative>FFS$NumericalDerivative<\/a>\r\n      <a href=#LFitFunction>FitFunction<\/a>\r\n      <a href=#LFSHIFT>FSHIFT<\/a>\r\n      <a href=#LGCUT>GCUT<\/a>\r\n      <a href=#LInitialOrbits>InitialOrbits<\/a>\r\n      <a href=#LLOSSAMPL>LOSSAMPL<\/a>\r\n      <a href=#LLOSSDZ>LOSSDZ<\/a>\r\n      <a href=#LMatchingAmplitude>MatchingAmplitude<\/a>\r\n      <a href=#LMatchingResidual>MatchingResidual<\/a>\r\n      <a href=#LMASS>MASS<\/a>\r\n      <a href=#LMINCOUP>MINCOUP<\/a>\r\n      <a href=#LMOMENTUM>MOMENTUM<\/a>\r\n      <a href=#LNBUNCH>NBUNCH<\/a>\r\n      <a href=#LNetResidual>NetResidual<\/a>\r\n      <a href=#LNP>NP<\/a>\r\n      <a href=#LNPARA>NPARA<\/a>\r\n      <a href=#LOffMomentumWeight>OffMomentumWeight<\/a>\r\n      <a href=#LOMEGA0>OMEGA0<\/a>\r\n      <a href=#LOpticsEpilog>OpticsEpilog<\/a>\r\n      <a href=#LOpticsProlog>OpticsProlog<\/a>\r\n      <a href=#LPBUNCH>PBUNCH<\/a>\r\n      <a href=#LPhotonList>PhotonList<\/a>\r\n      <a href=#LPHICAV>PHICAV<\/a>\r\n      <a href=#LSIGE>SIGE<\/a>\r\n      <a href=#LSIGZ>SIGZ<\/a>\r\n      <a href=#LSpeedOfLight>SpeedOfLight<\/a>\r\n      <a href=#LStabilityLevel>StabilityLevel<\/a>\r\n      <a href=#LTITLE>TITLE<\/a>\r\n   <a href=#LSAVE>SAVE<\/a>\r\n   <a href=#LSEED>SEED<\/a>\r\n   <a href=#LSHOW>SHOW<\/a>\r\n   <a href=#LSPLIT>SPLIT<\/a>\r\n   <a href=#LSTATUS(STAT)>STATUS(STAT)<\/a>\r\n   <a href=#LSTOP>STOP<\/a>\r\n   <a href=#LSUSPEND(SUSP)>SUSPEND(SUSP)<\/a>\r\n   <a href=#LTERMINATE(TERM)>TERMINATE(TERM)<\/a>\r\n   <a href=#LTYPE(T)>TYPE(T)<\/a>\r\n   <a href=#LUNTIL>UNTIL<\/a>\r\n   <a href=#LUSE>USE<\/a>\r\n   <a href=#LVARIABLES(VAR)>VARIABLES(VAR)<\/a>\r\n   <a href=#LVARY>VARY<\/a>\r\n   <a href=#LVISIT>VISIT<\/a>\r\n   <a href=#Lwildcards>wildcards<\/a>\r\n<\/pre>\n<hr>\n<h3><a name=L > <\/a><\/h3>\n<pre><\/pre>\n<h3><a name=LABORT>ABORT<\/a><\/h3>\n<pre>Terminates SAD immediately.<\/pre>\n<pre>See also:\r\n <a href=#LSTOP>STOP<\/a> <a href=#LQUIT>QUIT<\/a> <a href=#LSAVE>SAVE<\/a> <a href=#LUSE>USE<\/a> <a href=#LVISIT>VISIT<\/a> <a href=#LBYE>BYE<\/a><\/pre>\n<h3><a name=LAPPEND(APP)>APPEND(APP)<\/a><\/h3>\n<pre>APP {filename | file-number} switches the output stream to the specified file or the file number.\r\nThe output is appended to the existing file.<\/pre>\n<pre>See also:\r\n <a href=#LTERMINATE(TERM)>TERMINATE(TERM)<\/a> <a href=#LCLOSE(CLO)>CLOSE(CLO)<\/a> <a href=#LINPUT(IN)>INPUT(IN)<\/a> <a href=#LREAD>READ<\/a> <a href=#LOUTPUT(OUT)>OUTPUT(OUT)<\/a>\r\n <a href=#LEND>END<\/a><\/pre>\n<h3><a name=LATTRIBUTE(ATTR)>ATTRIBUTE(ATTR)<\/a><\/h3>\n<pre>Usage: ATTR element-pattern\r\n\r\nprints out the current value, minimum and maximum values, COUPLEd element and its coefficient for\r\nelements which match the element-pattern.<\/pre>\n<pre>See also:\r\n <a href=#LCOUPLE(COUP)>COUPLE(COUP)<\/a> <a href=#Lset-value-of-element>set-value-of-element<\/a> <a href=#Lwildcards>wildcards<\/a><\/pre>\n<h3><a name=Lbeam-line>beam-line<\/a><\/h3>\n<pre> A beam line is defined in the MAIN level by LINE command as:\r\n\r\n   LINE a = ( [n1*][-]l1 [ [n2*]l2 ...] ) [b = ( ... )];\r\n\r\nwhere l1, l2 are either an element or a line. n1, n2 are positive integers to repeat the same element.\r\nAn optional negative sign in fromt of element means the negative orientation of the element of the\r\nline. A negative orientation of a line is inherited by its elements.\r\n The first element of a beam line must be a MARK element, if it is used by FFS, USE, VISIT.\r\n Please do not confuse the LINE command in the MAIN level with the LINE function in FFS.\r\n A beam line can be accessed within FFS via beam-line-functions as shown below.<\/pre>\n<pre>See also:\r\n <a href=#Lelements>elements<\/a> <a href=#Lorientation-of-an-element>orientation-of-an-element<\/a> <a href=#LUSE>USE<\/a> <a href=#LVISIT>VISIT<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=Lbeam-line-functions>beam-line-functions<\/a><\/h3>\n<pre>Functions\/objects to construct\/edit beam lines and elements in FFS.<\/pre>\n<ul>\n<li>\n<h3><a name=LBeamLine>BeamLine<\/a><\/h3>\n<pre>Usage: BeamLine[e1, e2, ...];\r\n\r\nwhere e1, e2 has a form of\r\n\r\n   [ - ][ n* ] x ,\r\n\r\nwith x being one of\r\n\r\n1) a name (either a symbol or a character string) of an element defined in MAIN.\r\n2) a name (either a symbol or a character string) of a LINE defined in MAIN.\r\n3) a BeamLine object.\r\n\r\nAn optional negative sign specifies the direction and a number n the repetition number in the same\r\nway as MAIN. A BeamLine object is automatically expanded to the lowest level whenever it is evaluated.\r\nEditing of BeamLine can be done using any List-handling functions such as Join, Insert, Delete, etc.\r\nof FFS.\r\n\r\n A BeamLine object can be used for FFS calculation when it is used as the\r\nargument of USE or VISIT commands:\r\n\r\nExamples:\r\n1) USE BeamLine[IP,QF,QD]\r\n2) aaa=ExtractBeamLine[];\r\n   USE Join[aaa,-aaa]\r\n\r\n In these cases the new beam line becomes a new LINE in the MAIN level, with a name which is created\r\nautomatically.<\/pre>\n<pre>See also:\r\n <a href=#LExtractBeamLine>ExtractBeamLine<\/a> <a href=#LPrintBeamLine>PrintBeamLine<\/a> <a href=#LWriteBeamLine>WriteBeamLine<\/a> <a href=#Lorientation-of-an-element>orientation-of-an-element<\/a>\r\n <a href=#LUSE>USE<\/a> <a href=#LVISIT>VISIT<\/a><\/pre>\n<li>\n<h3><a name=LBeamLineName>BeamLineName<\/a><\/h3>\n<pre>BeamLineName[] returns the name of the current beam line. If a BeamLine object is used by USE or\r\nVISIT, the new beam line becomes a new LINE in the MAIN level, with a name which is created automatically.<\/pre>\n<li>\n<h3><a name=LExtractBeamLine>ExtractBeamLine<\/a><\/h3>\n<pre>Usage: ExtractBeamLine[line]\r\n\r\nreturns a BeamLine object which represents the expanded form of line which has been defined in MAIN.\r\nIf line is omitted, the current line is assumed.<\/pre>\n<pre>See also:\r\n <a href=#LBeamLine>BeamLine<\/a> <a href=#LPrintBeamLine>PrintBeamLine<\/a> <a href=#LWriteBeamLine>WriteBeamLine<\/a> <a href=#LUSE>USE<\/a> <a href=#LVISIT>VISIT<\/a><\/pre>\n<li>\n<h3><a name=LPrintBeamLine>PrintBeamLine<\/a><\/h3>\n<pre>Usage: PrintBeamLine[b1,.. ,option]\r\n\r\nwrites the BeamLine b1,.. to stdout. If b1.. is omitted the current beam line is assumed. If Format->\"MAIN\"\r\nis given, it writes in the MAIN-input format. If Name->{name1,..} is given, names of BeamLines are\r\nalso written. The number of Name must be not smaller than number of BeamLines.<\/pre>\n<pre>See also:\r\n <a href=#LBeamLine>BeamLine<\/a> <a href=#LExtractBeamLine>ExtractBeamLine<\/a> <a href=#LWriteBeamLine>WriteBeamLine<\/a> <a href=#LUSE>USE<\/a> <a href=#LVISIT>VISIT<\/a><\/pre>\n<li>\n<h3><a name=LWriteBeamLine>WriteBeamLine<\/a><\/h3>\n<pre>Usage: WriteBeamLine[f, b1,.. ,option]\r\n\r\nwrites the BeamLine b1,.. to file f. If b1.. is omitted the current beam line is assumed. If Format->\"MAIN\"\r\nis given, it writes in the MAIN-input format. If Name->{name1,..} is given, names of BeamLines are\r\nalso written. The number of Name must be not smaller than number of BeamLines.<\/pre>\n<pre>See also:\r\n <a href=#LBeamLine>BeamLine<\/a> <a href=#LExtractBeamLine>ExtractBeamLine<\/a> <a href=#LPrintBeamLine>PrintBeamLine<\/a> <a href=#LUSE>USE<\/a> <a href=#LVISIT>VISIT<\/a><\/pre>\n<\/ul>\n<li>\n<h3><a name=Lorientation-of-an-element>orientation-of-an-element<\/a><\/h3>\n<pre> An element with negative orientation means a reversal of the element along the z-axis. Thus all\r\nmagnets except for a solenoid does not change the polarity. A solenoid changes the polarity. An RF\r\ncavity should change, however, it does not in the current implementation. The edge angles and fringe\r\nparameters of the entrance and the exit swap.\r\n AX, AY, AZ, EPX, EPY, ZPX, ZPY, R2, R3 of a MARK element are reversed.\r\n The orientation is printed out by DISP. It can be accessed by LINE[\"DIR\"] . <\/pre>\n<pre>See also:\r\n <a href=#Lbeam-line>beam-line<\/a> <a href=#LBeamLine>BeamLine<\/a> <a href=#LLINE>LINE<\/a><\/pre>\n<\/ul>\n<h3><a name=LBEAMSIZE(BEAM)>BEAMSIZE(BEAM)<\/a><\/h3>\n<pre>Calculate the beam size with the current Twiss parameters. The calculation is in 5D and not correct\r\nif the synchrotron motion is significant. Use EMITTANCE(EMIT) with CODPLOT for a 6D calculation.<\/pre>\n<pre>See also:\r\n <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a> <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LCODPLOT>CODPLOT<\/a><\/pre>\n<h3><a name=LBYE>BYE<\/a><\/h3>\n<pre>Exits from the current beam line and returns to the original beam line where VISIT command was issued.\r\nAll information specific to the beam line, such as matching conditions are restored.\r\n   Note that BYE does neither SAVE the values of elements of the leaving beam line, nor RESET the\r\nvalues of elements of the returning beam line.<\/pre>\n<pre>See also:\r\n <a href=#LVISIT>VISIT<\/a> <a href=#LUSE>USE<\/a> <a href=#LSAVE>SAVE<\/a> <a href=#LRESET>RESET<\/a> <a href=#LSTOP>STOP<\/a> <a href=#LQUIT>QUIT<\/a> <a href=#LABORT>ABORT<\/a><\/pre>\n<h3><a name=Lcharacter-string>character-string<\/a><\/h3>\n<pre> A character-string is expressed by enclosing in \"\". Special characters are expressed using \\:\r\n\r\n\\n     new line\r\n\\r     carriage return\r\n\\t     tab\r\n\\\"     double quote\r\n\\\\     backslash\r\n\\nnn   a character whose octal code is nnn.\r\n\r\n If a character-string is written over multiple lines, \\ must be placed at the end of each line.\r\n The length of a character-string is limited to 2^31-1.<\/pre>\n<ul>\n<li>\n<h3><a name=LFromCharacterCode>FromCharacterCode<\/a><\/h3>\n<pre> FromCharacterCode[r_Real] returns a character whose character code is r.\r\n FromCharacterCode[l_List] returns a character-string whose character codes are l.<\/pre>\n<pre>See also:\r\n <a href=#LToCharacterCode>ToCharacterCode<\/a><\/pre>\n<li>\n<h3><a name=LStringFill>StringFill<\/a><\/h3>\n<pre> StringFill[s, sf, n]  with strings s and sf, n > 0, returns (s\/\/sf\/\/sf...)[1,n] .\r\n StringFill[s, sf, -n] with strings s and sf, n > 0, returns (...sf\/\/sf\/\/s)[-n,-1] .<\/pre>\n<pre>See also:\r\n <a href=#LStringJoin>StringJoin<\/a> <a href=#LStringJoin (\/\/)>StringJoin (\/\/)<\/a> <a href=#LStringPart>StringPart<\/a><\/pre>\n<li>\n<h3><a name=LStringJoin>StringJoin<\/a><\/h3>\n<pre> StringJoin[s1, s2, [,s3...]] ===> s1 \/\/ s2 [\/\/s3...] concatenates strings s1, s2 [,s3...].<\/pre>\n<pre>See also:\r\n <a href=#LStringJoin (\/\/)>StringJoin (\/\/)<\/a><\/pre>\n<li>\n<h3><a name=LStringLength>StringLength<\/a><\/h3>\n<pre> StringLength[s] returns the length of string s.<\/pre>\n<li>\n<h3><a name=LStringMatchQ>StringMatchQ<\/a><\/h3>\n<pre> StringMatchQ[s, spat] returns True\/False whether string s matches string-patten spat.<\/pre>\n<pre>See also:\r\n <a href=#Lwildcards>wildcards<\/a><\/pre>\n<li>\n<h3><a name=LStringPart>StringPart<\/a><\/h3>\n<pre> s_String[n]      returns the n-th character in s.\r\n s_String[n1, n2] returns the substring from n1-th through n2-th characters of s.\r\n\r\n If n1, n2 are negative, they count from the end of the string.<\/pre>\n<li>\n<h3><a name=LStringPosition>StringPosition<\/a><\/h3>\n<pre> StringPosition[s, subs] returns a list of positions of subs in string s.\r\n StringPosition[s, subs, n] returns a list of first n positions of subs in string s.\r\n\r\nExample: StringPosition[\"abcbcbcbcb\",\"bcb\"] returns {{2,4},{4,6},{6,8},{8,10}}.<\/pre>\n<li>\n<h3><a name=LStringReplace>StringReplace<\/a><\/h3>\n<pre> StringReplace[s, rules] replaces the parts of string s accoding to rules, which is a Rule or a list\r\nof Rules:\r\n\r\n   StringReplace[\"abcbcbcbc\",\"bcb\"->\"xyx\"] ===> \"axyxcxyxc\"\r\n   StringReplace[\"abcbcbcbc\",{\"bcb\"->\"xy\",\"cbc\"->\"pqrs\"}] ===> \"axypqrsbc\" .<\/pre>\n<li>\n<h3><a name=LStringTrim>StringTrim<\/a><\/h3>\n<pre> StringTrim[s] removes the leading and trailing spaces and tabs from s.<\/pre>\n<li>\n<h3><a name=LSymbol>Symbol<\/a><\/h3>\n<pre> Symbol[s] returns a Symbol whose name is character-string s.<\/pre>\n<li>\n<h3><a name=LToCharacterCode>ToCharacterCode<\/a><\/h3>\n<pre> ToCharacterCode[s] returns the list of character codes of character-string s.<\/pre>\n<pre>See also:\r\n <a href=#LFromCharacterCode>FromCharacterCode<\/a><\/pre>\n<li>\n<h3><a name=LToExpression>ToExpression<\/a><\/h3>\n<pre> ToExpression[s] converts a character-string s to an expression and evaluate it.<\/pre>\n<pre>See also:\r\n <a href=#LToString>ToString<\/a><\/pre>\n<li>\n<h3><a name=LToString>ToString<\/a><\/h3>\n<pre> ToString[expr] evaluates an expression expr, then converts to a character-string.\r\n ToString[expr, [FormatType ->] form [, form1...]] converts expr using one or more formats form [,form1...].\r\nAvailable formats are:\r\n\r\n                   \r\nInputForm          special characters are quoted with \\.\r\nHoldForm           converts expr without evaluation.\r\nStandardForm       converts with the standard number format and PageWidth.\r\nGenelicSymbolForm  do not display the generation ($nnn) of local symbols for Module.<\/pre>\n<pre>See also:\r\n <a href=#L$FORM>$FORM<\/a> <a href=#LPageWidth>PageWidth<\/a> <a href=#LStandardForm>StandardForm<\/a> Module <a href=#LToExpression>ToExpression<\/a><\/pre>\n<\/ul>\n<h3><a name=Lcommand-syntax>command-syntax<\/a><\/h3>\n<pre>The command syntax in FFS is\r\n\r\n     expression1 [param1..] [;] expression2..\r\n\r\n     \r\n(1)  The input is first evaluated as an expression. If the expression returns a Symbol with the same\r\n     name as the expression itself, it is interpreted as an FFS command, otherwise the returned value\r\n     is printed out unless it is Null.\r\n(2)  Each command takes succeeding its parameters if necessary. A command with indefinite number\r\n     of parameters can be terminated by semicolon. Most commands terminate itself at the end of line.\r\n(3)  A line can be continued to the next line if a backslash is placed at the end of the line.\r\n(4)  An expression continues to the next line if it is not closed in the line.\r\n(5)  An exclamation mark comments out the rest of the line.\r\n\r\nExample: A command line\r\n\r\n          QF* .1\r\n\r\nmeans the set-value-of-element command as unless the symbol QF has been defined otherwise. If QF\r\nhas been defines as a number, such as QF=2.5, the above command line is interpreted as Times[QF,.1]\r\nthen returns .25 .<\/pre>\n<pre>See also:\r\n <a href=#Lexpression>expression<\/a> <a href=#Lfunctions>functions<\/a><\/pre>\n<h3><a name=Lcomponents>components<\/a><\/h3>\n<pre>Components are the objects which consist the beam line. A component simulates an individual magnet,\r\ndrift space, or rf-cavity. The parameters of a component is specified the values in the corresponding\r\nelement with the same name as the component, which simulates a power supply. Many components can\r\nbe attached to the same element. Parameters of each component may deviate from the corresponding\r\nelement if machine errors are given.\r\n   A component is specified with the form name[.order][{+-}offset], where name is the name of the\r\ncomponent. The number order means the order-th component which belongs to name element, counted from\r\nthe beginning of the line starting from 1. Offset is a positive or negative number to specify the\r\ndownstream or upstream components from the given component. If order is omitted, the first element\r\nis assumed, and if offset is omitted, zero is assumed. The order can be renumbererd by RENUMBER(RENUM).\r\n\r\n  The end of line is specified by $$$. The first component can be specified by ^^^.<\/pre>\n<pre>See also:\r\n <a href=#Lelements>elements<\/a> <a href=#LRENUMBER(RENUM)>RENUMBER(RENUM)<\/a><\/pre>\n<h3><a name=Lconstants>constants<\/a><\/h3>\n<pre>There are pre-defined special symbols for constants in FFS:\r\n\r\nsymbol         value\r\nTrue           1\r\nFalse          0\r\nInfinity       INF\r\nINF            INF\r\nNaN            NaN\r\nPi             ArcSin[1]*2\r\nE              Exp[1]\r\nI              Complex[0,1]\r\nDegree         Pi\/180\r\nGoldenRatio    (1+Sqrt[5])\/2\r\nEulerGamma     0.57721566490153286061<\/pre>\n<pre>See also:\r\n <a href=#Lspecial-variables>special-variables<\/a> <a href=#Lphysical-constants>physical-constants<\/a> <a href=#Lflags>flags<\/a> <a href=#Lexpression>expression<\/a>\r\n<\/pre>\n<h3><a name=LCALCULATE(CAL)>CALCULATE(CAL)<\/a><\/h3>\n<pre>Usage: (1) CAL [[NO]EXPAND]]\r\n       (2) CAL matching-function1[-] [matching-function2[-]..]\r\n \r\n(1) With no argument or with an option [NO]EXPAND, calculates the optics and the matching-functions\r\nusing the current values of the components. It prints out the values of the matching-functions specified\r\neither by the matching-function-commands or the second usage of CAL, as described below. If an option\r\nEXPAND is given(default), it expands the beam line before the calculation. If NOEXPAND is given,\r\nit calculates without any expansion.   FFS[\"CAL\"] and FFS[\"GO\"] returns the result as a list, whose\r\nformat is\r\n\r\n   {dp, kind, reslist, function-values},\r\n\r\nwhere\r\n\r\n          \r\ndp:       a list contains dp\/p0 .\r\nkind:     a list of kind of the orbit (usually 0, but 1 to 6 for the finite amplitude matching, see\r\n          MatchingAmplitude).\r\nreslist:  a list of {residual, xstab, ystab}, where\r\n       residual: matching residual,\r\n       xstab:    True when the matrix is stable in X,\r\n       ystab:    True when the matrix is stable in Y, for each orbit.\r\n\r\nAbove are lists with length nf (== number of orbits).\r\n\r\nfunction-values: a list of length nc (== number of calculated items). Each element has the form:\r\n\r\n       {component1, component2, function, list-of-values},\r\n\r\n       where\r\n\r\n       component1, component2: fit locations (see FIT).\r\n       function: name of the function (see matching-function-commands).\r\n       list-of-values: list of the value of the function for each orbit Length nf.\r\n       The central orbit comes at the Floor[(n+1)\/2]-th element.\r\n\r\n(2) With matching-function names, sets the matching-functions at the current fit point to be printed\r\n\r\nout after calculation. If the matching-function is followed by a minus sign, it suppresses the print-out.\r\n\\nExample:\r\nCALC BX BY CAL<\/pre>\n<pre>See also:\r\n <a href=#LGO>GO<\/a> <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a> <a href=#LCOUPLE(COUP)>COUPLE(COUP)<\/a> <a href=#LATTRIBUTE(ATTR)>ATTRIBUTE(ATTR)<\/a> <a href=#LSHOW>SHOW<\/a> <a href=#LFIT>FIT<\/a>\r\n <a href=#Lmatching-function-commands>matching-function-commands<\/a> <a href=#LEXPAND>EXPAND<\/a> <a href=#LCONV>CONV<\/a> <a href=#LCONVERGENCE>CONVERGENCE<\/a> <a href=#LMatchingResidual>MatchingResidual<\/a>\r\n <a href=#LFFS>FFS<\/a><\/pre>\n<h3><a name=LCHROMATICITY(CHRO)>CHROMATICITY(CHRO)<\/a><\/h3>\n<pre>CHRO prints out the chromaticity of QUAD and SEXT in the entire beam line using the simplest formula:\r\n\r\n\r\n    xi_{x,y}=Integrate[-(K1\/L) beta_{x,y}(s) ds] for QUAD,\r\n     xi_{x,y}=Integrate[-(K2\/L) eta_x (s) beta_{x,y}(s) ds] for SEXT.\r\n\r\nThese formula are not valid when there is x-y coupling or vertical dispersion.<\/pre>\n<h3><a name=LCLOSE(CLO)>CLOSE(CLO)<\/a><\/h3>\n<pre>   CLOSE [INPUT(IN)] closes the current input stream and switches it to the previous input stream.\r\n\r\n  CLOSE OUTPUT(OUT) suspends the current output and switches it to the previous output stream.<\/pre>\n<pre>See also:\r\n <a href=#LTERMINATE(TERM)>TERMINATE(TERM)<\/a> <a href=#LINPUT(IN)>INPUT(IN)<\/a> <a href=#LREAD>READ<\/a> <a href=#LOUTPUT(OUT)>OUTPUT(OUT)<\/a> <a href=#LAPPEND(APP)>APPEND(APP)<\/a>\r\n <a href=#LEND>END<\/a><\/pre>\n<h3><a name=LCOUPLE(COUP)>COUPLE(COUP)<\/a><\/h3>\n<pre>   Usage: COUP slave-element master-element coefficient\r\n\r\nsets the value of the default-keyword of slave-element to be equal to coefficient times the value\r\nof the default-keyword of master-element. COUPLE(COUP) cannot be cascaded. The master-element cannot\r\nbe COUPLEd to any other element. To reset COUPLE, say COUP slave-element slave-element 1.\r\n Consider ElementValues to define universal coupling for any keywords.<\/pre>\n<pre>See also:\r\n <a href=#LATTRIBUTE(ATTR)>ATTRIBUTE(ATTR)<\/a> <a href=#LFREE>FREE<\/a> <a href=#LElementValues>ElementValues<\/a><\/pre>\n<h3><a name=Ldata-structure>data-structure<\/a><\/h3>\n<pre>All data and \"programs\" in SAD Script are expressed either by an atom or a list-structure:\r\n\r\n   head[body1 [,body2...]]\r\n\r\nwhere head and body1... are atom or list-structure. Defined atoms are:\r\n\r\n\r\nReal     a real number\r\nSymbol   a symbol\r\nString   a character-string\r\nPattern  a pattern structure for argument matching\r\n\r\nCurrently the lengths of a list-structure, a character-string, and the name of a symbol are limited\r\nto 2^31-1. A real number has an accuracy of 8 bytes.<\/pre>\n<pre>See also:\r\n <a href=#Lcharacter-string>character-string<\/a> <a href=#Lpattern>pattern<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=LExtract>Extract<\/a><\/h3>\n<pre>   Extract[f, part [,head]]\r\n\r\ntakes elements specified by part, which is a list of indices or Null. Optional head is applied at\r\neach element before evaluation.\r\n\r\nExample: Extract[{a,b,c,d,e},{3}]       returns c\r\n         Extract[{a,b,c,d,e},{3,4}]     is an error\r\n         Extract[{a,b,c,d,e},{{3},{4}}] returns {c,d}\r\n         Extract[Hold[{a,b,c,d,e}],{1,3}, Hold] returns Hold[c]<\/pre>\n<pre>See also:\r\n <a href=#LPart>Part<\/a><\/pre>\n<li>\n<h3><a name=LHead>Head<\/a><\/h3>\n<pre>Head[f] takes the head of an expression f.<\/pre>\n<li>\n<h3><a name=LLength>Length<\/a><\/h3>\n<pre> Length[f] returns the number of elements in the body of a structure f.<\/pre>\n<li>\n<h3><a name=LList>List<\/a><\/h3>\n<pre> List is a special symbol to be the head of generic list-structure.\r\n List[a, b, c, ...] is represented as {a, b, c, ...}.\r\n A list is also used to represent a mathematical vector and matrices.\r\n Most of mathematical functions are operated at each element of a list.<\/pre>\n<li>\n<h3><a name=LPart>Part<\/a><\/h3>\n<pre>  Part[f, a [,b ,...]] ===> f[[a, [,b ...]]]\r\n\r\ntakes the a-th element of structure f. f[[a, b]] is equivalent to f[[a]][[b]].\r\n If a is zero, it takes the head of f.\r\n if a is negative, f[[a]] os equivalent to f[[Length[f] + 1 + a]].\r\n If a is a list of Reals {a1, a2, ...}, f[[a]] returns {f[[a1]], f[[a2]], ...}.\r\n If a is Null, f[[,b]] is returns {f[[1,a]], ..., f[[Length[f], b]]}.<\/pre>\n<pre>See also:\r\n <a href=#LLength>Length<\/a> <a href=#LHead>Head<\/a> <a href=#LExtract>Extract<\/a><\/pre>\n<\/ul>\n<h3><a name=Ldefining-functions>defining-functions<\/a><\/h3>\n<pre> A function is defined by one of the following forms:\r\n\r\nf[pat1 [,pat2...]] (:)= body;\r\nf[pat1 [,pat2...]] ^(:)= body;\r\ng\/:f[pat1 [,pat2...]] (:)= body;\r\n\r\nwhere pat1 [,pat2...] are patterns (including expressions).\r\n If UpSet(^=) or UpSetDelayed (^:=) is used, the definition is associated with the symbol in the\r\nfirst level of l.h.s.\r\n If TagSet(\/:) is used, the definition is associated with the symbol on the left of \/: .\r\n\r\n The patters can be an expression including constants. The definition with constant arguments can\r\nbe accessed faster than searching a list, in general, so they are suitable for a data base. Definitions\r\nwith constant arguments have higher priorities than with patterns.<\/pre>\n<pre>See also:\r\n UpSet UpSetDelayed <a href=#LTagSet(\/:)>TagSet(\/:)<\/a> <a href=#Lpattern>pattern<\/a><\/pre>\n<h3><a name=Ldynamics>dynamics<\/a><\/h3>\n<pre><\/pre>\n<ul>\n<li>\n<h3><a name=Lindependent-variable>independent-variable<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_1.svg\" \/><\/pre>\n<pre>See also:\r\n <a href=#LLagrangean>Lagrangean<\/a> <a href=#LHamiltonian>Hamiltonian<\/a><\/pre>\n<li>\n<h3><a name=LLagrangean>Lagrangean<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_2.svg\" \/><\/pre>\n<pre>See also:\r\n <a href=#LHamiltonian>Hamiltonian<\/a> <a href=#Lindependent-variable>independent-variable<\/a><\/pre>\n<li>\n<h3><a name=LHamiltonian>Hamiltonian<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_6.svg\" \/><\/pre>\n<pre>See also:\r\n <a href=#LLagrangean>Lagrangean<\/a> <a href=#Lindependent-variable>independent-variable<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=L2nd-order-Hamiltonian>2nd-order-Hamiltonian<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_18.svg\" \/><\/pre>\n<pre>See also:\r\n <a href=#LHamiltonian>Hamiltonian<\/a> <a href=#Lremarks-on-dynamics>remarks-on-dynamics<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=Lsolution-H2>solution-H2<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_20.svg\" \/><\/pre>\n<pre>See also:\r\n <a href=#Lsolution-dH>solution-dH<\/a><\/pre>\n<li>\n<h3><a name=Lsolution-dH>solution-dH<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_47.svg\" \/><\/pre>\n<pre>See also:\r\n <a href=#Lsolution-H2>solution-H2<\/a><\/pre>\n<\/ul>\n<\/ul>\n<li>\n<h3><a name=Lremarks-on-dynamics>remarks-on-dynamics<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_59.svg\" \/><\/pre>\n<pre>See also:\r\n <a href=#LHamiltonian>Hamiltonian<\/a> <a href=#L2nd-order-Hamiltonian>2nd-order-Hamiltonian<\/a><\/pre>\n<li>\n<h3><a name=Lx-y-coupling>x-y-coupling<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_60.svg\" \/><\/pre>\n<pre>See also:\r\n <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a> <a href=#Loptical-functions>optical-functions<\/a> <a href=#Lmatching-function-commands>matching-function-commands<\/a>\r\n<\/pre>\n<li>\n<h3><a name=Lextended-Twiss-parameters>extended-Twiss-parameters<\/a><\/h3>\n<pre>A symplectic matrix such as the normal mode matrix can be expressed in terms of the extended Twiss\r\nparameters. In 6 by 6 case, those are\r\n\r\n   AX  BX          ZX  EX\r\n     PSIX         ZPX EPX\r\n   R1  R2  AY  BY  ZY  EY\r\n   R3  R4    PSIY ZPY EPY\r\n                   AZ  BZ\r\n                     PSIZ .\r\n\r\nA(X,Y,Z), B(X,Y,Z) are alphas and betas in the usual sense, after a diagonalization to 2 by 2 submatrices.\r\nPSI(X,Y,Z) are the rotation angle to set one the coordinate to parallel to the (X,Y,Z) axes. R(1,2,3,4)\r\nare the components of the x-y coupling matrix (see x-y-coupling). E(X,PX,Y,PY) are \"dispersions\"\r\nwhich decouples synchro-beta coupling terms together with Z(X,PX,Y,PY). Those parameters should agree\r\nwith what FFS calculates in the case of no synchro-beta couplings.<\/pre>\n<pre>See also:\r\n <a href=#Lx-y-coupling>x-y-coupling<\/a> <a href=#Loptical-functions>optical-functions<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=Ldefinitions>definitions<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_68.svg\" \/><\/pre>\n<\/ul>\n<li>\n<h3><a name=Lsynchrotron-radiation>synchrotron-radiation<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_81.svg\" \/><\/pre>\n<pre>See also:\r\n <a href=#LRAD>RAD<\/a> <a href=#LRADCOD>RADCOD<\/a> <a href=#LHamiltonian>Hamiltonian<\/a> <a href=#LBEND>BEND<\/a> <a href=#LF1>F1<\/a><\/pre>\n<li>\n<h3><a name=Lequilibrium-beam-envelope>equilibrium-beam-envelope<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_85.svg\" \/><\/pre>\n<pre>See also:\r\n <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LEmittance>Emittance<\/a> <a href=#LINTRA>INTRA<\/a> <a href=#LWSPAC>WSPAC<\/a> <a href=#LMINCOUP>MINCOUP<\/a><\/pre>\n<\/ul>\n<h3><a name=LDISPLAY(DISP)>DISPLAY(DISP)<\/a><\/h3>\n<pre>Usage: DISP_LAY [keywords] [pattern-string] [region]\r\n\r\nDisplays values of various optical-\/geometric-functions at the components given by the pattern-string\r\nin the region (see region) in the current beam line. It has several display modes specified by the\r\nkeywords. As the default, it displays AX, BX, NX, EX, EPX, AY, BY, NY, EY, EPY, LENG, the length\r\nand the value of the default-keyword of the component. Each line refers to the entrance of each component\r\nof the line. The end of the beam line has the name \"$$$\". The first component can be specified by\r\n\"^^^\".\r\n   DISP suspends the output to the terminal at every 66 lines, asking (q_uit, c_ontinue, a_ll)?.\r\nThe further output depends on the first character of the answer from the terminal input. This dialog\r\nis suppressed by specifying ALL.\r\n   DISP does not calculate the functions to be displayed, so CALCULATE(CALC) or GO is necessary whenever\r\nvalues of components are updated.<\/pre>\n<pre>See also:\r\n <a href=#LTYPE(T)>TYPE(T)<\/a> <a href=#Loptical-functions>optical-functions<\/a> <a href=#Lgeometric-functions>geometric-functions<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=LACCELERATION(A)>ACCELERATION(A)<\/a><\/h3>\n<pre>DISP A displays the nominal energy, energy deviation(DDP), longitudinal position(z), and emittances\r\nfor a transport line with accelerating cavities. The flag TRPT must be on.<\/pre>\n<pre>See also:\r\n <a href=#LTRPT>TRPT<\/a> <a href=#LRING>RING<\/a> <a href=#Lelements>elements<\/a> <a href=#LCAVI>CAVI<\/a> <a href=#Lspecial-variables>special-variables<\/a> <a href=#LEMITX>EMITX<\/a> <a href=#LEMITY>EMITY<\/a> <a href=#LDP>DP<\/a>\r\n<\/pre>\n<li>\n<h3><a name=LALL>ALL<\/a><\/h3>\n<pre>ALL is a word to choose the entire beam line for the region to be displayed. If ALL is given, a dialog\r\nat every 66 lines to control the output to the terminal is suppressed. Thus \"DISP ALL e1 e2\" works\r\nto suppress the dialog for the output region e1 from e2.<\/pre>\n<pre>See also:\r\n <a href=#Lregion>region<\/a> <a href=#Lpattern-string>pattern-string<\/a><\/pre>\n<li>\n<h3><a name=LBEAM(B)>BEAM(B)<\/a><\/h3>\n<pre>DISP B displays the beam sizes and the projected Twiss parameters calculated either by Twiss parameters\r\nor the EMIT command with the CODPLOT flag.\r\n\r\nExample: EMITX=...; EMITY=...;DP=...; \r\n         BEAMSIZE(BEAM)\r\n         DISP B<\/pre>\n<pre>See also:\r\n <a href=#LBEAMSIZE(BEAM)>BEAMSIZE(BEAM)<\/a> <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LCODPLOT>CODPLOT<\/a> <a href=#LGAUSS>GAUSS<\/a> <a href=#LUNIFORM>UNIFORM<\/a> <a href=#Lspecial-variables>special-variables<\/a>\r\n <a href=#LEMITX>EMITX<\/a> <a href=#LEMITY>EMITY<\/a> <a href=#LDP>DP<\/a><\/pre>\n<li>\n<h3><a name=LDREFERENCE(DRE)>DREFERENCE(DRE)<\/a><\/h3>\n<pre>Display the difference between the reference optics. (beta - betaR)\/betaR are displayed for BX, BY,\r\nBZ.<\/pre>\n<pre>See also:\r\n <a href=#Lreference-optics>reference-optics<\/a> <a href=#LREFERENCE(REF)>REFERENCE(REF)<\/a> <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a> <a href=#LREFERENCE(RE)>REFERENCE(RE)<\/a>\r\n <a href=#LTwiss>Twiss<\/a> <a href=#LOpticsPlot>OpticsPlot<\/a><\/pre>\n<li>\n<h3><a name=LDUMPOPTICS(D)>DUMPOPTICS(D)<\/a><\/h3>\n<pre>DISP D displays all matching-functions in one line suitable to be read by a spread-sheet program.<\/pre>\n<pre>See also:\r\n <a href=#Loptical-functions>optical-functions<\/a> <a href=#Lgeometric-functions>geometric-functions<\/a> <a href=#Lmatching-function-commands>matching-function-commands<\/a>\r\n<\/pre>\n<li>\n<h3><a name=LGAMMA(GA)>GAMMA(GA)<\/a><\/h3>\n<pre>DISP GA displays gamma functions for x and y, instead of dispersions, as well as gamma*L, which is\r\nnealry equal to the natural chromaticity.<\/pre>\n<li>\n<h3><a name=LGEOMETRY(G)>GEOMETRY(G)<\/a><\/h3>\n<pre>DISP G displays geometric information of the beam line. It shows the geometry of the coordinate.<\/pre>\n<pre>See also:\r\n <a href=#Lgeometric-functions>geometric-functions<\/a> <a href=#Lmatching-function-commands>matching-function-commands<\/a> <a href=#LOGEOMETRY(OG)>OGEOMETRY(OG)<\/a>\r\n<\/pre>\n<li>\n<h3><a name=LOGEOMETRY(OG)>OGEOMETRY(OG)<\/a><\/h3>\n<pre>DISP OG displays geometric information at the orbit.<\/pre>\n<pre>See also:\r\n <a href=#Lgeometric-functions>geometric-functions<\/a> <a href=#Lmatching-function-commands>matching-function-commands<\/a> <a href=#LGEOMETRY(G)>GEOMETRY(G)<\/a>\r\n<\/pre>\n<li>\n<h3><a name=LORBIT(O)>ORBIT(O)<\/a><\/h3>\n<pre>DISP O displays the orbits DX, DPX, DY, DPY together with the other \r\noptical-functions.<\/pre>\n<pre>See also:\r\n <a href=#Loptical-functions>optical-functions<\/a> <a href=#Lmatching-function-commands>matching-function-commands<\/a><\/pre>\n<li>\n<h3><a name=Lpattern-string>pattern-string<\/a><\/h3>\n<pre>The components in the current region can be selectively displayed by the DISP command using the pattern-string.\r\nThe pattern-string is a character string involving the wildcards to match the name of the components.\r\nNote that the components are chosen in the current region, and the keyword ALL is necessary to extend\r\nit to the entire beam line.<\/pre>\n<pre>See also:\r\n <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a> <a href=#Lwildcards>wildcards<\/a> <a href=#Lcomponents>components<\/a> <a href=#Lregion>region<\/a> <a href=#LALL>ALL<\/a><\/pre>\n<li>\n<h3><a name=LPHYSICAL(P)>PHYSICAL(P)<\/a><\/h3>\n<pre>DISP P displays the physical dispersions PEX, PEPX, PEY, PEP, together with the 1D optical parameters.<\/pre>\n<pre>See also:\r\n <a href=#Loptical-functions>optical-functions<\/a> <a href=#Lmatching-function-commands>matching-function-commands<\/a><\/pre>\n<li>\n<h3><a name=Lregion>region<\/a><\/h3>\n<pre>Region for DISPLAY(DISP) is specified as \r\n\r\n        DISP .... begin [end] \r\n\r\nwith begin and end having the form name[.order][{+-}offset], or the component number (see components).\r\n\r\nExample:\r\n  DISP ... QF.2-10 QD+5\r\n           DISP ... 100 200\r\n\r\ndisplays functions starting at 10 elements upstream from the entrance of the second QF through 5\r\nelements downstream from the entrance of the first QD. The region for DISP is kept after once set.\r\nIt is shown in the second part of the prompt when FFSPRMPT is ON, and also seen by the STATUS(STAT)\r\ncommand.\r\n   If begin points to a component after end, DISP displays from begin to $$$, then from ^^^ to end.\r\n\r\n  ALL can be specified before the region. In such a case, the dialog for the output control is suppressed.\r\n\r\n  The components which match the pattern-string in DISP are only chosen in the current region.<\/pre>\n<pre>See also:\r\n <a href=#LALL>ALL<\/a> <a href=#Lpattern-string>pattern-string<\/a> <a href=#Lcomponents>components<\/a> <a href=#LSTATUS(STAT)>STATUS(STAT)<\/a><\/pre>\n<li>\n<h3><a name=LREFERENCE(RE)>REFERENCE(RE)<\/a><\/h3>\n<pre>Specify the reference optics to be displayed.<\/pre>\n<pre>See also:\r\n <a href=#Lreference-optics>reference-optics<\/a> <a href=#LREFERENCE(REF)>REFERENCE(REF)<\/a> <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a> <a href=#LDREFERENCE(DRE)>DREFERENCE(DRE)<\/a>\r\n <a href=#LTwiss>Twiss<\/a> <a href=#LOpticsPlot>OpticsPlot<\/a><\/pre>\n<li>\n<h3><a name=LRMATRIX(R)>RMATRIX(R)<\/a><\/h3>\n<pre>DISP R displays the components of the x-y coupling matrix R together with the 1D optical parameters.\r\nSee x-y-coupling.<\/pre>\n<pre>See also:\r\n <a href=#Lx-y-coupling>x-y-coupling<\/a> <a href=#Loptical-functions>optical-functions<\/a> <a href=#Lmatching-function-commands>matching-function-commands<\/a>\r\n<\/pre>\n<li>\n<h3><a name=LZ>Z<\/a><\/h3>\n<pre>DISP Z displays muatching functions related to the Z plane: AZ BZ NZ DZ DDP ZX ZPX ZY ZPY GMZ , which\r\nare obtained by CAL\/GO with CALC6D.<\/pre>\n<pre>See also:\r\n <a href=#Lextended-Twiss-parameters>extended-Twiss-parameters<\/a> <a href=#LCALC6D>CALC6D<\/a> <a href=#LCALC4D>CALC4D<\/a><\/pre>\n<\/ul>\n<h3><a name=LDRAW>DRAW<\/a><\/h3>\n<pre>Usage: DRAW [begin end] fun1 [fun2..] [& fun11 [fun12..]] [element-pattern]\r\n\r\ndraws a plot of optical functions in multi columns. It calls OpticsPlot internally. Available functions\r\nare all matching-functions (except LENG, TRX, TRY, GX, GY, GZ, CHI1, CHI2, CHI3) and additional functions.\r\nIf functions are separated by ampersand (&), these are plotted in a separated window.\r\n  Function name preceded by \"R\" and \"D\" refer the reference optics and the difference, respectively.\r\n\r\n If begin- and end-components are specified, the plot region is limited between them. If the end-component\r\ncomes earlier than the begin-components, it wraps the plot around the beam line.\r\n  If the optional element-pattern is given, it draws the beam-line lattice with the labels for elements\r\nwhich match element-pattern. If LAT is specified for element-pattern, the lattice is drawn without\r\nlabel.\r\n A character string assigned to TITLE is shown as the FrameLabel on the top of the plot.\r\n\r\n Example:\r\n   TITLE=\"FCCee_t_202_nosol_16_ipac.sad\";\r\n   Draw$Option={Thickness->2};\r\n   DRAW BX BY & EX EY Q*;\r\n\r\n<img decoding=\"async\" src=\"\/SAD\/SADHelp_img\/DRAW.png\" align=\"middle\" width=540>\r\n<\/pre>\n<pre>See also:\r\n <a href=#LOpticsPlot>OpticsPlot<\/a> <a href=#Lspecial-variables>special-variables<\/a> <a href=#LTITLE>TITLE<\/a> <a href=#Lmatching-function-commands>matching-function-commands<\/a>\r\n <a href=#LOUTPUT(OUT)>OUTPUT(OUT)<\/a> <a href=#LTERMINATE(TERM)>TERMINATE(TERM)<\/a> <a href=#LGEO>GEO<\/a> <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a> <a href=#Lwildcards>wildcards<\/a>\r\n<\/pre>\n<ul>\n<li>\n<h3><a name=LDraw$Option>Draw$Option<\/a><\/h3>\n<pre>\r\n Draw$Option is a list of rules to specify Graphics options for the entire DRAW. If you need option\r\nfor each column, use OpticsPlot<\/pre>\n<pre>See also:\r\n <a href=#LDRAW>DRAW<\/a> <a href=#LOpticsPlot>OpticsPlot<\/a> <a href=#LGraphics>Graphics<\/a> <a href=#LREFERENCE(REF)>REFERENCE(REF)<\/a><\/pre>\n<\/ul>\n<h3><a name=LDUMP>DUMP<\/a><\/h3>\n<pre>Usage: DUMP component-pattern [component-pattern1..]\r\n\r\nprints out the current machine errors of components which match component-pattern.<\/pre>\n<pre>See also:\r\n <a href=#Lmachine-error-commands>machine-error-commands<\/a> <a href=#Lcomponents>components<\/a> <a href=#Lwildcards>wildcards<\/a><\/pre>\n<h3><a name=Lelements>elements<\/a><\/h3>\n<pre>An element in FFS represents an object which has a unique name and several keywords with values.\r\nThis simulates a power supply of a magnet. An element has one or more components, which correspond\r\nto individual magnets in a beam line. Each component may have different values from the values of\r\nthe corresponding element. This simulates the machine error which varies magnet to magnet\r\n   The value of an element can be saved to or recovered from the element-save-buffer by SAVE or RESET\r\ncommands. Different beam lines can share the same element, and their values can be different to each\r\nother, but they have the common element-save-buffer. Therefore the value of an element can be transferred\r\nbetween beam lines by SAVE and RESET command through the element-save-buffer.\r\n   An element is created only in SAD MAIN level. In the definition, if a keyword is omitted, the\r\nprevious definition is unchanged. All keywords have the default value zero. In FFS, it is only possible\r\nto change their values.<\/pre>\n<pre>See also:\r\n <a href=#LTYPE(T)>TYPE(T)<\/a> <a href=#Lset-value-of-element>set-value-of-element<\/a> <a href=#LElement>Element<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=LAPERT>APERT<\/a><\/h3>\n<pre>An aperture. Only valid in tracking. A particle with\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_87.svg\" \/>\r\n\r\ncan pass through the aperture, otherwise it is lost and a message is printed out. If AX or AY is\r\nzero (default), they are interpreted as infinity. If AX <=> 0 && AY <=> 0 and (DX1 == DX2 or DY1\r\n== DY2) then the aperture is only determined by AX and AY.<\/pre>\n<li>\n<h3><a name=LBEND>BEND<\/a><\/h3>\n<pre>A bending magnet.<\/pre>\n<ul>\n<li>\n<h3><a name=LAE1>AE1<\/a><\/h3>\n<pre>The absolute face angle at the entrance. The effective face angle is E1 * ANGLE + AE1, and a positive\r\nangle at the entrance corresponds to a surface with dx\/ds > 0.<\/pre>\n<pre>See also:\r\n <a href=#LE1>E1<\/a> <a href=#LAE2>AE2<\/a> <a href=#LANGLE>ANGLE<\/a><\/pre>\n<li>\n<h3><a name=LAE2>AE2<\/a><\/h3>\n<pre>The absolute face-angle at the exit to the bending angle. The effective face angle is E2 * ANGLE\r\n+ AE2, and a positive angle at the exit corresponds to a surface with dx\/ds &lt 0.<\/pre>\n<pre>See also:\r\n <a href=#LE2>E2<\/a> <a href=#LAE1>AE1<\/a> <a href=#LANGLE>ANGLE<\/a><\/pre>\n<li>\n<h3><a name=LANGLE>ANGLE<\/a><\/h3>\n<pre>The bending angle. If positive, it bends the orbit in x-s plane toward negative-x-direction. ANGLE\r\ndetermines the geometry of the beam line, while K0 represents a dipole kick on top of the bending\r\nangle given by ANGLE, i.e., the total deflection of the beam is given of ANGLE + K0.<\/pre>\n<pre>See also:\r\n <a href=#LK0>K0<\/a><\/pre>\n<li>\n<h3><a name=LDISFRIN>DISFRIN<\/a><\/h3>\n<pre>If nonzero, the nonlinear Maxwellian fringe is suppressed.<\/pre>\n<li>\n<h3><a name=LDISRAD>DISRAD<\/a><\/h3>\n<pre>If nonzero, the synchrotron radiation in the particle-tracking is inhibited.<\/pre>\n<pre>See also:\r\n <a href=#LRAD>RAD<\/a><\/pre>\n<li>\n<h3><a name=LDROTATE>DROTATE<\/a><\/h3>\n<pre>Additional rotation in x-y plane to simulate a rotation error. DROTATE does not affect the geometry\r\nof the ring.<\/pre>\n<pre>See also:\r\n <a href=#LDX>DX<\/a> <a href=#LDY>DY<\/a> <a href=#LROTATE>ROTATE<\/a><\/pre>\n<li>\n<h3><a name=LDX>DX<\/a><\/h3>\n<pre>Horizontal displacement of magnet. This applied before the rotation by ROTATE.<\/pre>\n<pre>See also:\r\n <a href=#LDY>DY<\/a> <a href=#LROTATE>ROTATE<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=LDY>DY<\/a><\/h3>\n<pre>Vertical displacement of magnet. This applied before the rotation by ROTATE.<\/pre>\n<pre>See also:\r\n <a href=#LDX>DX<\/a> <a href=#LROTATE>ROTATE<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=LE1>E1<\/a><\/h3>\n<pre>The ratio of the face-angle at the entrance to the bending angle. The effective face angle is E1\r\n* ANGLE + AE1, and a positive angle at the entrance corresponds to a surface with dx\/ds > 0. For\r\nexample, a symmetrically-placed rectangular magnet has\r\n E1 = 0.5 and E2 = 0.5.<\/pre>\n<pre>See also:\r\n <a href=#LAE1>AE1<\/a> <a href=#LE2>E2<\/a> <a href=#LANGLE>ANGLE<\/a><\/pre>\n<li>\n<h3><a name=LE2>E2<\/a><\/h3>\n<pre>The ratio of the face-angle at the exit to the bending angle. The effective face angle is E2 * ANGLE\r\n+ AE2, and a positive angle at the exit corresponds to a surface with dx\/ds &lt 0. For example, a\r\nsymmetrically-placed rectangular magnet has E1 = 0.5 and E2 = 0.5.<\/pre>\n<pre>See also:\r\n <a href=#LAE2>AE2<\/a> <a href=#LE1>E1<\/a> <a href=#LANGLE>ANGLE<\/a><\/pre>\n<li>\n<h3><a name=LF1>F1<\/a><\/h3>\n<pre>Length of the slope of the field at the edge as:\r\n\r\n                By(s) |   *******\r\n                      |  *\r\n                      | *\r\n                      |*\r\n                      *\r\n                     *|\r\n                    * |\r\n                   *  |\r\n        ----*******---+--------- s\r\n                  |       |\r\n                  |<----->|\r\n                  |   F1  |\r\n\r\nOnly the effects up to y^4 in Hamiltonian are taken into account. A more rigorous definition is\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_88.svg\" \/>\r\n\r\nwhere integration is done over one fringe.\r\n\r\n   The transformation of the linear fringe of the entrance of a bend is\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_89.svg\" \/>\r\n\r\nwhere f is the length of fringe given by F1, and rhob bending radius at the design momentum. At the exit, the sign of rhob is chang\r\ned. This linear fringe also changes the path length in the body of the bend as\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_90.svg\" \/>\r\n\r\nto maintain the geometric position of the design orbit, i.e., you have to increase the bend field\r\na little bit to keep the orbit unchanged. Unlike a quadrupole, the effect of linear fringe is always\r\napplied at both the entrance and the exit, otherwise you cannot obtain a circular design orbit.\r\n\r\n   Use FB1 and FB2 to specify the values of entrance and exit separately.<\/pre>\n<pre>See also:\r\n <a href=#LFRINGE>FRINGE<\/a> <a href=#LFB1>FB1<\/a> <a href=#LFB2>FB2<\/a><\/pre>\n<li>\n<h3><a name=LFB1>FB1<\/a><\/h3>\n<pre>   F1 at the entrance. Actually F1 + FB1 is used at the entrance.<\/pre>\n<pre>See also:\r\n <a href=#LF1>F1<\/a> <a href=#LFB2>FB2<\/a><\/pre>\n<li>\n<h3><a name=LFB2>FB2<\/a><\/h3>\n<pre>   F1 at the exit. Actually F1 + FB2 is used at the exit.<\/pre>\n<pre>See also:\r\n <a href=#LF1>F1<\/a> <a href=#LFB1>FB1<\/a><\/pre>\n<li>\n<h3><a name=LFRINGE>FRINGE<\/a><\/h3>\n<pre>When FRINGE is non-zero, the effect of the linear fringe F1 is taken into account both at the entrance and the exit.\r\n   The transformation of the linear fringe of the entrance of a bend is\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_89.svg\" \/>\r\n\r\nwhere f is the length of fringe given by F1, and rhob bending radius at the design momentum. At the exit, the sign of rhob is chang\r\ned. This linear fringe also changes the path length in the body of the bend as\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_90.svg\" \/>\r\n\r\nto maintain the geometric position of the design orbit, i.e., you have to increase the bend field\r\na little bit to keep the orbit unchanged. Unlike a quadrupole, the effect of linear fringe is always\r\napplied at both the entrance and the exit, otherwise you cannot obtain a circular design orbit.\r\n\r\n   Use FB1 and FB2 to specify the values of entrance and exit separately.<\/pre>\n<pre>See also:\r\n <a href=#LF1>F1<\/a><\/pre>\n<li>\n<h3><a name=LK0>K0<\/a><\/h3>\n<pre>The normal dipole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_91.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK1>K1<\/a><\/h3>\n<pre>The normal quadrupole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_92.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LL>L<\/a><\/h3>\n<pre>The effective length along the arc of the orbit.<\/pre>\n<li>\n<h3><a name=LROTATE>ROTATE<\/a><\/h3>\n<pre>Rotation in x-y plane. After displacing the magnet by DX and DY, rotate the magnet around the local\r\ns-axis by -(amount given by ROTATE), then place the component. At the exit rotate back the magnet\r\naround the local s-axis at the exit, then take out displacement.<\/pre>\n<pre>See also:\r\n <a href=#LDX>DX<\/a> <a href=#LDY>DY<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=Ltransformation:BEND>transformation:BEND<\/a><\/h3>\n<pre>The transformation of a bend depends on the value of K1. If K1 is zero, it is a series of transformations:\r\n\r\n    (transformation due to misalignments)\r\n   (drift to the entrance face)\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_93.svg\" \/>\r\n   (linear fringe at entrance face)\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_94.svg\" \/>\r\n   (nonlinear fringe at entrance)\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_95.svg\" \/>\r\n   (body of bend)\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_96.svg\" \/>\r\n   (nonlinear fringe at exit)\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_97.svg\" \/>\r\n   (linear fringe at exit face)\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_98.svg\" \/>\r\n   (drift from the exit face)\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_99.svg\" \/>\r\n   (transformation due to misalignments)\r\n\r\nIf K1 is nonzero, the effects from E1 and E2 are approximated by thin\r\nquadrupoles. Then the body is subdivided into\r\n\r\n   1 + floor(sqrt(abs(K1 L')\/(12 10^-5 EPS)))\r\n\r\npieces (EPS = 1 is used when EPS = 0), and the bend-body transformation above is done for each piece\r\nand the kick from K1 is applied alternatively. In FFS optics and Emittance calculations, or when\r\nthe synchrotron radiation is turned on, the same algorithm as K1 <> 0 is applied.<\/pre>\n<pre>See also:\r\n coordinates <a href=#Lequilibrium-beam-envelope>equilibrium-beam-envelope<\/a><\/pre>\n<\/ul>\n<li>\n<h3><a name=LCAVI>CAVI<\/a><\/h3>\n<pre>Accelerating structure.<\/pre>\n<ul>\n<li>\n<h3><a name=LDISFRIN>DISFRIN<\/a><\/h3>\n<pre>If nonzero, the Maxwellian fringe is suppressed. The effects of DISFRIN and FRINGE are summarized\r\nas\r\n\r\n             DISFRIN=0          DISFRIN<>0\r\nFRINGE=0    entr & exit            none\r\nFRINGE=1       entr                none\r\nFRINGE=2       exit                none\r\nFRINGE=3    entr & exit            none<\/pre>\n<pre>See also:\r\n <a href=#LFRINGE>FRINGE<\/a><\/pre>\n<li>\n<h3><a name=LDPHI>DPHI<\/a><\/h3>\n<pre> Relative phase offset. The stable synchrotron phase above the transition is near PHI = 0. The acceleration is given by \r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_100.svg\" \/>\r\n\r\nwhere ts is the equilibrium time determined by the valance between the acceleration and the radiation\r\nloss around the ring. DPHI is not taken into account to determine the design momentum p0(s).<\/pre>\n<pre>See also:\r\n <a href=#LFREQ>FREQ<\/a> <a href=#LVOLT>VOLT<\/a> <a href=#LDVOLT>DVOLT<\/a> <a href=#LV1>V1<\/a> V20 <a href=#LV11>V11<\/a><\/pre>\n<li>\n<h3><a name=LDVOLT>DVOLT<\/a><\/h3>\n<pre>Additional accelerating voltage to be added to VOLT without affecting the design momentum.<\/pre>\n<pre>See also:\r\n <a href=#LVOLT>VOLT<\/a><\/pre>\n<li>\n<h3><a name=LDX>DX<\/a><\/h3>\n<pre>Horizontal displacement of magnet. This applied before the rotation by ROTATE.<\/pre>\n<pre>See also:\r\n <a href=#LDY>DY<\/a> <a href=#LROTATE>ROTATE<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=LDY>DY<\/a><\/h3>\n<pre>Vertical displacement of magnet. This applied before the rotation by ROTATE.<\/pre>\n<pre>See also:\r\n <a href=#LDX>DX<\/a> <a href=#LROTATE>ROTATE<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=LFREQ>FREQ<\/a><\/h3>\n<pre> Rf frequency. If this keyword is nonzero, the keyword HARM is ignored.\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_100.svg\" \/><\/pre>\n<pre>See also:\r\n <a href=#LHARM>HARM<\/a><\/pre>\n<li>\n<h3><a name=LHARM>HARM<\/a><\/h3>\n<pre> A harmonic number. This is valid only when FREQ is zero.<\/pre>\n<pre>See also:\r\n <a href=#LFREQ>FREQ<\/a><\/pre>\n<li>\n<h3><a name=LL>L<\/a><\/h3>\n<pre>The effective length.<\/pre>\n<li>\n<h3><a name=LPHI>PHI<\/a><\/h3>\n<pre> Relative phase offset. The stable synchrotron phase above the transition is near PHI = 0. The acceleration is given by \r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_100.svg\" \/>\r\n\r\nwhere ts is the equilibrium time determined by the valance between the acceleration and the radiation\r\nloss around the ring.<\/pre>\n<pre>See also:\r\n <a href=#LFREQ>FREQ<\/a> <a href=#LVOLT>VOLT<\/a> <a href=#LDVOLT>DVOLT<\/a> <a href=#LV1>V1<\/a> V20 <a href=#LV11>V11<\/a><\/pre>\n<li>\n<h3><a name=LROTATE>ROTATE<\/a><\/h3>\n<pre>Rotation in x-y plane. After displacing the magnet by DX and DY, rotate the magnet around the local\r\ns-axis by -(amount given by ROTATE), then place the component. At the exit rotate back the magnet\r\naround the local s-axis at the exit, then take out displacement.<\/pre>\n<pre>See also:\r\n <a href=#LDX>DX<\/a> <a href=#LDY>DY<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=LV02>V02<\/a><\/h3>\n<pre> The y^2-dependence of the acceleration. Tracking only.\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_100.svg\" \/><\/pre>\n<pre>See also:\r\n <a href=#LVOLT>VOLT<\/a> <a href=#LDVOLT>DVOLT<\/a> <a href=#LV1>V1<\/a> V20 <a href=#LV11>V11<\/a><\/pre>\n<li>\n<h3><a name=LV1>V1<\/a><\/h3>\n<pre> The linear x-dependence of the acceleration. Tracking only.\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_100.svg\" \/><\/pre>\n<pre>See also:\r\n <a href=#LVOLT>VOLT<\/a> <a href=#LDVOLT>DVOLT<\/a> <a href=#LV1>V1<\/a> <a href=#LV11>V11<\/a> <a href=#LV02>V02<\/a><\/pre>\n<li>\n<h3><a name=LV11>V11<\/a><\/h3>\n<pre> The xy-dependence of the acceleration. Tracking only.\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_100.svg\" \/><\/pre>\n<pre>See also:\r\n <a href=#LVOLT>VOLT<\/a> <a href=#LDVOLT>DVOLT<\/a> <a href=#LV1>V1<\/a> V20 <a href=#LV02>V02<\/a><\/pre>\n<li>\n<h3><a name=LVOLT>VOLT<\/a><\/h3>\n<pre>Accelerating peak voltage in Volt.\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_100.svg\" \/>\r\n\r\nwhere ts is the equilibrium time determined by the valance between the acceleration and the radiation\r\nloss around the ring. (CAVI only) The non-relativistic corrections\r\n\r\n     (VOLT+DVOLT)*(2 Pi FREQ\/c)^2\/(gamma beta)^2\/4 are\r\n\r\nautomatically added to V20 and V02, respectively. The Lorentz factor is evaluated as inverse of average\r\nof 1\/(beta gamma) at the entrance and the exit.\r\n   CAVI includes the edge effect at the lowest order, given by a Hamiltonian at the entrance edge\r\nat s0:\r\n\r\n   Hf = - (e (VOLT+DVOLT)\/L)(Sin(omega t - dphi) + Sin(dphi) - offset) (x^2+y^2)\/4 delta(s-s0)\r\n where dphi and offset are determined by the cavity phase and the radiation loss, which is nonzero\r\nonly in the case of NORAD. The sign flips at the exit. This Hamiltonian should be consistent with\r\nwhat Kiyoshi Kubo derived.<\/pre>\n<pre>See also:\r\n <a href=#LDVOLT>DVOLT<\/a><\/pre>\n<\/ul>\n<li>\n<h3><a name=LCOORD>COORD<\/a><\/h3>\n<pre>An element for an arbitrary coordinate transformation. This element can be used to express an off-axis element.\r\n\r\nUsage: COORD name=(DX=dx DY=dy CHI1=chi1 CHI2=chi2 CHI3=chi3 DIR=dir); .\r\n\r\nIf dir is zero (default), the transformation of the coordinate by COORD is\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_101.svg\" \/>\r\n\r\nand if dir is nonzero,\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_102.svg\" \/>\r\n\r\nwhere {x, y, z}_1 are the new coordinates and\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_103.svg\" \/>\r\n\r\nNote that these transformationis are NOT the inverse to each other.\r\n\r\n   To use this element, you have to calculate the values of those parameters carefully. DISP G may\r\nhelp you but there is no automatic way to get them. You may also have to be careful when you use\r\na line with this element in the reverse direction.\r\n\r\n   A better way to do an equivalent thing in most cases is to use SOL. Unlike COORD, SOL automatically\r\ndetermines the parameters for the coordinate transformation.<\/pre>\n<pre>See also:\r\n <a href=#LSOL>SOL<\/a> <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a><\/pre>\n<li>\n<h3><a name=Ldefault-keyword>default-keyword<\/a><\/h3>\n<pre>The default and available non-default variable keywords are:\r\n\r\ntype    default-keyword  non-default variable keyword\r\nDRIFT   L                -\r\nBEND    ANGLE            K1,K0,E1,E2\r\nQUAD    K1               ROTATE\r\nSEXT    K2               ROTATE\r\nOCT     K3               ROTATE\r\nDECA    K4               ROTATE\r\nDODECA  K5               ROTATE\r\nMULT    K1               K0,K2..K21,SK0,SK1,SK2..SK21,ROTATE,ANGLE\r\nMARK    -                AX,BX,EX,EPX,AY,BY,EY,EPY,R1,R2,R3,R4,DETR,\r\n                         DX,DPX,DY,DPY,DZ,DDP,AZ,BZ,ZX,ZPX,ZY,ZPY<\/pre>\n<pre>See also:\r\n <a href=#Lkeywords>keywords<\/a><\/pre>\n<li>\n<h3><a name=LDECA>DECA<\/a><\/h3>\n<pre>A decapole magnet.<\/pre>\n<ul>\n<li>\n<h3><a name=LDISFRIN>DISFRIN<\/a><\/h3>\n<pre>If nonzero, the nonlinear Maxwellian fringe is suppressed.<\/pre>\n<li>\n<h3><a name=LDISRAD>DISRAD<\/a><\/h3>\n<pre>If nonzero, the synchrotron radiation in the particle-tracking is inhibited.<\/pre>\n<pre>See also:\r\n <a href=#LRAD>RAD<\/a><\/pre>\n<li>\n<h3><a name=LDX>DX<\/a><\/h3>\n<pre>Horizontal displacement of magnet. This applied before the rotation by ROTATE.<\/pre>\n<pre>See also:\r\n <a href=#LDY>DY<\/a> <a href=#LROTATE>ROTATE<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=LDY>DY<\/a><\/h3>\n<pre>Vertical displacement of magnet. This applied before the rotation by ROTATE.<\/pre>\n<pre>See also:\r\n <a href=#LDX>DX<\/a> <a href=#LROTATE>ROTATE<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=LK4>K4<\/a><\/h3>\n<pre>The normal decapole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_104.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LL>L<\/a><\/h3>\n<pre>The effective length.<\/pre>\n<li>\n<h3><a name=LROTATE>ROTATE<\/a><\/h3>\n<pre>Rotation in x-y plane. After displacing the magnet by DX and DY, rotate the magnet around the local\r\ns-axis by -(amount given by ROTATE), then place the component. At the exit rotate back the magnet\r\naround the local s-axis at the exit, then take out displacement.<\/pre>\n<pre>See also:\r\n <a href=#LDX>DX<\/a> <a href=#LDY>DY<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=Ltransformation:THIN>transformation:THIN<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_105.svg\" \/><\/pre>\n<\/ul>\n<li>\n<h3><a name=LDODECA>DODECA<\/a><\/h3>\n<pre>A dodecapole magnet.<\/pre>\n<ul>\n<li>\n<h3><a name=LDISFRIN>DISFRIN<\/a><\/h3>\n<pre>If nonzero, the nonlinear Maxwellian fringe is suppressed.<\/pre>\n<li>\n<h3><a name=LDISRAD>DISRAD<\/a><\/h3>\n<pre>If nonzero, the synchrotron radiation in the particle-tracking is inhibited.<\/pre>\n<pre>See also:\r\n <a href=#LRAD>RAD<\/a><\/pre>\n<li>\n<h3><a name=LDX>DX<\/a><\/h3>\n<pre>Horizontal displacement of magnet. This applied before the rotation by ROTATE.<\/pre>\n<pre>See also:\r\n <a href=#LDY>DY<\/a> <a href=#LROTATE>ROTATE<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=LDY>DY<\/a><\/h3>\n<pre>Vertical displacement of magnet. This applied before the rotation by ROTATE.<\/pre>\n<pre>See also:\r\n <a href=#LDX>DX<\/a> <a href=#LROTATE>ROTATE<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=LK5>K5<\/a><\/h3>\n<pre>The normal dodecapole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_108.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LL>L<\/a><\/h3>\n<pre>The effective length.<\/pre>\n<li>\n<h3><a name=LROTATE>ROTATE<\/a><\/h3>\n<pre>Rotation in x-y plane. After displacing the magnet by DX and DY, rotate the magnet around the local\r\ns-axis by -(amount given by ROTATE), then place the component. At the exit rotate back the magnet\r\naround the local s-axis at the exit, then take out displacement.<\/pre>\n<pre>See also:\r\n <a href=#LDX>DX<\/a> <a href=#LDY>DY<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=Ltransformation:THIN>transformation:THIN<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_109.svg\" \/><\/pre>\n<\/ul>\n<li>\n<h3><a name=LDRIFT>DRIFT<\/a><\/h3>\n<pre>A drift space.<\/pre>\n<ul>\n<li>\n<h3><a name=LL>L<\/a><\/h3>\n<pre>The length, can be negative.<\/pre>\n<li>\n<h3><a name=LRADIUS>RADIUS<\/a><\/h3>\n<pre>Radius of the vacuum chamber. Effective when SPAC is ON.<\/pre>\n<pre>See also:\r\n <a href=#LSPAC>SPAC<\/a><\/pre>\n<li>\n<h3><a name=Ltransformation:DRIFT>transformation:DRIFT<\/a><\/h3>\n<pre>The transformation of a drift is written as\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_112.svg\" \/>\r\n\r\nwith\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_113.svg\" \/><\/pre>\n<pre>See also:\r\n coordinates<\/pre>\n<\/ul>\n<li>\n<h3><a name=Lkeywords>keywords<\/a><\/h3>\n<pre>Available keywords are:\r\n\r\n        \r\ntype    keywords\r\nDRIFT   L RADIUS\r\nBEND    L ROTATE DROTATE DX DY ANGLE K0 K1 E1 E2 AE1 AE2 F1 FB1 FB2 FRINGE DISFRIN DISRAD EPS RANKICK\r\nQUAD    L ROTATE DX DY K1 F1 F2 FRINGE DISFRIN DISRAD EPS\r\nSEXT    L ROTATE DX DY K2 DISFRIN DISRAD\r\nOCT     L ROTATE DX DY K3 DISFRIN DISRAD\r\nDECA    L ROTATE DX DY K4 DISFRIN DISRAD\r\nDODECA  L ROTATE DX DY K5 DISFRIN DISRAD\r\nMULT    L DX DY DZ CHI1 CHI2 ROTATE(=CHI3) K0..K21 SK0..SK21 DISFRIN F1 F2 FRINGE DISRAD EPS VOLT\r\n        DVOLT HARM PHI DPHI FREQ RADIUS ANGLE E1 E2 AE1 AE2 DROTATE\r\nSOL     BZ DX DY DZ DPX DPY BOUND GEO CHI1 CHI2 CHI3 DBZ DISFRIN\r\nCAVI    L ROTATE DX DY VOLT DVOLT V1 V20 V11 V02 FREQ PHI HARM RANVOLT RANPHASE DISFRIN FRINGE\r\nTCAVI   L ROTATE DX DY K0 V1 FREQ PHI HARM RANKICK RANPHASE\r\nCOORD   DX DY CHI1 CHI2 CHI3 DIR\r\nMARK    AX BX AY BY EX EPX EY EPY R1 R2 R3 R4 DETR DX DPX DY DPY DZ DDP AZ BZ NZ ZX ZPX ZY ZPY EMITX\r\n        EMITY DP AZ SIGZ GEO OFFSET\r\nAPERT   DX1 DX2 DY1 DY2 DP AX AY DX DY<\/pre>\n<pre>See also:\r\n <a href=#Ldefault-keyword>default-keyword<\/a> <a href=#Lset-value-of-element>set-value-of-element<\/a> <a href=#LElement>Element<\/a><\/pre>\n<li>\n<h3><a name=LMARK>MARK<\/a><\/h3>\n<pre>MARK elements play special roles in FFS:\r\n\r\n     \r\n(1)  The first element of the beam line must be a MARK element to be used by FFS. In this case the\r\n     MARK element contains the parameters of the incoming beam (see optical-functions, special-variables\r\n     EMITX, EMITY, DP).\r\n(2)  The calculated optical parameters at a MARK command is saved by SAVE or STOP commands, then\r\n     it can be used as the incoming condition of other beam lines which have the same MARK element.\r\n\r\nExample: MARK P1 = (EMITX = .. EMITY = .. DP = ..);\r\n         LINE  A = ( .. P1 ..)\r\n               B = (P1 .. );\r\n         FFS USE = A;\r\n             ...           do matching on LINE A\r\n             SAVE P1       save the parameters at P1\r\n             USE B;        switch to LINE B\r\n             ...           do matching of LINE B whose entrance is to be\r\n                           matched P1.\r\n\r\n     \r\n(3)  If a MARK element has keyword GEO nonzero, this MARK element becomes the origin of the geometric\r\n     rotation after the last SOL element.\r\n(4)  The values of optical-functions of the MARK element at the beginning of the beam line can be\r\n     specified as matching variables by the FREE command.\r\n\r\n A MARK elements have all optical-functions as its keywords except NX, NY, TRX, TRY, and LENG. Also\r\nit has keywords EMITX, EMITY, and DP which give the values of the corresponding special-variables.<\/pre>\n<pre>See also:\r\n <a href=#LSAVE>SAVE<\/a> <a href=#LUSE>USE<\/a> <a href=#Loptical-functions>optical-functions<\/a> <a href=#LSOL>SOL<\/a> <a href=#Lspecial-variables>special-variables<\/a> <a href=#LEMITX>EMITX<\/a>\r\n <a href=#LEMITY>EMITY<\/a> <a href=#LDP>DP<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=LOFFSET>OFFSET<\/a><\/h3>\n<pre>OFFSET is a relative position from the current position. A fraction is allowed to specify a location\r\nwithin an element.\r\n   If the MARK at the beginning of a beam line has OFFSET nonzero, the optics calculation starts\r\nfrom the shifted location. If the last component of a beam line is a MARK with nonzero OFFSET, the\r\noptics calculation stops at the shifted location. The periodic condition is applied between those\r\nshifted locations.\r\n   The geometric origin and the origin of LENG shift to the first MARK.\r\n\r\nExamples:\r\n(1)  LINE A    = ( ...  QF PQFC  ... );\r\n     QUAD QF   = (L=0.3 K1=0.2);\r\n     MARK PQFC = (OFFSET = -0.5);\r\n\r\nHere PQFC represents the center of QF.\r\n\r\n(2)  LINE A    = ( ...  PQFC QF  ... );\r\n\r\n     QUAD QF   = (L=0.3 K1=0.2);\r\n     MARK PQFC = (OFFSET =  1.5);\r\nHere PQFC represents the center of QF, too (consider why). The value of OFFSET is interpreted taking\r\nthe direction of the LINE into account, i.e., a MARK in a line A represents the same location in\r\na line -A.\r\n\r\nRestrictions:\r\n(1) Function TrackParticles does not take OFFSET into account if the start\r\n    or stop location is in the midst of a beam line and a Mark with nonzero\r\n    OFFSET, in the current version. Tracking for entire beam line or\r\n    MEASURE(MEA) command supports OFFSET.\r\n(2) The outputs by DISPLAY(DISP) outside of the narrowed region by OFFSET are\r\n    meaningless.<\/pre>\n<\/ul>\n<li>\n<h3><a name=LMULT>MULT<\/a><\/h3>\n<pre>A magnet with multipoles. Note that the reference plane is defined so that the skew quadrupole component\r\nbecomes zero.\r\n   It can have a nonzero ANGLE to express a combined function bending magnet with multipoles. Note\r\nthat the definition of the multipoles with nonzero ANGLE is very special The current version does\r\nnot allow nonzero ANGLE inside a solenoid or with acceleration. Also the fringe field and emittance\r\ncalculation are not installed properly for nonzero ANGLE.<\/pre>\n<pre>See also:\r\n <a href=#Lmultipole_with_nonzero_ANGLE>multipole_with_nonzero_ANGLE<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=LK0>K0<\/a><\/h3>\n<pre>The normal dipole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_91.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK0>SK0<\/a><\/h3>\n<pre>The skew dipole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_114.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/1 degree, i.e., ROTATE = 90 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK1>K1<\/a><\/h3>\n<pre>The normal quadrupole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_92.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK1>SK1<\/a><\/h3>\n<pre>The skew quadrupole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_115.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/2 degree, i.e., ROTATE = 45 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK2>K2<\/a><\/h3>\n<pre>The normal sextupole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_116.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK2>SK2<\/a><\/h3>\n<pre>The skew sextupole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_117.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/3 degree, i.e., ROTATE = 30 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK3>K3<\/a><\/h3>\n<pre>The normal octupole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_118.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK3>SK3<\/a><\/h3>\n<pre>The skew octupole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_119.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/4 degree, i.e., ROTATE = 22.5 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK4>K4<\/a><\/h3>\n<pre>The normal decapole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_104.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK4>SK4<\/a><\/h3>\n<pre>The skew decapole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_120.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/5 degree, i.e., ROTATE = 18 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK5>K5<\/a><\/h3>\n<pre>The normal dodecapole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_108.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK5>SK5<\/a><\/h3>\n<pre>The skew dodecapole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_121.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/6 degree, i.e., ROTATE = 15 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK6>K6<\/a><\/h3>\n<pre>The normal 14-pole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_122.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK6>SK6<\/a><\/h3>\n<pre>The skew 14-pole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_123.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/7 degree, i.e., ROTATE = 12.857142857142856 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK7>K7<\/a><\/h3>\n<pre>The normal 16-pole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_124.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK7>SK7<\/a><\/h3>\n<pre>The skew 16-pole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_125.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/8 degree, i.e., ROTATE = 11.25 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK8>K8<\/a><\/h3>\n<pre>The normal 18-pole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_126.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK8>SK8<\/a><\/h3>\n<pre>The skew 18-pole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_127.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/9 degree, i.e., ROTATE = 10 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK9>K9<\/a><\/h3>\n<pre>The normal 20-pole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_128.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK9>SK9<\/a><\/h3>\n<pre>The skew 20-pole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_129.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/10 degree, i.e., ROTATE = 9 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK10>K10<\/a><\/h3>\n<pre>The normal 22-pole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_130.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK10>SK10<\/a><\/h3>\n<pre>The skew 22-pole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_131.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/11 degree, i.e., ROTATE = 8.181818181818182 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK11>K11<\/a><\/h3>\n<pre>The normal 24-pole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_132.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK11>SK11<\/a><\/h3>\n<pre>The skew 24-pole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_133.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/12 degree, i.e., ROTATE = 7.5 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK12>K12<\/a><\/h3>\n<pre>The normal 26-pole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_134.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK12>SK12<\/a><\/h3>\n<pre>The skew 26-pole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_135.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/13 degree, i.e., ROTATE = 6.923076923076923 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK13>K13<\/a><\/h3>\n<pre>The normal 28-pole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_136.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK13>SK13<\/a><\/h3>\n<pre>The skew 28-pole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_137.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/14 degree, i.e., ROTATE = 6.428571428571428 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK14>K14<\/a><\/h3>\n<pre>The normal 30-pole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_138.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK14>SK14<\/a><\/h3>\n<pre>The skew 30-pole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_139.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/15 degree, i.e., ROTATE = 6 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK15>K15<\/a><\/h3>\n<pre>The normal 32-pole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_140.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK15>SK15<\/a><\/h3>\n<pre>The skew 32-pole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_141.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/16 degree, i.e., ROTATE = 5.625 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK16>K16<\/a><\/h3>\n<pre>The normal 34-pole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_142.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK16>SK16<\/a><\/h3>\n<pre>The skew 34-pole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_143.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/17 degree, i.e., ROTATE = 5.294117647058823 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK17>K17<\/a><\/h3>\n<pre>The normal 36-pole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_144.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK17>SK17<\/a><\/h3>\n<pre>The skew 36-pole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_145.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/18 degree, i.e., ROTATE = 5 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK18>K18<\/a><\/h3>\n<pre>The normal 38-pole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_146.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK18>SK18<\/a><\/h3>\n<pre>The skew 38-pole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_147.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/19 degree, i.e., ROTATE = 4.7368421052631575 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK19>K19<\/a><\/h3>\n<pre>The normal 40-pole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_148.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK19>SK19<\/a><\/h3>\n<pre>The skew 40-pole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_149.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/20 degree, i.e., ROTATE = 4.5 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK20>K20<\/a><\/h3>\n<pre>The normal 42-pole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_150.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK20>SK20<\/a><\/h3>\n<pre>The skew 42-pole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_151.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/21 degree, i.e., ROTATE = 4.285714285714286 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LK21>K21<\/a><\/h3>\n<pre>The normal 44-pole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_152.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LSK21>SK21<\/a><\/h3>\n<pre>The skew 44-pole magnetic field component (times the length L).\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_153.svg\" \/>\r\n\r\nwhere L is the length of the component. Positive sign means a horizontally focusing magnet rotated\r\naround z-axis by -90\/22 degree, i.e., ROTATE = 4.090909090909091 DEG .<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LAE1>AE1<\/a><\/h3>\n<pre>The absolute face angle at the entrance. The effective face angle is E1 * ANGLE + AE1, and a positive\r\nangle at the entrance corresponds to a surface with dx\/ds > 0.<\/pre>\n<pre>See also:\r\n <a href=#LE1>E1<\/a> <a href=#LAE2>AE2<\/a> <a href=#LANGLE>ANGLE<\/a><\/pre>\n<li>\n<h3><a name=LAE2>AE2<\/a><\/h3>\n<pre>The absolute face-angle at the exit to the bending angle. The effective face angle is E2 * ANGLE\r\n+ AE2, and a positive angle at the exit corresponds to a surface with dx\/ds &lt 0.<\/pre>\n<pre>See also:\r\n <a href=#LE2>E2<\/a> <a href=#LAE1>AE1<\/a> <a href=#LANGLE>ANGLE<\/a><\/pre>\n<li>\n<h3><a name=LANGLE>ANGLE<\/a><\/h3>\n<pre>The bending angle. If positive, it bends the orbit in x-s plane toward negative-x-direction. ANGLE\r\ndetermines the geometry of the beam line, while K0 represents a dipole kick on top of the bending\r\nangle given by ANGLE, i.e., the total deflection of the beam is given of ANGLE + K0.<\/pre>\n<pre>See also:\r\n <a href=#LK0>K0<\/a><\/pre>\n<li>\n<h3><a name=LDISFRIN>DISFRIN<\/a><\/h3>\n<pre>If nonzero, the nonlinear maxwellian fringe is suppressed. The effects of DISFRIN and FRINGE are\r\nsummarized as\r\n\r\n                   DISFRIN=0                   DISFRIN<>0\r\n             Nonlinear      Linear       Nonlinear     Linear\r\nFRINGE=0    entr & exit      none          none         none\r\nFRINGE=1       entr          entr          none         entr\r\nFRINGE=2       exit          exit          none         exit\r\nFRINGE=3    entr & exit   entr & exit      none      entr & exit\r\n\r\n<\/pre>\n<pre>See also:\r\n <a href=#LFRINGE>FRINGE<\/a><\/pre>\n<li>\n<h3><a name=LDISRAD>DISRAD<\/a><\/h3>\n<pre>If nonzero, the synchrotron radiation in the particle-tracking is inhibited.<\/pre>\n<pre>See also:\r\n <a href=#LRAD>RAD<\/a><\/pre>\n<li>\n<h3><a name=LDPHI>DPHI<\/a><\/h3>\n<pre>Relative phase offset. The stable synchrotron phase above the transition is near PHI = 0. The acceleration is given as \r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_100.svg\" \/>\r\n\r\nwhere ts is the equilibrium time determined by the valance between the acceleration and the radiation\r\nloss around the ring. DPHI is not taken into account to determine the design momentum p0(s).<\/pre>\n<pre>See also:\r\n <a href=#LFREQ>FREQ<\/a> <a href=#LVOLT>VOLT<\/a> <a href=#LDVOLT>DVOLT<\/a> <a href=#LV1>V1<\/a> V20 <a href=#LV11>V11<\/a><\/pre>\n<li>\n<h3><a name=LDVOLT>DVOLT<\/a><\/h3>\n<pre>Additional accelerating peak voltage to be added to Volt, without affecting the design momentum p0(s).<\/pre>\n<pre>See also:\r\n <a href=#LVOLT>VOLT<\/a><\/pre>\n<li>\n<h3><a name=LE1>E1<\/a><\/h3>\n<pre>The ratio of the face-angle at the entrance to the bending angle. The effective face angle is E1\r\n* ANGLE + AE1, and a positive angle at the entrance corresponds to a surface with dx\/ds > 0. For\r\nexample, a symmetrically-placed rectangular magnet has\r\n E1 = 0.5 and E2 = 0.5.<\/pre>\n<pre>See also:\r\n <a href=#LAE1>AE1<\/a> <a href=#LE2>E2<\/a> <a href=#LANGLE>ANGLE<\/a><\/pre>\n<li>\n<h3><a name=LE2>E2<\/a><\/h3>\n<pre>The ratio of the face-angle at the exit to the bending angle. The effective face angle is E2 * ANGLE\r\n+ AE2, and a positive angle at the exit corresponds to a surface with dx\/ds &lt 0. For example, a\r\nsymmetrically-placed rectangular magnet has E1 = 0.5 and E2 = 0.5.<\/pre>\n<pre>See also:\r\n <a href=#LAE2>AE2<\/a> <a href=#LE1>E1<\/a> <a href=#LANGLE>ANGLE<\/a><\/pre>\n<li>\n<h3><a name=LF1>F1<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_154.svg\" \/>\r\n   The effects only in the first order of K1 is taken into account.<\/pre>\n<pre>See also:\r\n <a href=#LF2>F2<\/a> <a href=#LFRINGE>FRINGE<\/a><\/pre>\n<li>\n<h3><a name=LF2>F2<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_154.svg\" \/>\r\n   The effects only in the first order of K1 is taken into account.<\/pre>\n<pre>See also:\r\n <a href=#LF1>F1<\/a> <a href=#LFRINGE>FRINGE<\/a><\/pre>\n<li>\n<h3><a name=LFB1>FB1<\/a><\/h3>\n<pre>Linear Fringe length F1 for the K0 component at the entrance.<\/pre>\n<pre>See also:\r\n <a href=#LBEND>BEND<\/a> <a href=#LF1>F1<\/a> <a href=#LFB1>FB1<\/a><\/pre>\n<li>\n<h3><a name=LFB2>FB2<\/a><\/h3>\n<pre>Linear Fringe length F1 for the K0 component at the exit.<\/pre>\n<pre>See also:\r\n <a href=#LBEND>BEND<\/a> <a href=#LF1>F1<\/a> <a href=#LFB2>FB2<\/a><\/pre>\n<li>\n<h3><a name=LFREQ>FREQ<\/a><\/h3>\n<pre> Rf frequency. If this keyword is nonzero, the keyword HARM is ignored.\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_100.svg\" \/><\/pre>\n<pre>See also:\r\n <a href=#LHARM>HARM<\/a><\/pre>\n<li>\n<h3><a name=LFRINGE>FRINGE<\/a><\/h3>\n<pre>The effects of the linear fringe (characterized by F1 and F2), and the nonlinear Mexwellian fringe\r\nare controled as:\r\n\r\n                   DISFRIN=0                   DISFRIN<>0\r\n             Nonlinear      Linear       Nonlinear     Linear\r\nFRINGE=0    entr & exit      none          none         none\r\nFRINGE=1       entr          entr          none         entr\r\nFRINGE=2       exit          exit          none         exit\r\nFRINGE=3    entr & exit   entr & exit      none      entr & exit\r\n\r\n<\/pre>\n<pre>See also:\r\n <a href=#LF1>F1<\/a> <a href=#LF2>F2<\/a> <a href=#LDISFRIN>DISFRIN<\/a><\/pre>\n<li>\n<h3><a name=LHARM>HARM<\/a><\/h3>\n<pre> A harmonic number. This is valid only when FREQ is zero.<\/pre>\n<pre>See also:\r\n <a href=#LFREQ>FREQ<\/a><\/pre>\n<li>\n<h3><a name=LL>L<\/a><\/h3>\n<pre>The effective length.<\/pre>\n<li>\n<h3><a name=Lmisalignments>misalignments<\/a><\/h3>\n<pre>Misalignments of a MULT element are expressed by the keywords DX, DY, DZ, CHI1, CHI2, and ROTATE(=CHI3). They specify all misa\r\nlignments of a rigid body,  At the entrance of MULT, the coordinates of a particle are transformed as\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_157.svg\" \/>\r\n\r\nwhere c1 and s1 are Cos[CHI1] and Sin[CHI1], etc. The inverse is applied at the exit.\r\n   Those misalignments are also valid within a solenoid.\r\n   Other straight elements such as QUAD or THIN do not and will not have these full misalignment\r\nspecifications, because they can be substituted by MULT.\r\n   The geometry of the design orbit is determined by the saved values of CHI1, CHI2, and DZ, while\r\nthe current values are used for DX, DY, and ROTATE.<\/pre>\n<li>\n<h3><a name=Lmultipole_with_nonzero_ANGLE>multipole_with_nonzero_ANGLE<\/a><\/h3>\n<pre>The multipoles in MULT with nonzero ANGLE are defined by\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_158.svg\" \/>\r\nActually the summation is truncated at n + k <= 21 in the current version. While this definition\r\nconverges to the regular one for multipoles when ANGLE -> 0, K0 and K1 of MULT are different from\r\nthose of BEND.<\/pre>\n<pre>See also:\r\n <a href=#LANGLE>ANGLE<\/a><\/pre>\n<li>\n<h3><a name=LPHI>PHI<\/a><\/h3>\n<pre>Relative phase offset. The stable synchrotron phase above the transition is near PHI = 0. \r\nThe acceleration is given as \r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_100.svg\" \/>\r\n\r\nwhere ts is the equilibrium time determined by the valance between the acceleration and the radiation\r\nloss around the ring.<\/pre>\n<li>\n<h3><a name=LRADIUS>RADIUS<\/a><\/h3>\n<pre>Radius of the vacuum chamber. Effective when SPAC is ON.<\/pre>\n<pre>See also:\r\n <a href=#LSPAC>SPAC<\/a><\/pre>\n<li>\n<h3><a name=LVOLT>VOLT<\/a><\/h3>\n<pre>Accelerating peak voltage in Volt.\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_100.svg\" \/>\r\n\r\nwhere ts is the equilibrium time determined by the valance between the acceleration and the radiation\r\nloss around the ring.<\/pre>\n<pre>See also:\r\n <a href=#LDVOLT>DVOLT<\/a><\/pre>\n<\/ul>\n<li>\n<h3><a name=LOCT>OCT<\/a><\/h3>\n<pre>A octupole magnet.<\/pre>\n<ul>\n<li>\n<h3><a name=LDISFRIN>DISFRIN<\/a><\/h3>\n<pre>If nonzero, the nonlinear Maxwellian fringe is suppressed.<\/pre>\n<li>\n<h3><a name=LDISRAD>DISRAD<\/a><\/h3>\n<pre>If nonzero, the synchrotron radiation in the particle-tracking is inhibited.<\/pre>\n<pre>See also:\r\n <a href=#LRAD>RAD<\/a><\/pre>\n<li>\n<h3><a name=LDX>DX<\/a><\/h3>\n<pre>Horizontal displacement of magnet. This applied before the rotation by ROTATE.<\/pre>\n<pre>See also:\r\n <a href=#LDY>DY<\/a> <a href=#LROTATE>ROTATE<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=LDY>DY<\/a><\/h3>\n<pre>Vertical displacement of magnet. This applied before the rotation by ROTATE.<\/pre>\n<pre>See also:\r\n <a href=#LDX>DX<\/a> <a href=#LROTATE>ROTATE<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=LK3>K3<\/a><\/h3>\n<pre>The normal octupole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_118.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LL>L<\/a><\/h3>\n<pre>The effective length.<\/pre>\n<li>\n<h3><a name=LROTATE>ROTATE<\/a><\/h3>\n<pre>Rotation in x-y plane. After displacing the magnet by DX and DY, rotate the magnet around the local\r\ns-axis by -(amount given by ROTATE), then place the component. At the exit rotate back the magnet\r\naround the local s-axis at the exit, then take out displacement.<\/pre>\n<pre>See also:\r\n <a href=#LDX>DX<\/a> <a href=#LDY>DY<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=Ltransformation:THIN>transformation:THIN<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_159.svg\" \/><\/pre>\n<\/ul>\n<li>\n<h3><a name=LQUAD>QUAD<\/a><\/h3>\n<pre>A quadrupole magnet.<\/pre>\n<ul>\n<li>\n<h3><a name=LDISFRIN>DISFRIN<\/a><\/h3>\n<pre>If nonzero, the nonlinear maxwellian fringe is suppressed. The effects of DISFRIN and FRINGE are\r\nsummarized as\r\n\r\n                   DISFRIN=0                   DISFRIN<>0\r\n             Nonlinear      Linear       Nonlinear     Linear\r\nFRINGE=0    entr & exit      none          none         none\r\nFRINGE=1       entr          entr          none         entr\r\nFRINGE=2       exit          exit          none         exit\r\nFRINGE=3    entr & exit   entr & exit      none      entr & exit\r\n\r\n<\/pre>\n<pre>See also:\r\n <a href=#LFRINGE>FRINGE<\/a><\/pre>\n<li>\n<h3><a name=LDISRAD>DISRAD<\/a><\/h3>\n<pre>If nonzero, the synchrotron radiation in the particle-tracking is inhibited.<\/pre>\n<pre>See also:\r\n <a href=#LRAD>RAD<\/a><\/pre>\n<li>\n<h3><a name=LDX>DX<\/a><\/h3>\n<pre>Horizontal displacement of magnet. This applied before the rotation by ROTATE.<\/pre>\n<pre>See also:\r\n <a href=#LDY>DY<\/a> <a href=#LROTATE>ROTATE<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=LDY>DY<\/a><\/h3>\n<pre>Vertical displacement of magnet. This applied before the rotation by ROTATE.<\/pre>\n<pre>See also:\r\n <a href=#LDX>DX<\/a> <a href=#LROTATE>ROTATE<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=LF1>F1<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_154.svg\" \/>\r\n   The effects only in the first order of K1 is taken into account.<\/pre>\n<pre>See also:\r\n <a href=#LF2>F2<\/a> <a href=#LFRINGE>FRINGE<\/a><\/pre>\n<li>\n<h3><a name=LF2>F2<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_154.svg\" \/>\r\n   The effects only in the first order of K1 is taken into account.<\/pre>\n<pre>See also:\r\n <a href=#LF1>F1<\/a> <a href=#LFRINGE>FRINGE<\/a><\/pre>\n<li>\n<h3><a name=LFRINGE>FRINGE<\/a><\/h3>\n<pre>The effects of the linear fringe (characterized by F1 and F2), and the nonlinear Mexwellian fringe\r\nare controled as:\r\n\r\n                   DISFRIN=0                   DISFRIN<>0\r\n             Nonlinear      Linear       Nonlinear     Linear\r\nFRINGE=0    entr & exit      none          none         none\r\nFRINGE=1       entr          entr          none         entr\r\nFRINGE=2       exit          exit          none         exit\r\nFRINGE=3    entr & exit   entr & exit      none      entr & exit\r\n\r\n<\/pre>\n<pre>See also:\r\n <a href=#LF1>F1<\/a> <a href=#LF2>F2<\/a> <a href=#LDISFRIN>DISFRIN<\/a><\/pre>\n<li>\n<h3><a name=LK1>K1<\/a><\/h3>\n<pre>The normal quadrupole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_92.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LL>L<\/a><\/h3>\n<pre>The effective length.<\/pre>\n<li>\n<h3><a name=LROTATE>ROTATE<\/a><\/h3>\n<pre>Rotation in x-y plane. After displacing the magnet by DX and DY, rotate the magnet around the local\r\ns-axis by -(amount given by ROTATE), then place the component. At the exit rotate back the magnet\r\naround the local s-axis at the exit, then take out displacement.<\/pre>\n<pre>See also:\r\n <a href=#LDX>DX<\/a> <a href=#LDY>DY<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=Ltransformation:QUAD>transformation:QUAD<\/a><\/h3>\n<pre>The transformation in a QUAD is a sequence of:\r\n\r\n   (nonlinear fringe at entrance)\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_162.svg\" \/>\r\n   (linear fringe at entrance)\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_168.svg\" \/>\r\n   (body of quad)\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_175.svg\" \/>\r\n   (linear fringe at exit)\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_178.svg\" \/>\r\n   (nonlinear fringe at exit)\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_185.svg\" \/><\/pre>\n<pre>See also:\r\n <a href=#LHamiltonian>Hamiltonian<\/a> <a href=#L2nd-order-Hamiltonian>2nd-order-Hamiltonian<\/a> <a href=#Lsolution-H2>solution-H2<\/a> <a href=#Lsolution-dH>solution-dH<\/a>\r\n<\/pre>\n<\/ul>\n<li>\n<h3><a name=LSEXT>SEXT<\/a><\/h3>\n<pre>A sextupole magnet.<\/pre>\n<ul>\n<li>\n<h3><a name=LDISFRIN>DISFRIN<\/a><\/h3>\n<pre>If nonzero, the nonlinear Maxwellian fringe is suppressed.<\/pre>\n<li>\n<h3><a name=LDISRAD>DISRAD<\/a><\/h3>\n<pre>If nonzero, the synchrotron radiation in the particle-tracking is inhibited.<\/pre>\n<pre>See also:\r\n <a href=#LRAD>RAD<\/a><\/pre>\n<li>\n<h3><a name=LDX>DX<\/a><\/h3>\n<pre>Horizontal displacement of magnet. This applied before the rotation by ROTATE.<\/pre>\n<pre>See also:\r\n <a href=#LDY>DY<\/a> <a href=#LROTATE>ROTATE<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=LDY>DY<\/a><\/h3>\n<pre>Vertical displacement of magnet. This applied before the rotation by ROTATE.<\/pre>\n<pre>See also:\r\n <a href=#LDX>DX<\/a> <a href=#LROTATE>ROTATE<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=LK2>K2<\/a><\/h3>\n<pre>The normal sextupole magnetic field component (times the length L).\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_116.svg\" \/>\r\n\r\nwhere L is the effective length of the component. Positive sign means horizontal focusing.<\/pre>\n<pre>See also:\r\n <a href=#LL>L<\/a><\/pre>\n<li>\n<h3><a name=LL>L<\/a><\/h3>\n<pre>The effective length.<\/pre>\n<li>\n<h3><a name=LROTATE>ROTATE<\/a><\/h3>\n<pre>Rotation in x-y plane. After displacing the magnet by DX and DY, rotate the magnet around the local\r\ns-axis by -(amount given by ROTATE), then place the component. At the exit rotate back the magnet\r\naround the local s-axis at the exit, then take out displacement.<\/pre>\n<pre>See also:\r\n <a href=#LDX>DX<\/a> <a href=#LDY>DY<\/a> <a href=#LDROTATE>DROTATE<\/a><\/pre>\n<li>\n<h3><a name=Ltransformation:THIN>transformation:THIN<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_191.svg\" \/><\/pre>\n<\/ul>\n<li>\n<h3><a name=LSOL>SOL<\/a><\/h3>\n<pre>A solenoid. Unlike other elements, SOL elements inserted at boundaries or of a solenoid or at where\r\nthe field changes. Between SOL elements DRIFT, BEND(straight bend only), QUAD, and MULT elements\r\ncan be inserted. The longitudinal field of the solenoid overlaps on those elements.\r\n   In a SOL region, the coordinate is shifted on the axis of the solenoid, no matter how the design\r\norbit bends there. The x-direction of the coordinate in a solenoid is so chosen as to CHI3 = 0. At\r\nthe exit of a solenoid, the coordinate is shifted back to the design orbit, but the value of CHI3\r\nis so determined as to set CHI3 zero at the nearest MARK element which has GEO = 1 after the exit.\r\nThe offset and orientation of the design orbit can be given by keywords DX, DY, DPX, DPY at a SOL\r\nelement with GEO = 1. SOL can be used to shift the coordinate to the actual orbit even without BZ.\r\nIt is useful to define the coordinate with magnets with DX and DY.<\/pre>\n<pre>See also:\r\n <a href=#Lgeometric-functions>geometric-functions<\/a> <a href=#LMARK>MARK<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=LBOUND>BOUND<\/a><\/h3>\n<pre>BOUND = 1 must be given at both sides of the boundaries of a solenoid, otherwise SOL only specifies\r\nthe change of BZ<\/pre>\n<li>\n<h3><a name=LBZ>BZ<\/a><\/h3>\n<pre>The longitudinal field of a solenoid. If a SOL is used with BOUND = 0 (default), only BZ is used\r\nto change the field, and no coordinate transformation is applied.<\/pre>\n<li>\n<h3><a name=LDISFRIN>DISFRIN<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_194.svg\" \/><\/pre>\n<li>\n<h3><a name=LDPX>DPX<\/a><\/h3>\n<pre>An offset of the design ORBIT angle CHI1 relative to the solenoid axis at SOL with GEO = 1.<\/pre>\n<pre>See also:\r\n <a href=#LGEO>GEO<\/a> <a href=#LDX>DX<\/a> <a href=#LDY>DY<\/a> <a href=#LDPY>DPY<\/a> CHI1<\/pre>\n<li>\n<h3><a name=LDPY>DPY<\/a><\/h3>\n<pre>An offset of the design ORBIT angle CHI2 relative to the solenoid axis at SOL with GEO = 1.<\/pre>\n<pre>See also:\r\n <a href=#LGEO>GEO<\/a> <a href=#LDX>DX<\/a> <a href=#LDY>DY<\/a> <a href=#LDPX>DPX<\/a> CHI2<\/pre>\n<li>\n<h3><a name=LDX>DX<\/a><\/h3>\n<pre>An x-offset of the design ORBIT relative to the solenoid center at SOL with GEO = 1.<\/pre>\n<pre>See also:\r\n <a href=#LGEO>GEO<\/a> <a href=#LDY>DY<\/a> <a href=#LDPX>DPX<\/a> <a href=#LDPY>DPY<\/a><\/pre>\n<li>\n<h3><a name=LDY>DY<\/a><\/h3>\n<pre>A y-offset of the design ORBIT relative to the solenoid center at SOL with GEO = 1.<\/pre>\n<pre>See also:\r\n <a href=#LGEO>GEO<\/a> <a href=#LDX>DX<\/a> <a href=#LDPX>DPX<\/a> <a href=#LDPY>DPY<\/a><\/pre>\n<li>\n<h3><a name=LF1>F1<\/a><\/h3>\n<pre>The length of fringe of the solenoid field. It affects only the EMITTANCE calculation. If F1 = 0\r\n(default), no radiation arises at the fringe.<\/pre>\n<li>\n<h3><a name=LGEO>GEO<\/a><\/h3>\n<pre>One of boundaries (with GEO = 1) of a solenoid must have GEO = 1 to specify the alignment of the\r\ndesign orbit. At a SOL element with GEO = 1, the design orbit is determined by DX, DY, DPX, DPY parameters<\/pre>\n<pre>See also:\r\n <a href=#LDX>DX<\/a> <a href=#LDY>DY<\/a> <a href=#LDPX>DPX<\/a> <a href=#LDPY>DPY<\/a> <a href=#Lgeometric-functions>geometric-functions<\/a> <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a> GEOMRTRY(G) <a href=#LOGEOMETRY(OG)>OGEOMETRY(OG)<\/a>\r\n<\/pre>\n<\/ul>\n<\/ul>\n<h3><a name=Lexpression>expression<\/a><\/h3>\n<pre>An expression in FFS consists of a symbol, constants, and operators.\r\n\r\n>>> A symbol is a characters of any length starting with an alphabet or $.\r\n>>> There are two kinds of constants, real number and character-string.\r\n    real number is a number in fortran-line format.\r\n    character-string is a set of characters surrounded by \"\" or ''.\r\n    special-characters can be specified with backslash.\r\n>>> Available operators are (in the order of the priority):\r\n    #,##,\r\n    ?,\r\n    ::,\r\n    @,\r\n    [],\r\n    ++, --,\r\n    \/@, \/\/@, @@,\r\n    .,\r\n    ^,\r\n    *, \/,\r\n    +, -,\r\n    ==, <>, >, <, >=, =>, <=, =<, \r\n    ===, <=>, \r\n    ~, \r\n    &&,\r\n    ||,\r\n    .., ...,\r\n    |,\r\n    :,\r\n    ->, :>,\r\n    \/., \/\/.,\r\n    +=, -=, *=, \/=,\r\n    &,\r\n    \/\/,\r\n    \/:,\r\n    =, :=, ^=, ^:=, =.\r\n    ;,\r\n    {}\r\nAn operator with higher priority is operated first. An expression enclosed in () is evaluated first.\r\nMost mathematical operations are threaded into a list, i.e., {a,b} + {c,d} gives {a + b,c + d}, etc.\r\n\r\n  Each operators can be used as a function using its name. For example, Plus[x,y] gives the same\r\nresult as x + y.<\/pre>\n<pre>See also:\r\n <a href=#Lconstants>constants<\/a> <a href=#Lfunctions>functions<\/a> <a href=#Lcommand-syntax>command-syntax<\/a> <a href=#Lcharacter-string>character-string<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=L(-)>(-)<\/a><\/h3>\n<pre>operator for subtraction or unary minus.<\/pre>\n<li>\n<h3><a name=L(\/)>(\/)<\/a><\/h3>\n<pre>operator for division.<\/pre>\n<li>\n<h3><a name=LAddTo(+=)>AddTo(+=)<\/a><\/h3>\n<pre>a+=b is equivalent to a=a+b .<\/pre>\n<li>\n<h3><a name=LAlternatives(|)>Alternatives(|)<\/a><\/h3>\n<pre>a | b | ... represents a pattern which matches one of patterns a, b, ...<\/pre>\n<li>\n<h3><a name=LAnd(&#038;&#038;)>And(&#038;&#038;)<\/a><\/h3>\n<pre> a && b returns True(==1) when both a and b are nonzero real,  False(==0) otherwise. b is not evaluated\r\nwhen a is zero.<\/pre>\n<li>\n<h3><a name=LApply (@@)>Apply (@@)<\/a><\/h3>\n<pre>f@@a applies function f to subexpressions of a. f@@[a,level] specifies a levelspec to apply by level.<\/pre>\n<pre>See also:\r\n <a href=#LApply>Apply<\/a><\/pre>\n<li>\n<h3><a name=LCompoundExpression(;)>CompoundExpression(;)<\/a><\/h3>\n<pre>a ; b evaluates a, then evaluates b and returns its result.<\/pre>\n<li>\n<h3><a name=LDecrement(--)>Decrement(&#8211;)<\/a><\/h3>\n<pre>a-- decrements a by 1, returning the old value of a. --a decrements a by 1, returning the new value\r\nof a.<\/pre>\n<li>\n<h3><a name=LDivideBy(\/=)>DivideBy(\/=)<\/a><\/h3>\n<pre>a\/=b is equivalent to a=a\/b.<\/pre>\n<li>\n<h3><a name=LDot(.)>Dot(.)<\/a><\/h3>\n<pre>a . b returns the inner product of a and b.<\/pre>\n<li>\n<h3><a name=LEqual(==)>Equal(==)<\/a><\/h3>\n<pre>a == b returns True(==1) if a and b are both Real with the same value or a String with same length\r\nand value. If one of a or b is a list, or both are lists with same size, returns a list of element-wise\r\nresults.<\/pre>\n<li>\n<h3><a name=LFunction(&#038;)>Function(&#038;)<\/a><\/h3>\n<pre> a & is a pure-function whose argument is specified #, #n, ##, ##n.<\/pre>\n<pre>See also:\r\n Slot(#) SlotSequence(##) <a href=#Lfunctions>functions<\/a> <a href=#LFunction(&#038;)>Function(&)<\/a><\/pre>\n<li>\n<h3><a name=LGreater(>)>Greater(>)<\/a><\/h3>\n<pre>If both a and b are real, a > b returns True if a is greater than b, False otherwise. If one of a\r\nor b is a list, or both are lists with same size, returns a list of element-wise results.<\/pre>\n<li>\n<h3><a name=LGreaterEqual(>= or =>)>GreaterEqual(>= or =>)<\/a><\/h3>\n<pre>If both a and b are real, a => b returns True if a is greater than or equal to b, False otherwise.\r\nIf one of a or b is a list, or both are lists with same size, returns a list of element-wise results.<\/pre>\n<li>\n<h3><a name=LIncrement(++)>Increment(++)<\/a><\/h3>\n<pre>a++ increments a by 1, returning the old value of a. ++a increments a by 1, returning the new value\r\nof a.<\/pre>\n<li>\n<h3><a name=LLess(<)>Less(<)<\/a><\/h3>\n<pre>If both a and b are real, a < b returns True if a is less than b, False otherwise. If one of a or\r\nb is a list, or both are lists with same size, returns a list of element-wise results.<\/pre>\n<li>\n<h3><a name=LLessEqual(<= or =<)>LessEqual(<= or =<)<\/a><\/h3>\n<pre>If both a and b are real, a <= b returns True if a is less than or equal to b, False otherwise. If\r\none of a or b is a list, or both are lists with same size, returns a list of element-wise results.<\/pre>\n<li>\n<h3><a name=LList({})>List({})<\/a><\/h3>\n<pre>{a,b,c...} is a list structure.<\/pre>\n<li>\n<h3><a name=LMap (\/@)>Map (\/@)<\/a><\/h3>\n<pre>f\/@a maps function f to subexpressions of a. f\/@[a,level] specifies a levelspec of map by level.<\/pre>\n<pre>See also:\r\n <a href=#LMap>Map<\/a><\/pre>\n<li>\n<h3><a name=LMapAll(\/\/@)>MapAll(\/\/@)<\/a><\/h3>\n<pre>f\/\/@a maps function f to all subexpressions of a. f\/\/@[a,Heads->True] maps including the heads of\r\na and its subexpressions.<\/pre>\n<li>\n<h3><a name=LMember(@)>Member(@)<\/a><\/h3>\n<pre>f@a refers the member a of an instance or a class f. Otherwise it is same as f[a]. f@g@h means (f@g)@h,\r\nand f@g[h] (f@g)[h].<\/pre>\n<li>\n<h3><a name=LMessageName(::)>MessageName(::)<\/a><\/h3>\n<pre>symbol::tag returns a message associated with symbol and tag\r\n symbol::tag = message sets a message identified by symbol<\/pre>\n<li>\n<h3><a name=LNot(~)>Not(~)<\/a><\/h3>\n<pre> ~a returns True(==1) when a is zero, False(==0) when a is a nonzero real.<\/pre>\n<li>\n<h3><a name=LOr(||)>Or(||)<\/a><\/h3>\n<pre>\r\na || b returns True(==1) when a is nonzero real or b is nonzero real, False(==0) otherwise. b is\r\nnot evaluated when a is nonzero.<\/pre>\n<li>\n<h3><a name=LPart([[]])>Part([[]])<\/a><\/h3>\n<pre>a[[b,..]] is a subexpression of an expression a.\r\n If an index is omitted or Null like as a[[,b]], Part returns a list of elements whose corresponding\r\nindex takes the entire range. For instance,\r\n {{1, 2}, {3, 4}, {5, 6}}[[,2]] gives {2, 4, 6}.<\/pre>\n<pre>See also:\r\n <a href=#LPart>Part<\/a><\/pre>\n<li>\n<h3><a name=LPatternTest(?)>PatternTest(?)<\/a><\/h3>\n<pre>pattern?test matches to an object which matches pattern then test[object] gives True.<\/pre>\n<li>\n<h3><a name=LPlus(+)>Plus(+)<\/a><\/h3>\n<pre>a + b returns the sum of a and b. If one of a or b is a list, or both are lists with same size, returns\r\na list of element-wise results.<\/pre>\n<li>\n<h3><a name=LPower(^)>Power(^)<\/a><\/h3>\n<pre>a ^ b returns the power of a to b. If one of a or b is a list, or both are lists with same size,\r\nreturns a list of element-wise results.<\/pre>\n<li>\n<h3><a name=LRepeated(..)>Repeated(..)<\/a><\/h3>\n<pre>p.. matches sequence of one ore more expressions, each matching p.<\/pre>\n<li>\n<h3><a name=LRepeatedNull(...)>RepeatedNull(...)<\/a><\/h3>\n<pre>p... matches sequence of zero ore more expressions, each matching p.<\/pre>\n<li>\n<h3><a name=LReplaceAll(\/.)>ReplaceAll(\/.)<\/a><\/h3>\n<pre>expr\/.rule replaces all subexpressions of expr using rule.<\/pre>\n<li>\n<h3><a name=LReplaceRepeated(\/\/.)>ReplaceRepeated(\/\/.)<\/a><\/h3>\n<pre>expr\/\/.rule replaces all subexpressionso of expr using rule, while a replacement is performed.<\/pre>\n<li>\n<h3><a name=LRule(->)>Rule(->)<\/a><\/h3>\n<pre>pattern->expr represents a rule for ReplaceAll.<\/pre>\n<li>\n<h3><a name=LRuleDelayed(:>)>RuleDelayed(:>)<\/a><\/h3>\n<pre>pattern:>expr represents a rule for ReplaceAll, where expr is kept unevaluated until the replacement.<\/pre>\n<pre>See also:\r\n Literal<\/pre>\n<li>\n<h3><a name=LSameQ(===)>SameQ(===)<\/a><\/h3>\n<pre>a === b returns True(==1) if a and b have the same type and same value, False(==0) otherwise.<\/pre>\n<li>\n<h3><a name=LSequence([])>Sequence([])<\/a><\/h3>\n<pre>a[b,c,..] means a list of b, c,.. with the head a. It is evaluated as a function-reference when a\r\nis a function or a defined-function. When a is a list with head List, it is interpreted as a part\r\nspecification of a list. When a is a character-string, it is interpreted as a substring specification.\r\nWhen a is an operator, it is an expression b (a) c (a) .. . When a is Null, it means a sequence.<\/pre>\n<li>\n<h3><a name=LSet(=)>Set(=)<\/a><\/h3>\n<pre>a = value sets the value b to the symbol a. {a,b,..}={v1,v2,..} sets a,b,c simultaneously. a[b,c,..]=v1\r\nsets the part of a[b,c,..] if a is a list. a[b,c,..] = expression defines the value a[b,c,..] if\r\na is not a list.<\/pre>\n<li>\n<h3><a name=LSetDelayed(:=)>SetDelayed(:=)<\/a><\/h3>\n<pre>same as Set but the right hand side is not evaluated when it is set.<\/pre>\n<pre>See also:\r\n <a href=#LSet(=)>Set(=)<\/a><\/pre>\n<li>\n<h3><a name=LStringJoin (\/\/)>StringJoin (\/\/)<\/a><\/h3>\n<pre>a \/\/ b converts a and b to character-strings, then join them.<\/pre>\n<pre>See also:\r\n <a href=#LStringJoin>StringJoin<\/a><\/pre>\n<li>\n<h3><a name=LSubtractFrom(-=)>SubtractFrom(-=)<\/a><\/h3>\n<pre>a-=b is equivalent to a=a-b .<\/pre>\n<li>\n<h3><a name=LTagSet(\/:)>TagSet(\/:)<\/a><\/h3>\n<pre>symb\/:lhs = rhs sets rhs to lhs, associated with symbol symb. symb\/:lhs := rhs sets rhs to lhs unevaluated,\r\nassociated with symbol symb. symb\/:lhs =. unsets lhs, associated with symbol symb.<\/pre>\n<li>\n<h3><a name=LTimes(*)>Times(*)<\/a><\/h3>\n<pre>a * b returns the product of a and b. If one of a or b is a list, or both are lists with same size,\r\nreturns a list of element-wise results.<\/pre>\n<li>\n<h3><a name=LTimesBy(*=)>TimesBy(*=)<\/a><\/h3>\n<pre>a*=b is equivalent to a=a*b .<\/pre>\n<li>\n<h3><a name=LUnequal(<>)>Unequal(<>)<\/a><\/h3>\n<pre>a <> b returns True(==1) if a and b are both Real with different values or a String with different\r\nlength or values. If one of a or b is a list, or both are lists with same size, returns a list of\r\nelement-wise results.<\/pre>\n<li>\n<h3><a name=LUnsameQ(<=>)>UnsameQ(<=>)<\/a><\/h3>\n<pre>a <=> b returns True(==1) if a and b have the different types or different values. False(==0) otherwise.<\/pre>\n<li>\n<h3><a name=LUnset(=.)>Unset(=.)<\/a><\/h3>\n<pre>a=. clears the definition assigned to a.<\/pre>\n<pre>See also:\r\n Clear<\/pre>\n<\/ul>\n<h3><a name=LELSE>ELSE<\/a><\/h3>\n<pre>Usage: IF expr1 body1 [ELSEIF expr2 body2 [ELSEIF ..]] [ELSE body3] ENDIF\r\n\r\nThis is a FORTRAN77 like IF-structure. If the expression expr1 is True(==1) or nonzero, executes\r\ncommands in body1. If it is False(==0), skip commands until ELSE, ELSEIF or ENDIF appears at the\r\nsame level of the IF-structure, and executes commands after ELSE or ENDIF, or executes the ELSEIF\r\ncommand. If expr1 is not a real number, an error message is printed and ignores the command line.<\/pre>\n<pre>See also:\r\n If <a href=#LELSEIF>ELSEIF<\/a> <a href=#LENDIF>ENDIF<\/a><\/pre>\n<h3><a name=LELSEIF>ELSEIF<\/a><\/h3>\n<pre>Usage: IF expr1 body1 [ELSEIF expr2 body2 [ELSEIF ..]] [ELSE body3] ENDIF\r\n\r\nThis is a FORTRAN77 like IF-structure. If the expression expr1 is True(==1) or nonzero, executes\r\ncommands in body1. If it is False(==0), skip commands until ELSE, ELSEIF or ENDIF appears at the\r\nsame level of the IF-structure, and executes commands after ELSE or ENDIF, or executes the ELSEIF\r\ncommand. If expr1 is not a real number, an error message is printed and ignores the command line.<\/pre>\n<pre>See also:\r\n <a href=#LIF>IF<\/a> <a href=#LELSE>ELSE<\/a> <a href=#LENDIF>ENDIF<\/a><\/pre>\n<h3><a name=LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a><\/h3>\n<pre>Usage: (1) EMIT\r\n       (2) EMIT dp\r\n\r\n(1) EMIT calculates the closed orbit, the normal coordinate, and the equilibrium emittance assuming the current beam line is a posi\r\ntron ring. One of EMITTANCE(EMIT), the Emittance[] function, or the EMIT command in the MAIN level are necessary to be done in prio\r\nr to multi-turn tracking. See multi-turn-tracking.\r\n\r\n(2) EMIT dp, where dp is |df_rf\/f_rf|\/(alpha_p == momentum compaction), does EMIT for five rf frequencies:\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_199.svg\" \/>\r\n\r\nthen prints out a table of the dependences of various quantities on the frequency shift.\r\n\r\n   The results of EMITTANCE(EMIT) are affected by flags COD, RADCOD, RFSW, INTRA, WSPAC, EMIOUT,\r\nCODPLOT and special-variables MOMENTUM, CHARGE, FSHIFT, MINCOUP, PBUNCH. The flag TRPT or RING affects\r\nonly Emittance[], as EMITTANCE(EMIT) automatically set RING.\r\n   EMITTANCE(EMIT) returns the equilibrium emittances in variables EMITX, EMITY, EMITZ, and the equilibrium\r\nbunch length in SIGZ, the relative momentum spread in SIGE, and the longitudinal equilibrium position\r\nDTSYNCH. \r\n\r\n   The map used in EMIT is slightly different from that used in the tracking. For instance, the edge\r\nangle of a bend is approximated by a thin quad. If the edge angle is large and the curvature is small,\r\nEMIT may give a wrong answer. This will be corrected in near future.<\/pre>\n<pre>See also:\r\n <a href=#Lmulti-turn-tracking>multi-turn-tracking<\/a> <a href=#Lextended-Twiss-parameters>extended-Twiss-parameters<\/a> <a href=#LCOD>COD<\/a> <a href=#LRADCOD>RADCOD<\/a>\r\n <a href=#LRFSW>RFSW<\/a> <a href=#LINTRA>INTRA<\/a> <a href=#LEMIOUT>EMIOUT<\/a> <a href=#LWSPAC>WSPAC<\/a> <a href=#LCODPLOT>CODPLOT<\/a> <a href=#LTRPT>TRPT<\/a> <a href=#LMOMENTUM>MOMENTUM<\/a> <a href=#LCHARGE>CHARGE<\/a> <a href=#LFSHIFT>FSHIFT<\/a>\r\n <a href=#LMINCOUP>MINCOUP<\/a> <a href=#LPBUNCH>PBUNCH<\/a> <a href=#LEMITX>EMITX<\/a> <a href=#LEMITY>EMITY<\/a> <a href=#LEMITZ>EMITZ<\/a> <a href=#LSIGE>SIGE<\/a> <a href=#LSIGZ>SIGZ<\/a> <a href=#LDTSYNCH>DTSYNCH<\/a> <a href=#LEmittance>Emittance<\/a>\r\n <a href=#Lequilibrium-beam-envelope>equilibrium-beam-envelope<\/a><\/pre>\n<h3><a name=LEND>END<\/a><\/h3>\n<pre>Closes the current output-stream and set the output stream to the standard output(6). It also suspends\r\nall the input streams and switches to the standard input(5). Since this command affects all input\r\nand output streams, you may consider to use TERMINATE(TERM) or CLOSE(CLO) to suspend or close them\r\nselectively.<\/pre>\n<pre>See also:\r\n <a href=#LTERMINATE(TERM)>TERMINATE(TERM)<\/a> <a href=#LCLOSE(CLO)>CLOSE(CLO)<\/a> <a href=#LINPUT(IN)>INPUT(IN)<\/a> <a href=#LREAD>READ<\/a> <a href=#LOUTPUT(OUT)>OUTPUT(OUT)<\/a>\r\n <a href=#LAPPEND(APP)>APPEND(APP)<\/a><\/pre>\n<h3><a name=LENDIF>ENDIF<\/a><\/h3>\n<pre>Usage: IF expr1 body1 [ELSEIF expr2 body2 [ELSEIF ..]] [ELSE body3] ENDIF\r\n\r\nThis is a FORTRAN77 like IF-structure. If the expression expr1 is True(==1) or nonzero, executes\r\ncommands in body1. If it is False(==0), skip commands until ELSE, ELSEIF or ENDIF appears at the\r\nsame level of the IF-structure, and executes commands after ELSE or ENDIF, or executes the ELSEIF\r\ncommand. If expr1 is not a real number, an error message is printed and ignores the command line.<\/pre>\n<pre>See also:\r\n <a href=#LIF>IF<\/a> <a href=#LELSE>ELSE<\/a> <a href=#LELSEIF>ELSEIF<\/a><\/pre>\n<h3><a name=LEXECUTE(EXEC)>EXECUTE(EXEC)<\/a><\/h3>\n<pre>Usage: EXEC character-string-expression\r\n\r\nexecutes the character-string-expression as FFS commands.<\/pre>\n<pre>See also:\r\n <a href=#Lexpression>expression<\/a> <a href=#LFFS>FFS<\/a> <a href=#LToExpression>ToExpression<\/a><\/pre>\n<h3><a name=LEXPAND>EXPAND<\/a><\/h3>\n<pre> EXPAND distributes all variable keys to each corresponding components. Individual deviations (machine\r\nerrors) are cleared.<\/pre>\n<pre>See also:\r\n <a href=#LGO>GO<\/a> <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a> <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a><\/pre>\n<h3><a name=Lflags>flags<\/a><\/h3>\n<pre>Usage: [NO]flag\r\n\r\nturns the flag on. If NO is prepended to flag, the flag is turned off. Some flags have antonym which\r\nworks in the opposite way. Flags can be accessed in the function-syntax with the form ?flag, which\r\nreturns True (=1) when the flag is on, or False (=0) otherwise. Some flags can be accessed by the\r\nON\/OFF commands at the MAIN level.\r\n Status of all flags are displayed by the STATUS(STAT) command.<\/pre>\n<pre>See also:\r\n <a href=#LSTATUS(STAT)>STATUS(STAT)<\/a> <a href=#LPatternTest(?)>PatternTest(?)<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=LABSW>ABSW<\/a><\/h3>\n<pre>ABSW or NORELW sets the weights of variable elements independent from their values in the matching.\r\nOtherwise they are weighted relatively.<\/pre>\n<pre>See also:\r\n <a href=#LRELW>RELW<\/a><\/pre>\n<li>\n<h3><a name=LBIPOL>BIPOL<\/a><\/h3>\n<pre>BIPOL or NOUNIPOL allows the change of sign of the value of the element during the matching. It affects\r\nthe default keywords of all elements. This is overridden by MIN, MAX specification or VariableRange\r\nof each element.<\/pre>\n<pre>See also:\r\n <a href=#LUNIPOL>UNIPOL<\/a> <a href=#Ldefault-keyword>default-keyword<\/a> <a href=#Lset-value-of-element>set-value-of-element<\/a> <a href=#LVariableRange>VariableRange<\/a>\r\n<\/pre>\n<li>\n<h3><a name=LCALC4D>CALC4D<\/a><\/h3>\n<pre>If CALC4D is on, the optics calculation in CAL and GO performs a 4x5 calculation (4D + dispersion).\r\nThe antonyms is CALC6D. The Default is CALC4D.<\/pre>\n<pre>See also:\r\n <a href=#LCALC6D>CALC6D<\/a> <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a> <a href=#LGO>GO<\/a><\/pre>\n<li>\n<h3><a name=LCALC6D>CALC6D<\/a><\/h3>\n<pre>If CALC6D is on, the optics calculation in CAL and GO performs full 6D calculation, which may takes\r\nRADCOD into account. The antonyms is CALC4D. The Default is CALC4D.<\/pre>\n<pre>See also:\r\n <a href=#LCALC4D>CALC4D<\/a> <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a> <a href=#LGO>GO<\/a><\/pre>\n<li>\n<h3><a name=LCELL>CELL<\/a><\/h3>\n<pre>CELL or NOINS sets the periodic condition in calculating the optical-functions.<\/pre>\n<pre>See also:\r\n <a href=#LINS>INS<\/a> <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a> <a href=#LGO>GO<\/a> <a href=#Loptical-functions>optical-functions<\/a> <a href=#Lmatching-function-commands>matching-function-commands<\/a>\r\n<\/pre>\n<li>\n<h3><a name=LCMPLOT>CMPLOT<\/a><\/h3>\n<pre>CMPLOT enables the shift of the center of mass at the beginning of the tracking. This is almost obsolete.<\/pre>\n<li>\n<h3><a name=LCOD>COD<\/a><\/h3>\n<pre>COD turns on finding the closed-orbit in the emittance calculation. Accessible in MAIN level.<\/pre>\n<pre>See also:\r\n <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a><\/pre>\n<li>\n<h3><a name=LCODPLOT>CODPLOT<\/a><\/h3>\n<pre>CODPLOT lets the emittance calculation return the information on the closed-orbit, extended Twiss\r\nparameters, and the beam size along the beam line into the FFS optics buffer, which can be shown\r\nby DISPLAY(DISP) or DRAW commands as well as Twiss and OpticsPlot functions.<\/pre>\n<pre>See also:\r\n <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a> <a href=#LDRAW>DRAW<\/a> <a href=#LWSPAC>WSPAC<\/a> <a href=#LRADTAPER>RADTAPER<\/a><\/pre>\n<li>\n<h3><a name=LCONV>CONV<\/a><\/h3>\n<pre>CONV is a flag set by the CALCULATE(CAL) or GO commands. It becomes True when MatchingResidual is\r\nless than CONVERGENCE.<\/pre>\n<pre>See also:\r\n <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a> <a href=#LGO>GO<\/a> <a href=#LMatchingResidual>MatchingResidual<\/a> <a href=#LCONVERGENCE>CONVERGENCE<\/a><\/pre>\n<li>\n<h3><a name=LCONVCASE>CONVCASE<\/a><\/h3>\n<pre>When CONVCASE is on, FFS command line parser converts the input characters to the upper case.(Default\r\non) CONVCASE actions for the element names and patterns CAN be overridden by PRSVCASE flag.<\/pre>\n<pre>See also:\r\n <a href=#LPRSVCASE>PRSVCASE<\/a><\/pre>\n<li>\n<h3><a name=LDAMPONLY>DAMPONLY<\/a><\/h3>\n<pre>DAMPONLY is the antonym of FLUC.<\/pre>\n<pre>See also:\r\n <a href=#LFLUC>FLUC<\/a><\/pre>\n<li>\n<h3><a name=LDAPERT>DAPERT<\/a><\/h3>\n<pre>DAPERT enables the DAPERT procedure in the multi-turn tracking to obtain the dynamic aperture diagram.\r\nAccessible in the MAIN level.<\/pre>\n<pre>See also:\r\n <a href=#Lfunctions>functions<\/a> <a href=#LDynamicApertureSurvey>DynamicApertureSurvey<\/a><\/pre>\n<li>\n<h3><a name=LDIFFRES>DIFFRES<\/a><\/h3>\n<pre>\r\nIn the case of CELL, if the total tune deviates across a difference resonance, it is counted as unstable.\r\nThe default is NODIFFRES.<\/pre>\n<pre>See also:\r\n <a href=#LINTRES>INTRES<\/a> <a href=#LHALFRES>HALFRES<\/a> <a href=#LSUMRES>SUMRES<\/a> <a href=#LSTABLE>STABLE<\/a><\/pre>\n<li>\n<h3><a name=LECHO>ECHO<\/a><\/h3>\n<pre>ECHO enables the echo of the main input in the MAIN level.<\/pre>\n<li>\n<h3><a name=LEMIOUT>EMIOUT<\/a><\/h3>\n<pre>EMIOUT turns on the extended output of emittance calculation.\r\nAccessible in the MAIN level.<\/pre>\n<pre>See also:\r\n <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a><\/pre>\n<li>\n<h3><a name=LFFSPRMPT>FFSPRMPT<\/a><\/h3>\n<pre>When FFSPRMPT is off(default) the input prompt is In[n]:= , where n is $Line+1. Otherwise the prompt\r\nis the traditional FFS prompt, showing the FIT location and the DISP range.<\/pre>\n<pre>See also:\r\n <a href=#L$Line>$Line<\/a> <a href=#LLOG>LOG<\/a><\/pre>\n<li>\n<h3><a name=LFIXSEED>FIXSEED<\/a><\/h3>\n<pre>FIXSEED or NOMOVESEED disables the change of the seed of the random number generator after the particle\r\ntracking.<\/pre>\n<pre>See also:\r\n <a href=#LMOVESEED>MOVESEED<\/a> <a href=#LMEASURE(MEA)>MEASURE(MEA)<\/a> <a href=#LSEED>SEED<\/a><\/pre>\n<li>\n<h3><a name=LFLUC>FLUC<\/a><\/h3>\n<pre>FLUC or NODAMPONLY enables the diffusion due to synchrotron radiation in the particle tracking. Otherwise\r\nonly the damping is enabled when RAD is ON.<\/pre>\n<pre>See also:\r\n <a href=#LDAMPONLY>DAMPONLY<\/a> <a href=#LRAD>RAD<\/a> <a href=#LRADCOD>RADCOD<\/a><\/pre>\n<li>\n<h3><a name=LGAUSS>GAUSS<\/a><\/h3>\n<pre>GAUSS or NOUNIFORM sets the momentum distribution of the incoming beam to be Gaussian, otherwise\r\nuniform(square) distribution is assumed. It affects the beam size calculated by Twiss parameters.<\/pre>\n<pre>See also:\r\n <a href=#LUNIFORM>UNIFORM<\/a> <a href=#LMEASURE(MEA)>MEASURE(MEA)<\/a> <a href=#LBEAMSIZE(BEAM)>BEAMSIZE(BEAM)<\/a> <a href=#Lspecial-variables>special-variables<\/a>\r\n <a href=#LDP>DP<\/a><\/pre>\n<li>\n<h3><a name=LGEOCAL>GEOCAL<\/a><\/h3>\n<pre>When GEOCAL is on(default), the geometry of the beam line is always updated by CALCULATE(CAL) or\r\nGO commands using the current values of components. The coordinate transformation by SOL is also\r\nupdated. When GEOCAL is off, the geometry is never updated. It is useful to simulate misalignments\r\nwithin a solenoid, etc.<\/pre>\n<pre>See also:\r\n <a href=#LGEOFIX>GEOFIX<\/a> <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a> <a href=#LGO>GO<\/a> <a href=#LSOL>SOL<\/a><\/pre>\n<li>\n<h3><a name=LGEOFIX>GEOFIX<\/a><\/h3>\n<pre>GEOFIX is the antonym of GEOCAL.<\/pre>\n<pre>See also:\r\n <a href=#LGEOCAL>GEOCAL<\/a><\/pre>\n<li>\n<h3><a name=LHALFRES>HALFRES<\/a><\/h3>\n<pre>In the case of CELL, if the total tune deviates across a half-integer resonance, or the traces is\r\nless than -2, it is counted as unstable (~?STABLE). Otherwise the optics is recognized as STABLE.\r\nThe default is HALFRES.<\/pre>\n<pre>See also:\r\n <a href=#LINTRES>INTRES<\/a> <a href=#LSUMRES>SUMRES<\/a> <a href=#LDIFFRES>DIFFRES<\/a> <a href=#LSTABLE>STABLE<\/a><\/pre>\n<li>\n<h3><a name=LIDEAL>IDEAL<\/a><\/h3>\n<pre>IDEAL or NOREAL inhibits to use the component-specific deviations in the optics calculation.<\/pre>\n<pre>See also:\r\n <a href=#LREAL>REAL<\/a> <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a> <a href=#LGO>GO<\/a><\/pre>\n<li>\n<h3><a name=LINS>INS<\/a><\/h3>\n<pre>INS is the antonym of CELL.<\/pre>\n<pre>See also:\r\n <a href=#LCELL>CELL<\/a><\/pre>\n<li>\n<h3><a name=LINTRA>INTRA<\/a><\/h3>\n<pre>INTRA turns on the calculation of intra-beam scattering in the emittance calculation. Accessible\r\nin MAIN level.<\/pre>\n<pre>See also:\r\n <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LEmittance>Emittance<\/a> <a href=#Lequilibrium-beam-envelope>equilibrium-beam-envelope<\/a>\r\n<\/pre>\n<li>\n<h3><a name=LINTRES>INTRES<\/a><\/h3>\n<pre>In the case of CELL, if the total tune deviates across an integer resonance, or the trace is larger\r\nthan 2, it is counted as unstable (~?STABLE). Otherwise the optics is recognized as STABLE. The default\r\nis INTRES.<\/pre>\n<pre>See also:\r\n <a href=#LHALFRES>HALFRES<\/a> <a href=#LSUMRES>SUMRES<\/a> <a href=#LDIFFRES>DIFFRES<\/a> <a href=#LSTABLE>STABLE<\/a><\/pre>\n<li>\n<h3><a name=LJITTER>JITTER<\/a><\/h3>\n<pre>JITTER or NOQUIET allows jitter of the center-of-mass of the incoming beam in the case of TRPT. Otherwise\r\nthe center-of-mass statistically fluctuates depending on the number of particles.<\/pre>\n<pre>See also:\r\n <a href=#LQUIET>QUIET<\/a> <a href=#LMEASURE(MEA)>MEASURE(MEA)<\/a> <a href=#LTRPT>TRPT<\/a><\/pre>\n<li>\n<h3><a name=LLOG>LOG<\/a><\/h3>\n<pre>LOG enables the echo of all inputs in the MAIN level. Also suppresses the prompt in FFS.<\/pre>\n<pre>See also:\r\n <a href=#LECHO>ECHO<\/a><\/pre>\n<li>\n<h3><a name=LLOSSMAP>LOSSMAP<\/a><\/h3>\n<pre>If LOSSMAP is on, TrackParticles returns the location and turn where the particle lost is detected,\r\nin the 7\/9th and 8\/10th element of the result, for  NOPOL\/POL, respectively. The default is NOLOSSMAP<\/pre>\n<pre>See also:\r\n <a href=#LTrackParticles>TrackParticles<\/a> <a href=#LPOL>POL<\/a><\/pre>\n<li>\n<h3><a name=LLWAKE>LWAKE<\/a><\/h3>\n<pre>LWAKE turns on optics calculation with Longitudinal WakeFunction<\/pre>\n<pre>See also:\r\n <a href=#LWakeFunction>WakeFunction<\/a> <a href=#LTrackParticles>TrackParticles<\/a> <a href=#LInitialOrbits>InitialOrbits<\/a> <a href=#LTWAKE>TWAKE<\/a><\/pre>\n<li>\n<h3><a name=LMOVESEED>MOVESEED<\/a><\/h3>\n<pre>MOVESEED is the antonym of FIXSEED.<\/pre>\n<pre>See also:\r\n <a href=#LFIXSEED>FIXSEED<\/a><\/pre>\n<li>\n<h3><a name=LPHOTONS>PHOTONS<\/a><\/h3>\n<pre>When PHOTONS is ON (default is OFF), with RAD and FLUC, TrackParticles generates a list of all photons\r\nradiated through the tracking. The list is assigned to a symbol PhotonList.<\/pre>\n<pre>See also:\r\n <a href=#LPhotonList>PhotonList<\/a> <a href=#LTrackParticles>TrackParticles<\/a> <a href=#LRAD>RAD<\/a> <a href=#LFLUC>FLUC<\/a><\/pre>\n<li>\n<h3><a name=LPOL>POL<\/a><\/h3>\n<pre>POL turns on spin tracking and the calculation of equilibrium polarization in EMIT\/Emittance[].<\/pre>\n<pre>See also:\r\n <a href=#LRADPOL>RADPOL<\/a> <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LEmittance>Emittance<\/a> <a href=#LTrackParticles>TrackParticles<\/a><\/pre>\n<li>\n<h3><a name=LPRSVCASE>PRSVCASE<\/a><\/h3>\n<pre>When PRSVCASE is on, FFS command line parser preserves the input characters for the element names\r\nand patterns.(Default off)<\/pre>\n<pre>See also:\r\n <a href=#LCONVCASE>CONVCASE<\/a><\/pre>\n<li>\n<h3><a name=LPSPAC>PSPAC<\/a><\/h3>\n<pre>When on, performs space-charge simulation in a \"Particle-In-Cell\" method. PSPAC is effective in tracking\r\nonly.\r\n   Do not confuse PSPAC with SPAC\/WSPAC.<\/pre>\n<pre>See also:\r\n PSPACNX PSPACNY PSPACNZ PSPACDX PSPACDY PSPACDZ<\/pre>\n<li>\n<h3><a name=LQUIET>QUIET<\/a><\/h3>\n<pre>QUIET is the antonym of JITEER.<\/pre>\n<pre>See also:\r\n <a href=#LJITTER>JITTER<\/a><\/pre>\n<li>\n<h3><a name=LRAD>RAD<\/a><\/h3>\n<pre>RAD turns on the synchrotron radiation in the particle-tracking. Accessible in the MAIN level.<\/pre>\n<pre>See also:\r\n <a href=#LRADCOD>RADCOD<\/a> <a href=#LFLUC>FLUC<\/a><\/pre>\n<li>\n<h3><a name=LRADCOD>RADCOD<\/a><\/h3>\n<pre>RADCOD turns on the energy loss due to synchrotron radiation at the closed-orbit in the emittance\r\ncalculation. Also turns off the implicit acceleration in the tracking to compensate the energy loss\r\nautomatically, in the case that TRPT is ON. Accessible in MAIN level.<\/pre>\n<pre>See also:\r\n <a href=#LRAD>RAD<\/a> <a href=#LFLUC>FLUC<\/a> <a href=#LTRPT>TRPT<\/a><\/pre>\n<li>\n<h3><a name=LRADLIGHT>RADLIGHT<\/a><\/h3>\n<pre>When RADLIGHT is on, the function TrackParticles returns a list of trajectories which are used to\r\ncalculate the synchrotron radiation field.<\/pre>\n<pre>See also:\r\n <a href=#LTrackParticles>TrackParticles<\/a> <a href=#LRadiationField>RadiationField<\/a> <a href=#LRadiationSpectrum>RadiationSpectrum<\/a><\/pre>\n<li>\n<h3><a name=LRADPOL>RADPOL<\/a><\/h3>\n<pre>If POL is on, RADPOL turns on Sokolov-Ternov effect in tracking.<\/pre>\n<pre>See also:\r\n <a href=#LPOL>POL<\/a><\/pre>\n<li>\n<h3><a name=LRADTAPER>RADTAPER<\/a><\/h3>\n<pre> Scales all magnets except for solenoids according to the local momentum (DDP) of the closed orbit.\r\nIt uses the average of DDPs at the entrance and the exit. For tracking, RADCOD and ( CAL\/GO with\r\nCALC6D or EMIT(Emittance[]) ) is necessary. CAL\/GO with CALC4D will clear the necessary information\r\nfor tracking with RADTAPER.\r\n RADTAPER sets the momentum deviation of the closed orbit to DP0, which is an arbitrary choice of\r\nan under-deterministic problem of tapering. Thus the difference in the path length around the ring\r\nis adjusted by automatically updating FSHIFT.<\/pre>\n<pre>See also:\r\n <a href=#LRADCOD>RADCOD<\/a> <a href=#LCALC6D>CALC6D<\/a> <a href=#LCALC4D>CALC4D<\/a> <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a> <a href=#LGO>GO<\/a>\r\n <a href=#LDP0>DP0<\/a> <a href=#LFSHIFT>FSHIFT<\/a><\/pre>\n<li>\n<h3><a name=LREAL>REAL<\/a><\/h3>\n<pre>REAL is the antonym of IDEAL.<\/pre>\n<pre>See also:\r\n <a href=#LIDEAL>IDEAL<\/a><\/pre>\n<li>\n<h3><a name=LRELW>RELW<\/a><\/h3>\n<pre>RELW is the antonym of ABSW.<\/pre>\n<pre>See also:\r\n <a href=#LABSW>ABSW<\/a><\/pre>\n<li>\n<h3><a name=LRFSW>RFSW<\/a><\/h3>\n<pre>RFSW turns on the acceleration by CAVI and TCAVI element in the particle-tracking and the emittance\r\ncalculation. Accessible in MAIN level, but FFS always turns RFSW on at the beginning of the session.<\/pre>\n<li>\n<h3><a name=LRING>RING<\/a><\/h3>\n<pre>RING is the antonym of TRPT.<\/pre>\n<pre>See also:\r\n <a href=#LTRPT>TRPT<\/a><\/pre>\n<li>\n<h3><a name=LSELFCOD>SELFCOD<\/a><\/h3>\n<pre>When on with WSPAC, in tracking, the space charge force is calculated relative to the center of mass\r\nof the current set of particles each time. Otherwise(default) it is calculated relative to the closed\r\norbit given by EMIT. SELFCOD is useful when the closed orbits given by EMIT and TRACK are different.<\/pre>\n<pre>See also:\r\n <a href=#LWSPAC>WSPAC<\/a><\/pre>\n<li>\n<h3><a name=LSORG>SORG<\/a><\/h3>\n<pre>SORG sets the origin of S (design orbit length) at the location set by ORG.<\/pre>\n<pre>See also:\r\n <a href=#LORG>ORG<\/a><\/pre>\n<li>\n<h3><a name=LSPAC>SPAC<\/a><\/h3>\n<pre>When SPAC is on, tracking is done with space charge effect. The actual number of particles in the\r\nbeam and the number of macro particles are given by PBUNCH and NP, respectively. This calculation\r\nassumes a cylindrical symmetry of the chamber whose radius is given by RADIUS of DRIFT and MULT elements.\r\nIf RADIUS is positive, an aperture is also set at RADIUS to make particle loss. If RADIUS is zero,\r\nno space charge calculation is done. If RADIUS is negative, no space charge effect is taken, but\r\nthe aperture is set at -RADIUS.\r\n   Do not confuse SPAC with WSPAC.<\/pre>\n<pre>See also:\r\n <a href=#LNP>NP<\/a> <a href=#LPBUNCH>PBUNCH<\/a> <a href=#LWSPAC>WSPAC<\/a><\/pre>\n<li>\n<h3><a name=LSTABLE>STABLE<\/a><\/h3>\n<pre>STABLE is a flag set by the CALCULATE(CAL) or GO commands in the case of CELL. It becomes True when\r\nthe closed orbit is found and the optics is stable in both x and y.<\/pre>\n<pre>See also:\r\n <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a> <a href=#LGO>GO<\/a> <a href=#LINTRES>INTRES<\/a> <a href=#LHALFRES>HALFRES<\/a> <a href=#LSUMRES>SUMRES<\/a> <a href=#LDIFFRES>DIFFRES<\/a><\/pre>\n<li>\n<h3><a name=LSUMRES>SUMRES<\/a><\/h3>\n<pre>In the case of CELL, if the total tune deviates across a sum resonance, it is counted as unstable.\r\nThe default is SUMRES.<\/pre>\n<pre>See also:\r\n <a href=#LINTRES>INTRES<\/a> <a href=#LHALFRES>HALFRES<\/a> <a href=#LDIFFRES>DIFFRES<\/a> <a href=#LSTABLE>STABLE<\/a><\/pre>\n<li>\n<h3><a name=LSUS>SUS<\/a><\/h3>\n<pre>If OFF, SUSPEND(SUSP) and END commands have no action. The default is ON.<\/pre>\n<pre>See also:\r\n <a href=#LSUSPEND(SUSP)>SUSPEND(SUSP)<\/a> <a href=#LEND>END<\/a><\/pre>\n<li>\n<h3><a name=LTRPT>TRPT<\/a><\/h3>\n<pre>TRPT or NORING declares that the beam line is a transport line, not a part of a storage ring. The\r\nnominal momentum be changed in the beam line due to acceleration. The default momentum distribution\r\nbecomes uniform distribution. The default is RING or NOTRPT. TRPT affects Emittance[] to ignore equilibrium\r\ncalculation for a transport line.<\/pre>\n<pre>See also:\r\n <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a> <a href=#LRING>RING<\/a> <a href=#LUNIFORM>UNIFORM<\/a> <a href=#LGAUSS>GAUSS<\/a><\/pre>\n<li>\n<h3><a name=LTWAKE>TWAKE<\/a><\/h3>\n<pre>TWAKE turns on optics calculation with Transverse WakeFunction<\/pre>\n<pre>See also:\r\n <a href=#LWakeFunction>WakeFunction<\/a> <a href=#LTrackParticles>TrackParticles<\/a> <a href=#LInitialOrbits>InitialOrbits<\/a> <a href=#LLWAKE>LWAKE<\/a><\/pre>\n<li>\n<h3><a name=LUNIFORM>UNIFORM<\/a><\/h3>\n<pre>UNIFORM is the antonym of GAUSS. It assumes the momentum distribution to be a uniform(square) within\r\n+-DP.<\/pre>\n<pre>See also:\r\n <a href=#LGAUSS>GAUSS<\/a> <a href=#LTRPT>TRPT<\/a><\/pre>\n<li>\n<h3><a name=LUNIPOL>UNIPOL<\/a><\/h3>\n<pre>UNIPOL is the antonym of BIPOL.<\/pre>\n<pre>See also:\r\n <a href=#LBIPOL>BIPOL<\/a><\/pre>\n<li>\n<h3><a name=LUNSTABLE>UNSTABLE<\/a><\/h3>\n<pre>UNSTABLE is the antonym of STABLE.<\/pre>\n<pre>See also:\r\n <a href=#LSTABLE>STABLE<\/a><\/pre>\n<li>\n<h3><a name=LWSPAC>WSPAC<\/a><\/h3>\n<pre>When on, performs space-charge simulation in a \"strong-weak\" mode. The beam size through the beam\r\nline is to be calculated by EMIT with CODPLOT. The space-charge force is calculated assuming Gaussian\r\ndistribution in all dimensions, and particles\/bunch given by PBUNCH. WSPAC is effective in optics\r\nand emittance calculations and tracking.\r\n   Do not confuse WSPAC with SPAC.<\/pre>\n<pre>See also:\r\n <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LPBUNCH>PBUNCH<\/a> <a href=#LCODPLOT>CODPLOT<\/a> <a href=#LMINCOUP>MINCOUP<\/a> <a href=#LSELFCOD>SELFCOD<\/a> <a href=#LSPAC>SPAC<\/a> <a href=#Lequilibrium-beam-envelope>equilibrium-beam-envelope<\/a>\r\n<\/pre>\n<\/ul>\n<h3><a name=Lfunctions>functions<\/a><\/h3>\n<pre>FFS functions:\r\n\r\nConstants:\r\n   Degree GoldenRatio I INF* Infinity NaN* Pi SpeedOfLight\r\nElementary-functions:\r\n   ArcCos ArcCosh ArcSin ArcSinh ArcTan ArcTanh Cos Cosh Exp Log Sin Sinh\r\n   Sqrt Tan Tanh\r\nSpecial-functions:\r\n   BesselI BesselJ BesselK BesselY BesselJZero Erf Erfc Factorial \r\n   Gamma LogGamma LogGamma1 GammaRegularized GammaRegularizedQ*\r\n   GammaRegularizedP* GaussianCoulomb* GaussianCoulombU*\r\n   GaussianCoulombFitted* LegendreP*\r\nNumerical-functions:\r\n   Abs Ceiling Floor Max Min MinMax* Mod Negative NonNegative Positive\r\n   Round Sign FractionalPart\r\nMatrix-operations:\r\n   Det Eigensystem IdentityMatrix Inner LinearSolve Outer SingularValues*\r\n   Transpose\r\nRandom-number:\r\n   GaussRandom* Random* SeedRandom\r\nComplex:\r\n   Arg Complex ComplexQ Conjugate Im Re\r\nRational:\r\n   Rational FromRational ContinuedFraction FromContinuedFraction SmallPrime\r\n   Numerator Denominator\r\nFourier-Transformation:\r\n   Fourier InverseFourier\r\nData-Manipulation:\r\n   FindRoot Fit* NIntegrate* PolynomialFit* Spline*\r\nCalculus:\r\n   D NIntegrate\r\nMinimization:\r\n   DownhillSimplex*\r\nList-manipulations:\r\n   Append Complement Delete Depth Difference* Dimensions Drop Extract Flatten\r\n   FlattenAt HeldPart Insert Intersection Join Length Part Partition Prepend\r\n   Product Range ReplacePart Rest Reverse RotateLeft RotateRight Select \r\n   Sort Sum Take Table Union\r\nCharacter-strings:\r\n   FromCharacterCode CharacterPosition Characters DigitQ LetterQ StringDrop\r\n   StringFill* StringInsert StringLength StringPosition StringTrim*\r\n   Symbol SymbolName ToCharacterCode ToLowerCase ToUpperCase ToExpression\r\nFunctional-Operations:\r\n   Apply Cases Count DeleteCases Identity FixedPoint* FixedPointList*\r\n   Fold Function Level Map MapAll MapAt MapIndexed MapThread Nest Position\r\n   Replace Scan ScanThread* SelectCases* SwitchCases* Thread\r\nObject-oriented programing and context:\r\n   Begin BeginPackage Class* End EndPackage\r\nFlow-Control:\r\n   Break Catch Check Continue Do For Goto If Label Return Switch Throw Which\r\n   While\r\nTests:\r\n   AtomQ ComplexQ DirectoryQ* EvenQ FileQ* MatchQ MatrixQ MemberQ NearlySameQ* \r\n   Negative NonNegative NumberQ OddQ Order Positive RealQ StringQ* VectorQ\r\n   BoundQ* FBoundQ*\r\nInput\/Output:\r\n   Close Flush* Get OpenRead OpenWrite OpenAppend Print Put Read ReadString SeekFile*\r\n   Short* StringToStream Write WriteString\r\nFile System:\r\n   CopyDirectory CopyFile CreateDirectory DeleteDirectory DeleteFile\r\n   DirectoryName FileByteCount FileDate FileNames FileType\r\n   RenameDirectory RenameFile SetFileDate ToFileName\r\nScoping:\r\n   Block Module With*\r\nAttributes:\r\n   Attributes* Clear Evaluate Head Hold Literal Protect ReleaseHold\r\n   SetAttributes* Unevaluated Unprotect\r\nGUI Widget:\r\n   Window* PanedWindow* Frame* LabelFrame* Canvas* TextLabel* TextMessage*\r\n   Button* CheckButton* RadioButton* Menu* OptionMenu* MenuButton*\r\n   Entry* SpinBox* ListBox* ScrollBar* Scale* TextEditor*\r\nGraphics:\r\n   BeamPlot* ColumnPlot* HistoPlot* ListContourPlot ListDensityPlot \r\n   ListPlot Plot Show FitPlot* GeometryPlot* OpticsPlot* TkPhotoPutBlock*\r\nSystem Interface:\r\n   Directory Environment GetEnv* GetGID* GetPID* GetUID* ProcessStatus* \r\n   SetDirectory SetEnv* System* TemporaryName* MkSecureTemp* RealPath*\r\nMultiprocessing:\r\n   BiPipe* Fork* OpenShared* Shared* Wait*\r\nUtilities:\r\n   Date DateString* Definition* FromDate* ToDate ToDateString* Pause\r\n   MemoryCheck* Message Off On Sleep TimeUsed Timing TracePrint\r\n\r\nFunctions listed above work basically in the same way as Mathematica's \r\nexcept those marked by *.\r\n\r\nFFS-dedicated-functions:\r\n   BeamMatrix CalculateOptics DynamicApertureSurvey Element Emittance FFS\r\n   FitValue FitWeight GeoBase LINE OptimizeOptics OrbitGeo RadiationField\r\n   RadiationSpectrum SymplecticJ SetElement TrackParticles Twiss VariableRange\r\n   SynchroBetaEmittance TouschekLifetime WakeFunction\r\nBeam-line-functions:\r\n   BeamLine BeamLineName ExtractBeamLine PrintBeamLine WriteBeamLine<\/pre>\n<pre>See also:\r\n <a href=#Lexpression>expression<\/a> <a href=#Lconstants>constants<\/a> <a href=#Lphysical-constants>physical-constants<\/a> <a href=#Lbeam-line-functions>beam-line-functions<\/a>\r\n<\/pre>\n<ul>\n<li>\n<h3><a name=LData-Manipulation>Data-Manipulation<\/a><\/h3>\n<pre><\/pre>\n<ul>\n<li>\n<h3><a name=LFit>Fit<\/a><\/h3>\n<pre>Usage: Fit[data, expr, var, \r\n         {par1, ini1, [{min1, max1}] }, .. ,{parn, inin, [{minn, maxn}]},\r\n         [options..] ]\r\n\r\nperforms a nonlinear fitting of data with an expression expr.\r\n\r\ndata: list of {xi,yi}, {xi,yi,dyi}, or {xi,yi,dxi,dyi}, where dxi and dyi\r\n      are the standard deviation of the i-th point.\r\nexpr: an expression containing var as the x-variable, and \r\n      parameters par1,..,parn explicitly. Use Evaluate[fun] if an implicit\r\n      expression is necessary.\r\nvar:  a symbol to express the x-axis variable.\r\npar:  parameter symbol to be varied in the fitting.\r\nini:  initial value of the parameter. It must be specified.\r\n(min, max}: optional range of parameter.\r\n\r\nFit returns the result as a list:\r\n\r\n{par1 -> v1, .., parn->vn, ChiSquare -> chisq, GoodnessOfFit -> good,\r\nConfidenceInterval -> {c1, .., cn}, ConvarianceMatrix -> cov},\r\n\r\nwhere v1,..,vn are the values of the parameters which minimizes chi-square, chisq is the resulting\r\nminimum value of the total chi-square (when no error is given for yi, variance is returned), good\r\nis a number given by GammaRegularized[(ndata-npara)\/2,chisq\/2] to represent the goodness of the fit,\r\nc1, .., cn are the estimated errors in parameters, and cov is the covariance matrix. A typical criterion\r\nof the goodness is (good > 0.1).\r\n\r\n   Options are\r\n\r\nMaxIterations        Maximum number of iterations.\r\nD                    If True (default), tries to use analytical derivative.\r\nCutoff               If nonzero, set the saturation point for each data as:\r\n\r\nchi-suare = Sum_i ( Min[Cutoff, Max[-Cutoff, (d_i - f_ i) \/ sigma_i]]^2 ) ,\r\n\r\n                     which is a sort of robust M-Estimates. By Cutoff, the fit\r\n                     tends to ignore tail data which are beyond Cutoff.\r\n                     If Cutoff is zero (default), it is ignored.<\/pre>\n<pre>See also:\r\n <a href=#LFitPlot>FitPlot<\/a><\/pre>\n<li>\n<h3><a name=LFitEmit>FitEmit<\/a><\/h3>\n<pre>Obtain the emittance, beta, alpha, etc. from data of particles x and px using FitGaussian.\r\n\r\n  FitEmit[x, px] ,\r\n\r\nwhere x and px are the lists of data of the particles in the phase space, returns a list\r\n\r\n  {{xmean, pxmean, alpha, beta, emittance},\r\n   {xmean, pxmean, alpha, beta, emittance}_conf},\r\n\r\nwhere the second component is the confidence intervals of the results.<\/pre>\n<pre>See also:\r\n <a href=#LFitGaussian>FitGaussian<\/a><\/pre>\n<li>\n<h3><a name=LFitGaussian>FitGaussian<\/a><\/h3>\n<pre>Performs Gaussian fit of 1D list data:\r\n\r\n  FitGaussian[data, [opt, ...]]\r\n\r\nreturns a list\r\n\r\n  {sigma, mean, {sigma_conf, mean_conf}, chisq} ,\r\n\r\nwhere sigma_conf and mean_conf are the confidence interval of the results sigma and mean, respectively.\r\nThe arguments opt... are options for Fit. If Plot -> True is specified as the option, a plot of the\r\nfitting will be made.<\/pre>\n<pre>See also:\r\n <a href=#LFit>Fit<\/a> <a href=#LFitEmit>FitEmit<\/a><\/pre>\n<li>\n<h3><a name=LNIntegrate>NIntegrate<\/a><\/h3>\n<pre>NIntegrate returns numerical integration of a Real or Complex\r\nfunction\r\n\r\nUsage:   NIntegrate[f, {x, x0, x1}, options]\r\n\r\nwhere f is a function containing Symbol x as the independent variable. The integral range is from\r\nx0 and x1. The function f must contain the symbol x explicitly.\r\n\r\nOptions           Default      Description\r\n-------------------------------------------------------------\r\nAccuracyGoal      1e-13        Relative accuracy\r\nInitialPoints     20           Number of initial points where\r\n                               the function is evaluated.<\/pre>\n<li>\n<h3><a name=LPolynomialFit>PolynomialFit<\/a><\/h3>\n<pre>Usage: PolynomialFit[data, n]\r\n\r\nperforms a 1D linear regression of data.\r\n\r\ndata: list of {xi,yi}\r\nn: the order of the polynomial\r\n\r\nFit returns the result as a list:\r\n\r\n{{c0, .., cn}, {Residual -> res}} ,\r\n\r\nwhere c0 .. cn are the coefficients of the fitted polynomial, y = c0 + c1 x + .. + cn x^n . Res is\r\nthe rms residual of the fit.<\/pre>\n<pre>See also:\r\n <a href=#LFitPlot>FitPlot<\/a><\/pre>\n<li>\n<h3><a name=LSpline>Spline<\/a><\/h3>\n<pre>Spline returns data for cubic-spline interpolation.\r\n\r\nUsage:   sp = Spline[list, [Derivative->{dy1,dy2}] ]\r\n\r\nwhere list contains data in the form as {{x1,y1}, ..} or {{x1,{y11, y12, ..}}, ..}.\r\n Complex number can be allowed for y, but not for x.\r\n\r\n This spline assumes y''=0 at the boundary, unless Derivative->{dy1,dy2} is specified to constrain\r\nthe derivative at each end to dy1 or dy2. They can be Null to unspecify the constraint at one of\r\nthe boundary. The resulting data of the spline is assigned sp as a SplineData object. Then one can\r\ncalculate the interpolated data by\r\n\r\n    sp[x]                     value of y at x.\r\n    Derivative[1][sp][x]      value of y' at x.\r\n    Derivative[2][sp][x]      value of y'' at x.\r\n    Integrate[sp[x],{x, x0, x1}]   integral of sp[x] from x0 to x1.\r\n\r\nExample:\r\n   sp=Spline[{{1,2},{3,5},{4,2},{5,7}}];\r\n   Plot[{sp[x],Derivative[1][sp][x],Derivative[2][sp][x],Integrate[sp[y],{y,1,#}]&[x]}, {x,1,5},\r\nFrameLabel->{\"x\"}, Thickness->2, Legend->{\"sp[x]\",\"sp'[x]\",\"sp''[x]\",\"Int sp[x]\"}];\r\n   Update[];\r\n\r\n<img decoding=\"async\" src=\"\/SAD\/SADHelp_img\/Spline.png\" align=\"middle\" width=540>\r\n<\/pre>\n<pre>See also:\r\n <a href=#Ldefining-functions>defining-functions<\/a> <a href=#LPlot>Plot<\/a> <a href=#LNIntegrate>NIntegrate<\/a><\/pre>\n<\/ul>\n<li>\n<h3><a name=LDownhillSimplex>DownhillSimplex<\/a><\/h3>\n<pre>Usage: DownhillSimplex[initial, f, options]\r\n\r\nminimizes a function f by the downhill simplex method, starting from an initial simplex initial.\r\n Suppose f is a function of n variables.   Then  initial is a list of n+1 elements, each of which\r\nis a list of the form\r\n\r\n   {f[vi], vi} ,\r\n\r\nwhere vi is a list of n values corresponding to each variable. The initial must be sorted in ascending\r\norder of f, i.e.,\r\n\r\n   initial=Sort[Map[{f[#],#}&,vlist]]\r\n\r\ngenerates initial from a list of variables vlist.\r\n   DownhillSimplex returns the final simplex in the same form as initial.\r\n\r\nOptions:\r\n   VariableRange -> {{min1 .. minn}, {max1 .. maxn}} gives the range of n\r\n      variables.   The default is -Infinity to Infinity for all variables.\r\n   MaxIteration -> maxi gives the limit of number of iterations.   The\r\n      default is Max[100, 10*(n+1)].\r\n   Output -> lfn sets the output file number for the intermediate results.\r\n      the default is 6 (stdout).\r\n   Tolerance -> tol sets the tolerance to judge the local minimum.\r\n      If (fmax-fmin)\/(abs(fmax)+abs(fmin)) becomes less than tol, the \r\n      iteration loop terminates.   The default is 10^-6.\r\n\r\nExamples:\r\n  f:=Apply[Function[{x,y},((x^2+y^2)-1)*(x^2+y^2)-(x-.5)\/3.],#]&;\r\n  v={{1.,1.},{0.,-1.},{0.,1.}};\r\n  limit={{-0.5,-1.5},{0.65,1.5}};\r\n  p=Sort[Map[{f[#],#}&,v]]\r\n  DownhillSimplex[p,f,MaxIteration->100,\r\n     Tolerance->1e-4,VariableRange->limit]<\/pre>\n<pre>See also:\r\n FFS-dedicated-functions:OptimizeOptics<\/pre>\n<li>\n<h3><a name=Lfunctional-operations>functional-operations<\/a><\/h3>\n<pre><\/pre>\n<ul>\n<li>\n<h3><a name=LApply>Apply<\/a><\/h3>\n<pre>   Apply[f, x [, level]] or f@@x [f@@[x, level]] \r\n\r\ntakes the bod of a list x as the argument sequence of f, and returns the result:\r\n\r\nf@@{a, b, c} ===> f[a, b, c]\r\n\r\nAn optional argument specifies the level-spec.<\/pre>\n<pre>See also:\r\n <a href=#LApply (@@)>Apply (@@)<\/a> <a href=#LMap>Map<\/a> <a href=#LScan>Scan<\/a> <a href=#LMapThread>MapThread<\/a> <a href=#Llevel-spec>level-spec<\/a><\/pre>\n<li>\n<h3><a name=LCases>Cases<\/a><\/h3>\n<pre>   Cases[l, pat [, level [,n]]]\r\n\r\nreturns a list of parts of l, which match a pattern pat. Optional level-spec l and the maximum number\r\nof results n can be specified.<\/pre>\n<pre>See also:\r\n <a href=#Llevel-spec>level-spec<\/a> <a href=#Lpattern>pattern<\/a> <a href=#LPosition>Position<\/a> Deletecases<\/pre>\n<li>\n<h3><a name=LDeleteCases>DeleteCases<\/a><\/h3>\n<pre>   DeleteCases[l, pat [, level [,n]]]\r\n\r\nreturns a list of parts of l, which do not match a pattern pat. Optional level-spec l and the maximum\r\nnumber of results n can be specified.<\/pre>\n<pre>See also:\r\n <a href=#Llevel-spec>level-spec<\/a> <a href=#Lpattern>pattern<\/a> <a href=#LCases>Cases<\/a> <a href=#LPosition>Position<\/a><\/pre>\n<li>\n<h3><a name=LDifference>Difference<\/a><\/h3>\n<pre>Difference[list] returns Rest[list] - Drop[list, -1] .<\/pre>\n<li>\n<h3><a name=LFixedPoint>FixedPoint<\/a><\/h3>\n<pre>FixedPoint[f, e] starts from f[e] then applies f repeatedly until the result no longer changes. FixedPoint[f,\r\ne, n] specifies the maximum number of iterations by n. An option SameTest->s specifies the test function.\r\nThreshold->re, and AbsoluteThreshold->ae set the relative and absolute accuracy, respectively, when\r\nSameTest->NearlySameQ (default).<\/pre>\n<pre>See also:\r\n <a href=#LFixedPointList>FixedPointList<\/a><\/pre>\n<li>\n<h3><a name=LFixedPointList>FixedPointList<\/a><\/h3>\n<pre>FixedPointList[f, e] returns the intermediate values of FixedPoint[f, e] as a list. FixedPointList[f,\r\ne, n] and options for FixedPoint are valid.<\/pre>\n<pre>See also:\r\n <a href=#LFixedPoint>FixedPoint<\/a><\/pre>\n<li>\n<h3><a name=Llevel-spec>level-spec<\/a><\/h3>\n<pre>Functions Map, Apply, Scan, Cases, Position, Count, Level, DeleteCases takes an optional argument\r\nlevel to specify which level to operate:\r\n\r\nvalue               operates\r\nn_Real              from level 1 through level n\r\n{n_Real}            only on level n\r\n{n1_Real, n2_Real}  from leveln1 through level n2\r\n\r\n\r\nIf n is negative, it counts from the deepest level of each element.\r\n\r\nExamples: f@@[{{a, b}, {c, d}}, {1}] ===> {f[a, b], f[c, d]}<\/pre>\n<pre>See also:\r\n <a href=#LMap>Map<\/a> <a href=#LApply>Apply<\/a> <a href=#LScan>Scan<\/a> <a href=#LCases>Cases<\/a> <a href=#LPosition>Position<\/a> Count Level <a href=#LDeleteCases>DeleteCases<\/a><\/pre>\n<li>\n<h3><a name=LMap>Map<\/a><\/h3>\n<pre>   Map[f, x [, level]] or f\/@x [f\/@[x, level]] \r\n\r\noperates f over each element of a list x and returns the result as a list:\r\n\r\nf\/@{a, b, c} ===> {f[a], f[b], f[c]}\r\n\r\nAn optional argument specifies the level-spec.<\/pre>\n<pre>See also:\r\n @\/ <a href=#LScan>Scan<\/a> <a href=#LApply>Apply<\/a> <a href=#LMapThread>MapThread<\/a> <a href=#Llevel-spec>level-spec<\/a><\/pre>\n<li>\n<h3><a name=LMapThread>MapThread<\/a><\/h3>\n<pre>   MapThread[f, l] ===> f@@[Thread[l], {1}]\r\n\r\nExample: MapThread[f, {{1, 2}, {3, 4}}] ===> {f[1, 3], f[1, 4]}<\/pre>\n<pre>See also:\r\n <a href=#LScanThread>ScanThread<\/a> <a href=#LThread>Thread<\/a> <a href=#LMap>Map<\/a> <a href=#LApply>Apply<\/a><\/pre>\n<li>\n<h3><a name=LPosition>Position<\/a><\/h3>\n<pre>   Position[l, pat [, level [,n]]]\r\n\r\nreturns a list of indices of parts of l, which match a pattern pat. Optional level-spec l and the\r\nmaximum number of results n can be specified.<\/pre>\n<pre>See also:\r\n <a href=#Llevel-spec>level-spec<\/a> <a href=#Lpattern>pattern<\/a> <a href=#LCases>Cases<\/a> <a href=#LDeleteCases>DeleteCases<\/a><\/pre>\n<li>\n<h3><a name=LScan>Scan<\/a><\/h3>\n<pre>   Scan[f, x [, level]]\r\n\r\noperates f over each element of a list without returning the result:\r\n\r\nScan[f, {a, b, c}] ===> {f[a], f[b], f[c]};Null \r\n\r\nAn optional argument specifies the level-spec.<\/pre>\n<pre>See also:\r\n <a href=#LMap>Map<\/a> <a href=#LApply>Apply<\/a> <a href=#LMapThread>MapThread<\/a> <a href=#Llevel-spec>level-spec<\/a><\/pre>\n<li>\n<h3><a name=LScanThread>ScanThread<\/a><\/h3>\n<pre>   ScanThread[f, l] ===> (f@@[Thread[l], {1}];Null) ,\r\n\r\nwhich is equivalent to MapThread without returning the results.<\/pre>\n<pre>See also:\r\n <a href=#LMapThread>MapThread<\/a> <a href=#LThread>Thread<\/a> <a href=#LMap>Map<\/a> <a href=#LApply>Apply<\/a><\/pre>\n<li>\n<h3><a name=LSelectCases>SelectCases<\/a><\/h3>\n<pre>Usage: SelectCases[list, {test1,..}]\r\n\r\nreturns a list {list1, .. }, where list1 is a list of subexpressions which makes test1 True, etc.\r\nIf the second argument is like {c1, .. , True&},  the last of the returned list contains subexpressions\r\nwhich make none of c1, ... True.<\/pre>\n<pre>See also:\r\n <a href=#LSwitchCases>SwitchCases<\/a><\/pre>\n<li>\n<h3><a name=LSwitchCases>SwitchCases<\/a><\/h3>\n<pre>Usage: SwitchCases[list, {case1,..}]\r\n\r\nreturns a list {list1, .. }, where list1 is a list of subexpressions which match case1, etc. SwitchCases\r\ndoes what are done by Cases and DeleteCases simultaneously. If the second argument is like {c1, ..\r\n, _}, the last of the returned list contains subexpressions which match none of c1, ...<\/pre>\n<pre>See also:\r\n <a href=#LSelectCases>SelectCases<\/a><\/pre>\n<li>\n<h3><a name=LThread>Thread<\/a><\/h3>\n<pre> Thread[l] returns a threaded list of l:\r\n\r\n   Thread[{{1, 2}, {3, 4}}] ===> {{1, 3}, {2, 4}}\r\n   Thread[{{1, 2}, {3, 4}, 5}] ===> {{1, 3, 5}, {2, 4, 5}}\r\n\r\n If an optional second argument h is given, Thread operates only over on a structure whose head is\r\nh:\r\n\r\n   Thread[{{1, 2}, {3, 4}} , f] ===> {{1, 2}, {3, 4}}\r\n   Thread[{f[1, 2], f[3, 4]} , f] ===> f[{1, 3}, {2, 4}]\r\n   Thread[f[f[1, 2], f[3, 4]] , f] ===> f[f[1, 3], f[2, 4]]\r\n\r\n Thread is equivalent to Transpose if l is a matrix.<\/pre>\n<pre>See also:\r\n <a href=#LMapThread>MapThread<\/a> Transpose<\/pre>\n<\/ul>\n<li>\n<h3><a name=LFFS-dedicated-functions>FFS-dedicated-functions<\/a><\/h3>\n<pre>Functions dedicated to the optics calculations and simulations in FFS.<\/pre>\n<ul>\n<li>\n<h3><a name=LAccelerateParticles>AccelerateParticles<\/a><\/h3>\n<pre>AccelerateParticles does TrackParticles with acceleration in a ring for a given number of turns.\r\nThe adiabatic damping is automatically taken cared.\r\n\r\nUsage:    AccelerateParticles[beam_,mom_,{n_Symbol,nturn_},opt___]\r\n\r\nwhere beam is a list of beam coordinates in the same format for TrackParticles. mom is an expression\r\nto determine MOMENTUM in each turn as a function of turn number n. nturn is the total number of turns.\r\nAn option Synchronize specifies a routine to be executed at every turn of the tracking (e.g. changing\r\nvoltages and magnet settings, or storing the results.)\r\n\r\nExample:\r\n  AccelerateParticles[\r\n    beam,\r\n    Which[\r\n      n < 100,  1e9,\r\n      n <= 200, 1e9 + (n - 100) * 1e7,\r\n      True, 2e9],\r\n    {n, 300},\r\n    Synchronize :> ((\r\n      d = {d, MOMENTUM\/1e9 * (1 + #2[[2,6,1]])})&)];<\/pre>\n<pre>See also:\r\n <a href=#LTrackParticles>TrackParticles<\/a><\/pre>\n<li>\n<h3><a name=LBeamMatrix>BeamMatrix<\/a><\/h3>\n<pre>BeamMatrix[i] returns a 6 by 6 beam-matrix (i.e., <x_k x_l>) at location i. The index i can have\r\na fraction to specify intermediate numbers (see LINE or Twiss). The calculation is based on linear\r\n4 by 5 calculation in the present version, so the z-direction is meaningless. Flag GAUSS affects\r\nthe result.<\/pre>\n<pre>See also:\r\n <a href=#LLINE>LINE<\/a> <a href=#LTwiss>Twiss<\/a> <a href=#LGAUSS>GAUSS<\/a><\/pre>\n<li>\n<h3><a name=LDynamicApertureSurvey>DynamicApertureSurvey<\/a><\/h3>\n<pre>Usage: DynamicApertureSurvey[range,nturn,options]\r\n\r\nwhere\r\n\r\nrange: a list of {xrange,yrange,zrange}, with\r\n       xrange: {xmin, xmax},\r\n       yrange: {ymin, ymax},\r\n       zrange: {zmin, zmax},\r\n       and for the horizontal plane, specified by the Axes option, \r\n       the corresponding range must be given as {v1, ..., vn}.\r\n       These values are the initial amplitude divided by the equilibrium \r\n       values, i.e., Sqrt[2Jx,y\/(EMITX+EMITY)], Sqrt[2Jz\/EMITZ].\r\n       See EMITTANCE(EMIT) command or Emittance function.\r\nnturn: number of turns to track.\r\noptions: Output->lfn : output to the unit lfn (see OpenWrite).\r\n         Axes->axes : one of \"XY\", \"XZ\", \"YX\", \"YZ\", \"ZX\", \"ZY\",\r\n          where the first character specifies the horizontal axis, and\r\n          the second the vertical, respectively. The default is \"ZX\".\r\n         ReferenceOrbit->{x0, px0, y0, py0, z0, dp0} : Survey is done around\r\n          this orbit.\r\n         PhaseX->phix : The initial amplitude is rotated in (X, PX) phase space\r\n          by phix. Default is zero.\r\n         PhaseY->phiy : The initial amplitude is rotated in (Y, PY) phase space\r\n          by phiy. Default is zero.\r\n         PhaseZ->phiz : The initial amplitude is rotated in (Z, PZ) phase space\r\n          by phiz. Default is -Pi\/2.\r\n         ExpandElementValues->True(default) : set the values of the components\r\n          according to the values of elements. Machine errors may be reset.\r\n          See machine-error-commands, CALCULATE(CALC).\r\n\r\n   DynamicApertureSurvey returns the result as a list:\r\n\r\n   {score,{{{xmin, xmax},{ymin, ymax},{z1, z2, .., zn}},\r\n           {{z1,score1,{turn1_1,..,turn1_50}},..,\r\n            {zn,scoren,{turnn_1,..,turnn_50}}}}} ,\r\n\r\nwhere score = Sum[scorei,{i,n}], scorei is the \"score\" of i-th momentum, and turni_j is the lost\r\nturn of the particle with i-th momentum and j-th initial amplitude.\r\n   DynamicApertureSurvey tracks number of particles with different initial conditions in the range\r\ngiven by range. It outputs a z-x diagram of the dynamic aperture of the ring. Fifty one initial conditions\r\nare chosen in the range x-range for each point of z-range. The initial y-amplitude is linearly dependent\r\non the x-amplitude. It tracks from xmax to downward for each z-amplitude zn, until the particles\r\nturns nturn with successive DAPWIDTH x-amplitudes. The default DAPWIDTH is 7.\r\n  DynamicApertureSurvey does parallel processing up to NPARA processes.<\/pre>\n<pre>See also:\r\n <a href=#LNPARA>NPARA<\/a> <a href=#LDAPWIDTH>DAPWIDTH<\/a> <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LEmittance>Emittance<\/a><\/pre>\n<li>\n<h3><a name=LElement>Element<\/a><\/h3>\n<pre>Element[key-string, {element-pattern-string | element-position}] returns values for key-string of\r\nelements which match element-pattern-string or located at element-position. It returns a list if\r\nmore than one elements match. The key-string and element-pattern-string can be symbols, unless values\r\nare not assigned to them.\r\n   If the second argument is omitted, it means all elements.\r\n   The element-position can be known by Element[\"POSITION\"].\r\n   Key-strings \"VALUE\" and element-keywords allows to be set (i.e., Element[a,b] = v) when element-pattern-string\r\nchooses only one element. If a value is set to Element, it is automatically distributed to all components\r\nthose belong to the element. If the keyword is the default variable, the error given by machine-error-command\r\nDK is applied.\r\n   The arguments of Element can be lists. It automatically maps as\r\n\r\n   Element[{a,b,c..},y]  means {Element[a,y],Element[b,y],Element[c,y]..}\r\n   Element[x,{a,b,c..}]  means {Element[x,a],Element[x,b],Element[x,c]..},\r\n\r\nwhere both x and y can be also a list.\r\n\r\n   If an option Saved->True is given, Element refers the save-buffer which can be transferred to\r\nother beam lines. Otherwise values set by Element are not saved when FFS is stopped, unless they\r\nare the default-keyword or keywords once used in matching.<\/pre>\n<pre>See also:\r\n <a href=#Lelements>elements<\/a> <a href=#Lwildcards>wildcards<\/a> <a href=#Lcomponents>components<\/a> <a href=#LLINE>LINE<\/a> <a href=#LSetElement>SetElement<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=Lkey-strings:Element>key-strings:Element<\/a><\/h3>\n<pre>The key-string is not case-sensitive. Available key-strings are:\r\n\r\n            \r\n\"LENGTH\"    Number of elements in the beam line. No second argument.\r\n\"POSITION\"  Position of the element in the element-list.\r\n\"NAME\"      Name of the element.\r\n\"VALUE\"     Current value of the default keyword of the element.\r\n\"KEYWORDS\"  List of available keywords of the element.\r\n\"DEFAULT\"   The default keyword of the element\r\n\"TYPE\"      The internal code-number of the type of the element.\r\n\"TYPENAME\"  The name of the type of the element.\r\nkeyword     If keyword is the default keyword, it means the current value. If not, it means the saved\r\n            value. Changing the non-default keyword by Element does not affects the current setting\r\n            of the components.\r\n\"EXPAND\"    Distribute the value of the default-keywords and the keywords used in the matching to\r\n            all components in the beam line. No second argument.\r\n\r\nSetting by Element[\"VALUE\",..] or Element[keyword,..] to the DEFAULT  keyword or a matching-variable\r\nkeyword changes the current value, and  distributed to the components in the succeeding calculation.<\/pre>\n<pre>See also:\r\n <a href=#Lset-value-of-element>set-value-of-element<\/a> <a href=#Lelements>elements<\/a> <a href=#Lkeywords>keywords<\/a> <a href=#Ldefault-keyword>default-keyword<\/a>\r\n <a href=#Lcomponents>components<\/a><\/pre>\n<\/ul>\n<li>\n<h3><a name=LEmittance>Emittance<\/a><\/h3>\n<pre>Emittance[option] returns a set of rules as \r\n\r\n   {keyword1->value1, keyword2->value2, ..} .\r\n\r\nIts options and default values are Matrix(False), Orbit(False), OneTurnInformation(False), Emittance(True),\r\nExpandElementValues(True), SaveEMIT(False), InitialOrbit(Null), InitialBeamMatrix(Null), Region({1,-1}),\r\nand Output(0).\r\n\r\nIf Emittance->False is specified, the resulting keywords are:\r\n\r\n                     \r\nStable               True if all modes are stable and the closed orbit is found.\r\nRegion               The region {begin, end} to calculate.\r\nTunes                {nux, nuy, nuz} .\r\nEnergyLossU0         One turn energy loss in eV.\r\nRfVoltageVc          The effective RF voltage (V).\r\nEquilibriumPosition  dz in meter.\r\nMomentumCompaction   -dz\/dp\r\nOrbitDilation        ds in meter.\r\nBucketHeight         dV\/E0\r\nHarmonicNumber       The effective harmonic number\r\nOrbitAtExit          physical c.o.d. at the end of line.\r\n\r\nIf None of the options is given, the following keywords are added:\r\n\r\n                      \r\nDampingRate           {T0\/taux, T0\/tauy, T0\/tauz}\r\nEmittances            {emitx, emity, emitz} *1)\r\nMomentumSpread        sigma p\/p0\r\nBunchLength           sigma_z\r\nPolarization          equilibrium polarization, if POL is on\r\nPolarization2         equilibrium polarization by up to 2nd order calculation\r\nPolarization4         equilibrium polarization by up to 4th order calculation\r\nPolarization6         equilibrium polarization by up to 6th order calculation\r\nPolarizationVector    direction of polarization AppendTo the entrance of the beam line\r\nSpinTune              spin tune on the closed orbit\r\nNominalSpinTune       spin tune calculated by MOMENTUM and electron g-2\r\nTuneShiftByRadiation  {dnux, dnuy, dnuz}\r\n\r\nIf OneTurnInformation->True, or Orbit->True, or Matrix->True, the followings are added.\r\n\r\n                         \r\nOrbitAtEntrance          physical c.o.d. at the entrance of the ring.\r\nOneTurnTransferMatrix    symplectic part of the one-turn transfer matrix.\r\nOneTurnDampingMatrix     deviation of transfer matrix due to radiation.\r\nNormalCoordinates        conversion matrix from physical to normal coords.\r\nOneTurnExcitation        excitation matrix by radiation and intrabeam scattering (with INTRA).\r\nEquilibriumBeamMatrix    equilibrium beam matrix.\r\nExtendedTwissParameters  list of rules giving the extended Twiss parameters at the entrance of the\r\n                         ring.\r\n\r\nIf Orbit->True or Matrix->True, the following is added:\r\n\r\n             \r\nClosedOrbit  List of physical closed orbit at every element in the ring.\r\n\r\nIf Matrix->True, the followings are added:\r\n\r\n                     \r\nTransferMatrices     List of physical transfer matrix from the beginning of the beam line to all\r\n                     elements.\r\nIntrabeamExcitation  List of the change of the 6 x 6 beam matrix due to the intrabeam scattering\r\n                     (only when INTRA), converted to the beginning of the beam line.\r\n\r\n   If the flag TRPT or NORING is set, the calculation assumes a transport line so that several quantities\r\nsuch as damping rate, eigen modes, equilibrium beam matrix, etc. are meaningless. Use RING or NOTRPT\r\nfor such calculation. In the case of TRPT or NORING, the incoming beam envelope must be given by\r\nthe option InitialBeamMatrix with a 6 x 6 symmetric matrix. TRPT is useful for calculation of space\r\ncharge and intrabeam in a transport line.\r\n   Please do not forget to put semicolon at the end of Emittance[] function, otherwise the output\r\nwill be huge especially when Orbit or Matrix is True.\r\n If ExpandElementValues->False, calculation is made using the present values of each component (i.e.,\r\nincluding machine errors).\r\n\r\nIf SaveEMIT->True, the calculated values of emittances are stored in variables EMITX, EMITY, EMITZ,\r\nSIGE, SIGZ. The default is SaveEMIT->False.\r\n\r\nInitialOrbit->{x0,px0,y0,py0,z0,dp0\/p0} specifies the incoming orbit which is valid when NOCOD is\r\nset. The option Output->filenum enables the print out of EMITTANCE(EMIT) to filnum.\r\n\r\nIf Region is not the entire ring, parameters such as Emittances and DampingRate, etc., are not calculated,\r\nand return NaNs.\r\n\r\n*1) The values of Emittances with INTRA and MINCOUP correspond to the equilibrium with intrabeam\r\nscattering weakened by MINCOUP.<\/pre>\n<pre>See also:\r\n <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LSymplecticJ>SymplecticJ<\/a> <a href=#LCOD>COD<\/a> <a href=#LEMITX>EMITX<\/a> <a href=#LEMITY>EMITY<\/a> <a href=#LEMITZ>EMITZ<\/a> <a href=#LSIGZ>SIGZ<\/a> <a href=#LSIGE>SIGE<\/a>\r\n <a href=#LPOL>POL<\/a> <a href=#LMINCOUP>MINCOUP<\/a> <a href=#Lequilibrium-beam-envelope>equilibrium-beam-envelope<\/a><\/pre>\n<li>\n<h3><a name=LExternalMap>ExternalMap<\/a><\/h3>\n<pre>With MAP elements, ExternalMap defines a user-defined map of particles. It also allows a user to\r\ndo anything (doing statistics, etc.) at any point of a beam line during a tracking. \r\n\r\nUsage: First define a MAP element at MAIN level:\r\n\r\n     MAP    name=(L=leng);\r\n\r\nCurrently L is the only keyword. Insert it at the location(s) where you want to use it.\r\n\r\n1) Tracking\r\nIn FFS, define the function ExternalMap as\r\n\r\n    ExternalMap[\"TRACK\",n,nt_,x_]:=body;\r\n\r\nThe second argument n is the position of MAP counting from the beginning, which can be obtained using\r\nLINE[\"POSITION\",\"name.m\"]. The third argument nt_ is used to receive the number of turns which is\r\nincremented by the tracking. The last argument x_ is used to receive the coordinates of particles.\r\nIt is a (7 or 9, np) list of real numbers. The elements  (1..8, i) are (x, px ,y ,py ,z ,dp\/p0, sy,\r\nsarg) of the i-th particle. The (-1, i)  element is True(==1) if the i-th particle has been survived,\r\nand False(==0) if it has been lost. The spin coordinates sy and sarg are only valid with the POL\r\nflag.\r\n\r\n You can define ExternalMap to change the coordinates of each particle as you like by returning a\r\nnew x in the same format as above. If you do not return it or you return in a different format, the\r\ntracking routine does not change the particle coordinates. You can neither rebirth a lost particle\r\nnor kill a surviving particle.\r\n\r\nAfter defined ExternalMap, tracking calls it in every turn.\r\n\r\nExample:\r\n\r\n   MAP P1=();\r\n   ....\r\n   LINE A=(... P1 ... P1 ...);\r\n   ....\r\n   FFS USE=A;\r\n     ExternalMap[\"TRACK\",LINE[\"POSITION\",\"P1.2\"],nt_,x_]:=\r\n(Print[x];x*(Print[x];x*2);\r\n....        ....\r\n            \r\nTRACK       USE=A ....;\r\n            \r\nThis        example defines ExternalMap to print out the coordinates of all particles at the second\r\n            P1 in the line A. It also makes all coordinates of all particles twice in every turn.\r\n            \r\nOptionally  a compiled module CompiledMap can be used for ExternalMap[\"TRACK\"] (see below).\r\n            \r\n2)          Emittance\r\nIn          FFS, define the function ExternalMap as\r\n            \r\nExternalMap[ExternalMap[\"EMIT\",n,cod_]:=body;\r\n            \r\nThe         second argument n is the position of MAP counting from the beginning, which can be obtained\r\n            using LINE[\"POSITION\",\"name.m\"]. The last argument cod_ is used to receive the orbit\r\n            at the entrance of the element, as a list of 6 real numbers. ExternalMap must return\r\n            a list, either {cod1, trans} or  {cod1, trans, dtrans, dbeam}, where cod1 is the orbit\r\n            at the exit, trans is the 6 by 6 transfer matrix of this element, dtrans is the radiation\r\n            damping part of the transfer matrix (6 by 6), and dbeam is the radiation excitation of\r\n            the beam matrix (6 by 6). Only j >= i parts of dbeam[[i, j]] are taken into account.\r\n            \r\nExample:    Example:\r\n            \r\nExternalMap[ExternalMap[\"EMIT\",LINE[\"POSITION\",\"P1\"],cod_]:=(\r\nPrint[cod]; Print[cod];\r\n{cod+{0,0.00{cod+{0,0.001,0,0,0,0},IdentityMatrix[6]});\r\n            \r\n3)          Optics\r\nIn          FFS, define the function ExternalMap as\r\n            \r\nExternalMap[ExternalMap[\"OPTICS\",n,cod_]:=body;\r\n            \r\nThe         second argument n is the position of MAP counting from the beginning, which can be obtained\r\n            using LINE[\"POSITION\",\"name.m\"]. The last argument cod_ is used to receive the orbit\r\n            at the entrance of the element, as a list of 6 real numbers. ExternalMap must return\r\n            a list {cod1, trans}, where cod1 is the orbit at the exit and trans is the 6 by 6 transfer\r\n            matrix of this element. In the case of CACL4D (== ~CALC6D), only the 4 by 5 transfer\r\n            matrix is effective.\r\n            \r\nExample:    Example:\r\n            \r\nExternalMap[ExternalMap[\"OPTICS\",LINE[\"POSITION\",\"P1\"],cod_]:=(\r\nPrint[cod]; Print[cod];\r\n{cod+{0,0.00{cod+{0,0.001,0,0,0,0},IdentityMatrix[6]});\r\n            \r\n4)          Geometry\r\nIn          FFS, define the function ExternalMap as\r\n            \r\nExternalMap[ExternalMap[\"GEO\",n,geo_,pos_]:=body;\r\n            \r\nThe         second argument n is the position of MAP counting from the beginning, which can be obtained\r\n            using LINE[\"POSITION\",\"name.m\"]. The argument geo_ receives the geometry of the beam\r\n            line at the MAP element, in the same format as LINE[\"GEO\",n], i.e., {{GX,GY,GZ},{CHI1,CHI2,CHI3}}.\r\n            The last argument pos_ receives the orbit length S at the element. ExternalMap must return\r\n            an updated list {geo1, pos1}, as { {{GX,GY,GZ},{CHI1,CHI2,CHI3}}, S} as the values at\r\n            the exit of the element.\r\nExample:    Example:\r\n            \r\nExternalMap[ExternalMap[\"GEO\",LINE[\"POSITION\",\"P1\"],geo_,pos_]:=(\r\nPrint[cod]; Print[cod];\r\n{           {geo[[1]]+{1,0,0}, geo[[2]]}, pos+0.1})<\/pre>\n<pre>See also:\r\n MAP <a href=#LCALC4D>CALC4D<\/a> <a href=#LPOL>POL<\/a> <a href=#LCompiledMap>CompiledMap<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=LCompiledMap>CompiledMap<\/a><\/h3>\n<pre>Usage:\r\n\r\nExternapMa[\"TRACK\", n, nt_, x_]:=CompiledMap[nt, x, src, prm, opt___];\r\n\r\nwhere n is the location number, nt the number of turns, x the particle coordinates with the alive\r\nflag, as described for ExternalMap. It takes options of Rules as shown below. A charachter string\r\nsrc is the source code for the map, which completes a subroutine having a header:\r\n\r\nimplicit none;\r\ninteger,intent(in):: np,nprm,nt,n;\r\nreal(kind=8),intent(inout):: x(np),px(np),y(np),py(np),z(np),dp(np),&\r\n                             sy(np),sarg(np),flag(np),prm(nprm);\r\n\r\nwhere np is the number of particles, and prm is a list of reals of any length. The spin coordinates\r\nsy and sarg are meaningless without the flag POL. The src must ends with \"return;end\" to complete\r\nthe subroutine, and more routines can be inserted if needed. Currently gfortran in free format is\r\navailable for the compiler, and gcc will be supported in future.\r\n\r\nExample:\r\n\r\nsrc = \"flag = flag * merge(1.d0, 0.d0, x&ltprm(1) .or. x&gtprm(2) .or. (y&gtprm(3) .and. y&ltprm(4)));return;end\";\r\nprm\r\n= {-0.001, 0.001, -3e-4, 3e-4};\r\nExternalMap[\"TRACK\", LINE[\"POSITION\",\"M1.2\"], nt_, x_]:=CompiledMap[nt, x, src, prm];\r\n\r\nworks as a special colimation at a MAP element M1.2, resulting:\r\n\r\n<img decoding=\"async\" src=\"\/SAD\/SADHelp_img\/Collimate.png\" align=\"middle\" width=540>\r\n\r\n(Actually the example above can be performed also by SADScript:\r\n\r\nExternalMap[\"TRACK\", LINE[\"POSITION\",\"M1.2\"], nt_, x_]:=Append[Drop[x, -1],\r\n       x[[1]] < prm[[1]] || x[[1]] > prm[[2]] || (prm[[3]] < x[[3]] < prm[[4]])];\r\n\r\nwhich runs even FASTER than the compiled one!!)\r\n\r\nOptions      Defaul     Description\r\n-------------------------------------------------------------\r\nSingle       False      If True, the map is called once for the entrire particles even for NPARA\r\n> 1.\r\nCompletion   Null       A completion SADScript to be called after the map with the arg {x, prm}.<\/pre>\n<pre>See also:\r\n <a href=#LExternalMap>ExternalMap<\/a> MAP <a href=#LPOL>POL<\/a><\/pre>\n<\/ul>\n<li>\n<h3><a name=LFFS>FFS<\/a><\/h3>\n<pre>FFS[command-string] executes command-string as FFS commands. Any commands can be used. Some commands\r\nCALCULATE(CAL), GO, VARIABLES(VAR), SHOW returns their result, otherwise Null is returned. All outputs\r\nof the commands are suppressed.\r\n   FFS[command-string,lo] directs the output of the commands to file-number lo. The file-number lo\r\nmay be given by OpenWrite or OpenAppend.\r\n   The IF structure and REPEAT(REP) loop must complete within a single FFS.<\/pre>\n<pre>See also:\r\n <a href=#LInput\/Output>Input\/Output<\/a> <a href=#LOpenWrite>OpenWrite<\/a> <a href=#LOpenAppend>OpenAppend<\/a><\/pre>\n<li>\n<h3><a name=LFFS$SHOW>FFS$SHOW<\/a><\/h3>\n<pre>   FFS[\"SHOW\"] or FFS$SHOW[] returns the current matching conditions as a list. Each element has\r\na form of\r\n\r\n{component1, component2, function, goal-value, number-of-momentums, scale},\r\n\r\nwhich corresponds to the format of the print-out by SHOW.<\/pre>\n<pre>See also:\r\n <a href=#LSHOW>SHOW<\/a><\/pre>\n<li>\n<h3><a name=LFitValue>FitValue<\/a><\/h3>\n<pre>Usage:\r\n\r\n(1) FitValue[component, function, {id_,dp_}, goal_, now_] := body\r\n\r\nmodifies the goal of the matching of function at component. The argument id_ is the orbit id for\r\nMatchingAmplitude or InitialOrbits. The argument dp_ receives the value of dp\/p0. The argument goal_\r\nis the value of the goal of the matching set by matching-function-commands. The argument now_ is\r\nthe current value of function.\r\n\r\nExample: FitValue[\"$$$\", \"NX\", {_,dp_}, goal_, now_] := goal + dp * xix * 2 * Pi\r\n\r\nsets the tune NX to have chromaticity xix.\r\n\r\n(2) FitValue[component1, component2, function, {id_,dp_}, goal_, now1_, now2_] := body\r\n\r\nmodifies the value of the function at component1 for a two-component matching. Component1 is assumed\r\nupstream in the beam line. The value of body is used in place of the current value, now1. The argument\r\nid_ is the orbit id for MatchingAmplitude or InitialOrbits. The argument dp_ receives the value of\r\ndp\/p0. The argument goal_ is the value of the goal of the matching set by matching-function-commands.\r\nThe argument now1 and now2 are the current values of the function at component1 and component2, respectively.\r\n\r\nExample:\r\nFitValue[\"QF1\", \"QF2\", \"NX\", _, goal_, now1_, now2_] := \r\n   If[Abs[now2-(now1+goal)] < 0.01*2*Pi , Null, now1]\r\n\r\nsets the tune difference between QF1 and QF2 gaol +- 0.01.\r\n\r\n   During the matching process the matching routine calls FitValue with arguments, then if body returns\r\na number, it overrides the goal give by matching-function-commands. If body returns Null, the matching\r\nof function is ignored.\r\n   The matching-function-command is necessary besides FitValue to perform the matching. Only defining\r\nFitValue does not do the matching.\r\n   FitValue is cleared by USE. It is hidden by VISIT and restored by BYE<\/pre>\n<pre>See also:\r\n <a href=#Lmatching-function-commands>matching-function-commands<\/a> <a href=#Loff-momentum-matching>off-momentum-matching<\/a><\/pre>\n<li>\n<h3><a name=LFitWeight>FitWeight<\/a><\/h3>\n<pre> A defined function to modify the weight of matching of particular function at particular component\r\nwith particular momentum offset.\r\n\r\nUsage:   FitWeight[component, function, {id_,dp_}, default_] := weight;\r\n\r\nwhere\r\n\r\n           \r\ncomponent  is the name of the location of the fit, like \"QF.2\", etc.\r\nfunction   is the name of the matching-function, like \"BX\", \"LENG\", etc.\r\nid_        is the id number of the orbit for MatchingAmplitude or InitialOrbits.\r\ndp_        is a variable to receive the momentum deviation of the fit.\r\ndefault_   is a variable to receive the default fit weight.\r\nweight     is an expression which returns the desired weight.\r\n\r\nExample: FitWeight[\"$$$\",\"LENG\",{_,dp_},ws_]:=ws*10;\r\n\r\nmakes the weight of LENG at $$$ 10 times (100 times in MatchingResidual) bigger than the default.<\/pre>\n<pre>See also:\r\n <a href=#Lmatching-function-commands>matching-function-commands<\/a> <a href=#Lspecial-variables>special-variables<\/a> <a href=#LMatchingResidual>MatchingResidual<\/a>\r\n<\/pre>\n<li>\n<h3><a name=LGaussianCoulomb>GaussianCoulomb<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_200.svg\" \/><\/pre>\n<li>\n<h3><a name=LGeoBase>GeoBase<\/a><\/h3>\n<pre>GeoBase[{chi1, chi2, chi3}] converts the rotation angles of the coordinate base vectors to a transformation\r\nmatrix {{x_gx,x_gy,x_gz}, {y_gx,y_gy,y_gz}, {z_gx,z_gy,z_gz}}<\/pre>\n<pre>See also:\r\n <a href=#LGEO>GEO<\/a> <a href=#LOrbitGeo>OrbitGeo<\/a><\/pre>\n<li>\n<h3><a name=LLINE>LINE<\/a><\/h3>\n<pre>LINE[key-string, {component-pattern-string | component-position}]\r\n\r\nreturns values for key-string of components which match component-pattern-string or located at component-position.\r\nIt returns a list if more than one components match. The key-string and component-pattern-string\r\ncan be symbols, unless values are not assigned to them. The second arg can be a fractional number\r\nto denote an intermediate value of two components.\r\n   If the second argument is omitted, it means all components.\r\n   The component-position can be known by LINE[\"POSITION\"].\r\n   Key-strings \"DIR\" and component-keywords allows to be set (i.e.,\r\nLINE[a,b] = v) when component-pattern-string chooses only one component.\r\n   The arguments of LINE can be lists. It automatically maps as\r\n\r\n   LINE[{a,b,c..},y]  means {LINE[a,y],LINE[b,y],LINE[c,y]..}\r\n   LINE[x,{a,b,c..}]  means {LINE[x,a],LINE[x,b],LINE[x,c]..},\r\n\r\nwhere both x and y can be also a list.<\/pre>\n<pre>See also:\r\n <a href=#Lcomponents>components<\/a> <a href=#Lwildcards>wildcards<\/a> <a href=#Lelements>elements<\/a> <a href=#LElement>Element<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=Lkey-strings:LINE>key-strings:LINE<\/a><\/h3>\n<pre>The key-string is not case-sensitive. Available key-strings are:\r\n\r\n             \r\n\"LENGTH\"     Number of components in the beam line. No second argument.\r\n\"POSITION\"   Position of the component in the beam line.\r\n\"NAME\"       Name of the component.\r\n\"TYPE\"       The internal code-number of the type of the component.\r\n\"TYPENAME\"   The name of the type of the component.\r\n\"ELEMENT\"    The name of the corresponding element.\r\n\"DIR\"        The orientation of the component, +-1.\r\n\"S\"          The orbit length to the entrance from the beginning of the beam line.\r\n\"LENG\"       Same as \"S\".\r\n\"GEO\"        Geometric-functions at the entrance of the component, {{GX, GY, GZ}, {GCHI1, GCHI2,\r\n             GCHI3}}.\r\n\"OGEO\"       Geometric-functions of the orbit at the entrance of the component, {{OGX, OGY, OGZ},\r\n             {OCHI1, OCHI2, OCHI3}}.\r\n\"GAMMA\"      Lorentz factor gamma.\r\n\"GAMMABETA\"  Lorentz factor gamma*beta = Sqrt[gamma^2 - 1].\r\n\"SIGab\"      Beam matrix component, where a and b are one of X, PX, Y, PY, Z, DP. If b is omitted\r\n             it returns Sqrt[SIGaa] is returned. Just \"SIG\" returns the entire 6 by 6 beam matrix.\r\n\"SIZEab\"     Beam matrix component calculated by (CODPLOT;EMIT), where a and b are one of X, PX,\r\n             Y, PY, Z, DP. If b is omitted it returns Sqrt[SIZEaa] is returned.- \"SIZE\" returns the\r\n             entire 6 by 6 beam matrix.\r\n\"MULT\"       The ordered number of each component belonging to the- same element, starting from 1.\r\nkeyword      The value of the keyword of the component (see below).\r\n\"EXPAND\"     Distribute the value of the default-keywords and the keywords used in the matching to\r\n             all components in the beam line. No second argument.\r\n\"GX\", \"GY\", \"GZ\"  Geometric functions for the coordinate GX, GY, GZ.\r\n\"GCHI1\", \"GCHI2\", \"GCHI3\"  Geometric functions for the coordinate CHI1, CHI2, CHI3\r\n\"OGX\", \"OGY\", \"OGZ\", \"OCHI1\", \"OCHI2\", \"OCHI3\"  Geometrical functions for the orbit.\r\n Setting by LINE[keyword,..] to the DEFAULT keyword for the FIRST component changes the current value\r\nof the corresponding element, because the value of an element is stored in the first component.<\/pre>\n<pre>See also:\r\n <a href=#Lcomponents>components<\/a> <a href=#Lgeometric-functions>geometric-functions<\/a> <a href=#Lelements>elements<\/a> <a href=#Lkeywords>keywords<\/a> <a href=#Ldefault-keyword>default-keyword<\/a>\r\n <a href=#LElement>Element<\/a><\/pre>\n<\/ul>\n<li>\n<h3><a name=LOptimizeOptics>OptimizeOptics<\/a><\/h3>\n<pre>Usage: OptimizeOptics[options]\r\n\r\noptimizes (1 + MatchingResidual) or any function using DownhillSimplex with variables specified by\r\nFREE. Unlike GO, any keyword of any element can be a variable.\r\n   OptimizeOptics returns the final simplex. The variables are set to the values which give the minimum\r\nof the function so far at the end.\r\n\r\nOptions:\r\n   All options for DownhillSimplex are valid.\r\n   OptimizeFunction -> fun is the function to be minimized. The default is\r\n      ((FFS[\"CALC\"];1+MatchingResidual)&).\r\n   InitialSimplex -> initial sets the initial simplex to initial. The\r\n      default is Null, which mean to create initial from the current value\r\n      of the variables. Its format is same as for initial of \r\n      DownhillSimplex\r\n   SimplexSize -> size is the initial size of the simplex. Each variable\r\n      is relatively shifted by this amount from the current value.\r\n\r\nExample:\r\n   free Q* Q* L\r\n   fit nx .3 ny .2\r\n   OptimizeOptics[]\r\n\r\noptimizes the optics by changing the lengths of quads which are not allowed by GO, as well as K1\r\nof quads.<\/pre>\n<pre>See also:\r\n <a href=#LDownhillSimplex>DownhillSimplex<\/a><\/pre>\n<li>\n<h3><a name=LOrbitGeo>OrbitGeo<\/a><\/h3>\n<pre>OrbitGeo[location] returns the geometry {GX, GY, GZ} of the current (not design) orbit.<\/pre>\n<pre>See also:\r\n <a href=#LGEO>GEO<\/a> <a href=#LGeoBase>GeoBase<\/a><\/pre>\n<li>\n<h3><a name=LRadiationField>RadiationField<\/a><\/h3>\n<pre>To calculate the field of the synchrotron radiation from particles, first record trajectories of\r\nparticles. This is done by the function TrackParticles with a new flag RADLIGHT on. When RADLIGHT\r\nis on, TrackParticles returns a list\r\n\r\n   {beam, trajectory} ,\r\n\r\nwhere beam is a list as {location, coordinates}, and trajectory is a list\r\n\r\n   { {t1 .. tm}, {x1 ..xm}, {y1 .. ym}, {z1 .. zm} }, ..\r\n\r\nwhere {t,x,y,z}_i is the coordinates of the particle at i-th point in the trajectory. The origin\r\nand the direction of the spatial coordinates are the same as GEO coordinate {GX, GY, GZ}. One can\r\ntrack many particles at the same time by TrackParticles, so the trajectory has the dimensions {np,\r\nm}, where np is the number of particles.\r\n\r\n   After the trajectory is obtained, one can calculate the field in time domain\r\nat any observation point. This is done by the function RadiationFiled as\r\n\r\n   field = RadiationField[ trajectory[[i]], obs];\r\n\r\nwhere trajectory[[i]] is the trajectory of the i-th particle, and obs is the spatial coordinate of\r\nthe observation point in the GEO coordinate. The output field is a list\r\n\r\n   { {tau1 .. taum},\r\n     {Ex1 .. Exm}, {Ey1 .. Eym}, {Ez1 .. Ezm},\r\n     {Hx1 .. Hxm}, {Hy1 .. Hym}, {Hz1 .. Hzm},\r\n     {Sx1 .. Sxm}, {Sy1 .. Sym}, {Sz1 .. Hzm} }\r\n\r\nwhere H = (n x E)\/(c mu0) and S = E x H , and tau is the observation time.\r\n   RadiationField uses the Feynmann-Heviside formula\r\n\r\n   E = (mu0 e*CHARGE\/4pi) (c^2n\/R^2 + R\/c d(c^2n\/R^2)\/dt + d^2n\/dt^2) ,\r\n where n and R are the direction vector and the distance from the electron at the retarded time to\r\nan observation point. \r\n   The derivatives in the above formula is calculated using the spline\r\ninterpolation.\r\n\r\n   Next one can calculate the spectrum of the field by RadiationSpectrum as\r\n\r\n   spect = RadiationSpectrum[ {field[[1]], field[[k]]},\r\n        {lambda1, lambda2, dlambda} ] ,\r\n\r\nwhere filed[[k]] is one of the fields calculated by RadiationField. The range of the wavelength is\r\ngiven as a list above. The output spectrum spect is a list as\r\n\r\n   { {k1 .. kk}, {c1 .. ck}, {s1 .. sk} } ,\r\n\r\nwhere k1 .. kk is the wave number k = omega\/c, c1 .. ck and s1 .. sk are the cosine and sine integrals\r\nof the field in tau1 .. taum , i.e.,\r\n\r\n   ck + I sk = Integrate[ field[tau] Exp[I c k tau] dtau] .\r\n\r\n   An example is seen in $(SAD_ROOTPATH)\/sad\/examples.sad .<\/pre>\n<pre>See also:\r\n <a href=#LTrackParticles>TrackParticles<\/a> <a href=#LRADLIGHT>RADLIGHT<\/a><\/pre>\n<li>\n<h3><a name=LRadiationSpectrum>RadiationSpectrum<\/a><\/h3>\n<pre>To calculate the field of the synchrotron radiation from particles, first record trajectories of\r\nparticles. This is done by the function TrackParticles with a new flag RADLIGHT on. When RADLIGHT\r\nis on, TrackParticles returns a list\r\n\r\n   {beam, trajectory} ,\r\n\r\nwhere beam is a list as {location, coordinates}, and trajectory is a list\r\n\r\n   { {t1 .. tm}, {x1 ..xm}, {y1 .. ym}, {z1 .. zm} }, ..\r\n\r\nwhere {t,x,y,z}_i is the coordinates of the particle at i-th point in the trajectory. The origin\r\nand the direction of the spatial coordinates are the same as GEO coordinate {GX, GY, GZ}. One can\r\ntrack many particles at the same time by TrackParticles, so the trajectory has the dimensions {np,\r\nm}, where np is the number of particles.\r\n\r\n   After the trajectory is obtained, one can calculate the field in time domain\r\nat any observation point. This is done by the function RadiationFiled as\r\n\r\n   field = RadiationField[ trajectory[[i]], obs];\r\n\r\nwhere trajectory[[i]] is the trajectory of the i-th particle, and obs is the spatial coordinate of\r\nthe observation point in the GEO coordinate. The output field is a list\r\n\r\n   { {tau1 .. taum},\r\n     {Ex1 .. Exm}, {Ey1 .. Eym}, {Ez1 .. Ezm},\r\n     {Hx1 .. Hxm}, {Hy1 .. Hym}, {Hz1 .. Hzm},\r\n     {Sx1 .. Sxm}, {Sy1 .. Sym}, {Sz1 .. Hzm} }\r\n\r\nwhere H = (n x E)\/(c mu0) and S = E x H , and tau is the observation time.\r\n   RadiationField uses the Feynmann-Heviside formula\r\n\r\n   E = (mu0 e*CHARGE\/4pi) (c^2n\/R^2 + R\/c d(c^2n\/R^2)\/dt + d^2n\/dt^2) ,\r\n where n and R are the direction vector and the distance from the electron at the retarded time to\r\nan observation point. \r\n   The derivatives in the above formula is calculated using the spline\r\ninterpolation.\r\n\r\n   Next one can calculate the spectrum of the field by RadiationSpectrum as\r\n\r\n   spect = RadiationSpectrum[ {field[[1]], field[[k]]},\r\n        {lambda1, lambda2, dlambda} ] ,\r\n\r\nwhere filed[[k]] is one of the fields calculated by RadiationField. The range of the wavelength is\r\ngiven as a list above. The output spectrum spect is a list as\r\n\r\n   { {k1 .. kk}, {c1 .. ck}, {s1 .. sk} } ,\r\n\r\nwhere k1 .. kk is the wave number k = omega\/c, c1 .. ck and s1 .. sk are the cosine and sine integrals\r\nof the field in tau1 .. taum , i.e.,\r\n\r\n   ck + I sk = Integrate[ field[tau] Exp[I c k tau] dtau] .\r\n\r\n   An example is seen in $(SAD_ROOTPATH)\/sad\/examples.sad .<\/pre>\n<pre>See also:\r\n <a href=#LTrackParticles>TrackParticles<\/a> <a href=#LRADLIGHT>RADLIGHT<\/a><\/pre>\n<li>\n<h3><a name=LSetElement>SetElement<\/a><\/h3>\n<pre>Create\/set\/read a MAIN-level element.\r\n\r\nUsage: SetElement[ element-name, element-type, options]\r\n\r\nwhere\r\n\r\n   element-name: name of the element, either a symbol or a string\r\n   element-type: type of the element, a symbol, a string, or a number\r\n   options: one or more rules or list of rules of the form\r\n            keyword -> value or keyword :> value, to set the corresponding\r\n            value of keyword of the element.\r\n\r\n   SetElement returns a list of information of the element, in the suitable form for applying SetElement\r\nagain.\r\n   You can define a new element by SetElement.\r\n   You can change the values of keywords of the element.\r\n   You cannot, however, change the type of an existing element, nor cannot delete the element.\r\n   The element-type can be Null. If so, a null type is assumed for a new element.\r\n\r\nExamples:\r\n\r\n   LINE A = ( .. );\r\n   QUAD QF = (K1 = 0.2);\r\n   ...\r\n   FFS USE = A;\r\n     ...\r\n    SetElement[\"QF\"]                     ! reads values of QF.\r\n    SetElement[\"QF\",\"QUAD\"]              ! same as above.\r\n    SetElement[\"QF\",\"BEND\"]              ! error because QF is QUAD.\r\n    SetElement[\"QF\",,{\"K1\"->0.1}]        ! set K1 of QF to 0.1 .\r\n    SetElement[\"QF\",\"QUAD\",{\"K1\"->0.1}]  ! same as above.\r\n\r\n !Assuming QF1 and QF2 are undefined yet:\r\n\r\n    SetElement[\"QF1\",\"QUAD\",{\"K1\"->0.1}] ! create a new QUAD QF1 with K1=0.1 .\r\n    SetElement[\"QF2\",,{\"K1\"->0.1}]       ! error because no type with key.\r\n    SetElement[\"QF2\"]                    ! This is OK.\r\n    SetElement[\"QF2\",\"QUAD\"]             ! Now the type of QF2 is defined.<\/pre>\n<pre>See also:\r\n <a href=#Lelements>elements<\/a> <a href=#Lkeywords>keywords<\/a> <a href=#LElement>Element<\/a><\/pre>\n<li>\n<h3><a name=LSurvivedParticles>SurvivedParticles<\/a><\/h3>\n<pre>SurvivedParticles[x]\r\n\r\nreturns the list of 6 coordinates and the flag of the survived particles in x. The form of x is {x,\r\npx\/p0, y, py\/p0, z, dp\/p0, flag}, where each is a list of length of the number of particles. If all\r\nparticles are lost, it is a list of seven null lists.<\/pre>\n<pre>See also:\r\n <a href=#LTrackParticles>TrackParticles<\/a><\/pre>\n<li>\n<h3><a name=LSymplecticJ>SymplecticJ<\/a><\/h3>\n<pre>SymplecticJ[n] returns an n by n symplectic matrix:\r\n\r\n<img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_212.svg\" \/><\/pre>\n<li>\n<h3><a name=LSynchroBetaEmittance>SynchroBetaEmittance<\/a><\/h3>\n<pre>SynchroBetaEmittance calculates equilibrium emittance under influence of synchrotron motion and chromaticity.\r\n\r\nUsage:\r\n\r\n\r\n  SynchroBetaEmittance[{nus0, nus1, dnus},options]\r\n\r\nor\r\n\r\n   SynchroBetaEmittance[nus0,options]\r\n\r\nwhere nus0, nus1, and dnus are the starting, ending and step size of synchrotron tune, respectively.\r\nIf only nus0 is given, calculation is done only for nus0. The returned value is a list:\r\n\r\n   {{nus, emitx, emity, emitxp, emityp, conv}, ... }\r\n\r\nwhere nus, emitx, emity, emitxp, emityp, conv are the synchrotron tune, equilibrium horizontal and\r\nvertical emittances, horizontal and vertical projected emittances, and the convergence, respectively.\r\nWhen conv is negative, calculation failed to converge, and the returned emittances are not reliable.\r\n\r\nOptions\r\n              Type        Default     Meaning\r\n\r\n-----------------------------------------------------------\r\nAzimuthalModes        Real        9           Number of azimuthal modes<\/pre>\n<pre>See also:\r\n SYNCHTOBETA(SYNCHROB) <a href=#Lequilibrium-beam-envelope>equilibrium-beam-envelope<\/a><\/pre>\n<li>\n<h3><a name=LTouschekLifetime>TouschekLifetime<\/a><\/h3>\n<pre>TouschekLifetime interpolates the data calculated by EMIT or Emittance[]. There are three ways of\r\nusage:\r\n\r\n   TouschekLifetime[Infinity, Infinity, nz]: Touschek lifetime in seconds\r\n     with momentum aperture nz * SIGE.\r\n\r\n   TouschekLifetime[nx, Infinity, nz]: Touschek lifetime in seconds\r\n     with acceptance 2Jx\/(nx * (EMITX+EMITY)) + 2Jz\/(nz * EMITZ) < 1.\r\n\r\n   TouschekLifetime[Infinity, ny, nz]: Touschek lifetime in seconds\r\n     with acceptance 2Jy\/(ny * (EMITX+EMITY)) + 2Jz\/(nz * EMITZ) < 1.\r\n\r\nEMIT or Emittance[] with INTRA must precede TouschekLifetime.<\/pre>\n<pre>See also:\r\n <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LEmittance>Emittance<\/a> <a href=#LINTRA>INTRA<\/a> <a href=#LMINCOUP>MINCOUP<\/a> <a href=#Lequilibrium-beam-envelope>equilibrium-beam-envelope<\/a>\r\n<\/pre>\n<li>\n<h3><a name=LTrackParticles>TrackParticles<\/a><\/h3>\n<pre>TrackParticles[beam, destination-component, nbegin, nend]\r\n\r\nreturns a beam after the tracking at the entrance of the destination- component. The destination\r\ncan be specified by the name of the component or by a number obtained by LINE[\"POSITION\", component].\r\nIf destination is omitted, the end of the line is assumed.\r\n\r\nThe argument nbegin is the initial turn number to be passed to tracking to indicate it is in the\r\nn-th turn. The number is increased by 1 when it passes the end of beam line. If nbegin is omitted,\r\n1 is assumed.\r\n\r\nThe argument nend is the last turn number. The default is nbegin.\r\n\r\n   The variable beam and also the result of TrackParticles are lists of the form \r\n\r\n   {location, coordinates}\r\n\r\nwhere location is the position-number of the starting point. If location is same as or in the downstream\r\nof destination, the tracking is done by folding across the beginning of the beam line. The coordinates\r\nare in a list of {7 or 9, np} form, where np is the number of particles. The first 6 or 8 elements\r\nof coordinates specifies either\r\n\r\n   {x, px\/p0, y, py\/p0, z, dp\/p0} (NOPOL)\r\n   {x, px\/p0, y, py\/p0, z, dp\/p0 sy, sarg} (NOPOL)\r\nbin this order. The {-1, i} is the flag which is True(==1) when the particle is alive, and False(==0)\r\nwhen lost.\r\n\r\n   If the flag POL is on, TrackParticles performs spin tracking. Then the coordinates has two more\r\ncomponents sy and sarg, which correspond to the y-component of the classical spin vector and the\r\nangle ArcTan[sx, sz], respectively. If POL is on, another flag RADPOL turns on the Sokolov-Ternov\r\neffect.\r\n\r\n   When a flag RADLIGHT is on, TrackParticles returns the trajectories of particles which are used\r\nto calculate the radiation fields. See RadiationField and RadiationSpectrum.\r\n\r\nWhen PHOTONS is ON (default is OFF), TrackParticles generates a list of all photons radiated through\r\nthe tracking. The list is assigned to a symbol PhotonList.\r\n\r\n\r\nWhen LOSSMAP is ON (default is OFF), TrackParticles returns the component and the turn where the\r\nloss of each particle is detected.<\/pre>\n<pre>See also:\r\n <a href=#Lcomponents>components<\/a> <a href=#LLINE>LINE<\/a> <a href=#LPHOTONS>PHOTONS<\/a> <a href=#LPhotonList>PhotonList<\/a> <a href=#LRADLIGHT>RADLIGHT<\/a> <a href=#LTouschekLifetime>TouschekLifetime<\/a>\r\n <a href=#LWakeFunction>WakeFunction<\/a> <a href=#LSurvivedParticles>SurvivedParticles<\/a> <a href=#LLOSSMAP>LOSSMAP<\/a> <a href=#LPOL>POL<\/a> <a href=#LRADPOL>RADPOL<\/a><\/pre>\n<li>\n<h3><a name=LTwiss>Twiss<\/a><\/h3>\n<pre> Twiss[optical-function, component] returns the value of the optical-function at the entrance of\r\ncomponent. The values are those calculated by the last CALCULATE(CALC) or GO commands, or CalculateOptics\r\nfunction.\r\n The second argument, component can be a name of component, a component number, or a list of them.\r\nIf the number has a fraction, the intermediate value in the component is calculated.\r\n Twiss[\"ALL\",component] or Twiss[\"*\",component] returns all 28 optical-functions at the entrance\r\nof component as a list:\r\n\r\n{AX, BX, GMX, NX, AY, BY, GMY, NY, EX, EPX, EY, EPY, R1, R2, R3, R4, DETR, DX, DPX, DY, DPY, DZ,\r\nDDP, AZ, BZ, GMZ, NZ, ZX, ZPX, ZY, ZPY},\r\n\r\nwhich can be directly used in CalculateOptics. In the current version, however, parameters after\r\nAZ are uninteresting, because it always returns 1 for BZ and zeros for the others. \"R\"\/\/optical-function\r\nrefers the reference optics. \"D\"\/\/optical-function refers the difference between the current and\r\nthe referece optics. \"RALL\" and \"DAL\" mean the all optical functions for the reference optics and\r\nthe differences, respectively.\r\n   Keywords \"PEX\", \"PEPX\", \"PEY\", \"PEPY\", \"PZX\", \"PZPX\", \"PZY\", \"PZPY\" return dispersions in the\r\nphysical coordinate.\r\n   Keywords \"LENGTH\", \"GAMMA\", \"GAMMABETA\", \"S\", \"SIGab\" return the same results as for the function\r\nLINE.\r\n   The units of NX, NY, NZ are in radian.<\/pre>\n<pre>See also:\r\n <a href=#LDRAW>DRAW<\/a> <a href=#Loptical-functions>optical-functions<\/a> <a href=#Lextended-Twiss-parameters>extended-Twiss-parameters<\/a> CalculateOptics <a href=#LLINE>LINE<\/a>\r\n <a href=#Lreference-optics>reference-optics<\/a><\/pre>\n<li>\n<h3><a name=LVariableRange>VariableRange<\/a><\/h3>\n<pre>Usage:   VariableRange[element, keyword ,v_] := expression\r\n\r\nwhere the current value of the element:keyword is passed in v_, and expression should give False\r\nwhen the value is out of range.\r\n\r\nExample: VariableRange[\"QF\",\"ROTATE\",v_]:= -0.1 < v < 0.1;\r\n\r\nThis restricts the range of the rotation angle of QF within +-100 mrad.\r\n\r\n         VariableRange[_,\"ROTATE\",v_]:= -0.1 < v < 0.1;\r\n\r\nThis specifies the same for all elements.\r\n   The expression can also return the range as a list {vmin, vmax}, which may give more chance of\r\nsolution-finding for the matching routine.\r\n   VariableRange only acts for variables used in the matching with the FREE command.<\/pre>\n<pre>See also:\r\n <a href=#LFREE>FREE<\/a> <a href=#Lset-value-of-element>set-value-of-element<\/a><\/pre>\n<li>\n<h3><a name=LVariableWeight>VariableWeight<\/a><\/h3>\n<pre>Usage:   VariableWeight[element, keyword ,v_] := expression\r\n\r\nwhere the default weight for matching with element:keyword is passed in v_, and expression should\r\nreturn a modified value of weight. If non-real is returned, the default weight is used.\r\n\r\nExample: VariableWeight[\"QF\",\"K1\",v_]:= 0.1*v;\r\n\r\nreduces the weight of QF1:K1 to 1\/10 of the default value.\r\n\r\n   The weight also affects the step size of the numerical derivative of the response. A smaller weight\r\nmakes the step size larger.\r\n\r\n   VariableWeight only acts for variables used in the matching with the FREE command.<\/pre>\n<pre>See also:\r\n <a href=#LFREE>FREE<\/a> <a href=#Lset-value-of-element>set-value-of-element<\/a><\/pre>\n<li>\n<h3><a name=LWakeFunction>WakeFunction<\/a><\/h3>\n<pre>   WakeFunction[Longitudinal, comp]={{z1, wl1}, ..., {zn, wln}};\r\n   WakeFunction[Transverse,   comp]={{z1, wt1}, ..., {zn, wtn}};\r\n\r\nspecify longitudinal and transverse dipole wake functions at a component comp (string). Each functions\r\nis a list of {z, w} where z is the distance (z>=0) and w is the value of the wake, in the unit of\r\neither V\/C or V\/C\/m.\r\n   The wake functions are applied at the component comp, giving kicks to each orbit whose initial\r\nconditions are given by InitialOrbits. The sufficient number of orbits depends on the situation.\r\n   WakeFunction is valid only when TRPT and INS, and also either TWAKE or LWAKE is ON.\r\n   For tracking, it is only valid in TrackParticles.<\/pre>\n<pre>See also:\r\n <a href=#LTrackParticles>TrackParticles<\/a> <a href=#LTRPT>TRPT<\/a> <a href=#LINS>INS<\/a> <a href=#LTWAKE>TWAKE<\/a> <a href=#LLWAKE>LWAKE<\/a><\/pre>\n<\/ul>\n<li>\n<h3><a name=LGraphics>Graphics<\/a><\/h3>\n<pre>Graphics represents an object for 2D graphics with the form\r\nGraphics[primitives, options]. Up to now available primitives are:\r\n\r\nCircle[{cx,cy},rx, options]             : Circle. \r\nCircle[{cx,cy},{rx,ry}, options]        : Oval. \r\nPoints[{{x1,y1} .. {x2,y2}}, options]   : Points.\r\nPoints[{{x1,y1,dx,dy} .. {x2,y2,dx,dy}}, options]  : Points with error bars.\r\nLine[{{x1,y1} .. {x2,y2}}, options]     : Line.\r\nLine[{{x1,y1,dx,dy} .. {x2,y2,dx,dy}}, options]    : Line with error bars.\r\nRectangle[{x1,y1}, {x2,y2}]             : A box.\r\nRectangle[{x1,y1}, {x2,y2}, graphic]    : Graphics in a box.\r\nPolygon[{{x1,y1} .. {x2,y2}}, options]  : Polygon.\r\nText[{string, {x,y}}, options]          : Text-string at {x,y}.\r\n\r\nPossible options and their defaults values of Graphics are:\r\n\r\noption           default         optional values\r\n------------------------------------------------\r\nAspectRatio      GoldenRatio     any positive number\r\nDisplayFunction  $DisplayFunction  Identity or Null to suppress display\r\nDetach           False           True to run tdr asynchronously\r\nEpilog           {}              List of primitives\r\nFrame            True            False to erase outline, ticks, ticklabels.\r\nFrameClick       True            to allow click on frame to change options.\r\nFrameLabel       {\"\",\"\",\"\",\"\"}   List of strings\r\nFrameTicks       {Both,Both,Ticks,Ticks}\r\n                                 None to turn off ticks and labels\r\n                                 Both to turn on ticks and labels\r\n                                 Ticks to turn on ticks only\r\n                                 << For bottom tick >>\r\n                                 False is same as Ticks\r\n                                 True is same as Both\r\n                                 << For top tick >>\r\n                                 False is same as None\r\n                                 True is same as Ticks\r\n                                 << For left &#038; right ticks >>\r\n                                 False is same as None\r\n                                 True is same as Both\r\n                                 If a form {___, _List} is given where\r\n                                 the List is a list of {coord, label, opt___}\r\n                                 label is displayed at coord with option opt.\r\n                                 If a form {___, fun} is given and \r\n                                 fun[coord,exp,org] returns a list of options\r\n                                 for Canvas[Create$Text], it is displayed at major\r\n                                 ticks at coord. exp is the exponent and org is the\r\n                                 original label.\r\nGridLines        Automatic       Automatic to draw grid lines at major ticks\r\n                                 {Automatic,None} for only x\r\n                                 {None,Automatic} for only y\r\n                                 Both, Minor, and Major can be also used.\r\nPlotLabel        \"\"              string\r\nPlotRange        Automatic       {ymin,ymax} or {{xmin,xmax},{ymin,ymax}}\r\nProlog           {}              List of promitives\r\nScale            {Linear,Linear} Log, Date\r\nTickSize         1               relative size of ticks.\r\nFrameThickness   Automatic       thickness of the frame line incl. ticks.\r\nLegend           \"\"              shows legend-string.\r\nFontScale        1               Relative size of fonts for FrameLabel, FrameTicks.\r\nFrameFontScale   1               Relative size of fonts for FrameLabel.\r\n                                 If Real, applied to all frames. If List, applied to\r\n                                 bottom, left, top, right, supplemented 1s to the right.\r\nTickFontScale    1               Relative size of fonts for FrameTicks.\r\n                                 If Real, applied to all frames. If List, applied to\r\n                                 bottom, left, top, right, supplemented 1s to the right.\r\nLegendFontScale  1               Relative size of fonts for Legend.\r\n\r\nOptions for primitives:\r\n\r\nFor Text:\r\noption           default         optional values\r\n------------------------------------------------\r\nTextAlign        \"\"              \"CENTER\"\r\nTextCases        \"\"              string to represent CASES of TopDrawer\r\nTextPosition     \"\"              \"DATA\" to represent the position by data\r\n                                 coordinates\r\nTextRotate       0\r\nTextSize         1               relative size of a character\r\nPlotColor        \"Black\"         one of \"White\", \"Black\", \"Red\",\r\n                                 \"Green\",\"Blue\",\"Yellow\",\r\n                                 \"Magenta\",\"Cyan\"\r\n\r\nFor Point\r\noption           default         optional values\r\n------------------------------------------------\r\nPointSize        1               relative size of a point\r\nPointSymbol      \"1O\"            Symbol for PLOT of TopDrawer, or Bar\r\n                                 \"6O\",\"7O\",\"8O\",\"9O\" are triangles\r\n                                 in CanvasDrawer.\r\nPlotColor        \"Black\"         one of \"White\", \"Black\", \"Red\",\r\n                                 \"Green\",\"Blue\",\"Yellow\",\r\n                                 \"Magenta\",\"Cyan\"\r\nErrorBarTickSize 1               length of error bar ticks.\r\n\r\nFor Line\r\noption           default         optional values\r\n------------------------------------------------\r\nDashing          \"1\"             character string or a list of numbers to\r\n                                 represent the dashing of the line.\r\nPlot             True            whether plot symbols at data points.\r\n                                 If True, PointSize and PointSymbol are\r\n                                 effective (see above).\r\nPlotColor        \"Black\"         one of \"White\", \"Black\", \"Red\",\r\n                                 \"Green\",\"Blue\",\"Yellow\",\r\n                                 \"Magenta\",\"Cyan\"\r\nErrorBarTickSize 1               length of error bar ticks.\r\nThickness        1               thickness of line\r\n\r\nFor Polygon\r\noption           default         optional values\r\n------------------------------------------------\r\nPlot             False           whether plot symbols at data points.\r\n                                 If True, PointSize and PointSymbol are\r\n                                 effective (see above).\r\nPointSize        1               relative size of a point\r\nPointSymbol      \"1O\"            Symbol for PLOT of TopDrawer, or Bar\r\n                                 \"6O\",\"7O\",\"8O\",\"9O\" are triangles\r\n                                 in CanvasDrawer.\r\nPointColor       \"forest green\"  point fill color.\r\nPointBorderColor Automatic       point border color.\r\n                                 Automatic measn PointColor.\r\nPointTags        Null            points tag string or list of tag strings.\r\nPlotJoined       True            whether plot border line of polygon.\r\nThickness        1               thickness of border line\r\n\r\nDashing          \"1\"             character string or a list of numbers to\r\n                                 represent the dashing of the line.\r\nPlotColor        \"black\"         border line color.\r\nLineTags         Null            border line tag string.\r\nFillColor        Null            polygon fill color.\r\n                                 Null means empty polygon.\r\nTags             False           polygon tag string.\r\n\r\n   ListPlot accepts options for Graphics, Point, and Line.   Show accepts\r\noptions for Graphics.   The output is written to file #9 (fort.9 in OSF1 and\r\nftn09 in HP-UX) in TopDrawer commands.   If SAD is running on X, the plot is\r\nalso done immediately.\r\n\r\nExamples:\r\n  g1=ListPlot[{{1,2},{10,20}},Scale->Log,PlotJoined->True,\r\n    DisplayFunction->Identity];\r\n  g2=ListPlot[{{1,15},{10,3}},Scale->Log,PlotJoined->True,Dashing->\"1 0.3\",\r\n    DisplayFunction->Identity,Plot->False];\r\n  g3=ListPlot[{{1,2.5},{5,10},{10,12}},Scale->Log,\r\n    DisplayFunction->Identity];\r\n  Show[g1,g2,g3,FrameLabel->{\"X (mm)\",\"Log(Y)\"},PlotLabel->\"Test Plot\",\r\n      AspectRatio->1];<\/pre>\n<ul>\n<li>\n<h3><a name=LBeamPlot>BeamPlot<\/a><\/h3>\n<pre>Usage: BeamPlot[loc, axes, options]\r\n\r\nplots a beam ellipse at a location loc, for axes. Axes are given by a list \r\n{ax, ay}, where ax and ay are one of \"X\", \"PX\", \"Y\", \"PY\", \"Z\", \"DP\".\r\nThe beam envelope should be calculated by (CODPLOT;EMIT) or BEAM commands before\r\nBeamPlot.\r\n\r\noptions       defaults\r\n-----------------------------------------\r\nOrbit         True                Uses Twiss[\"DX\",loc], etc. as the center of\r\n                                  ellipse.\r\nSizeFunction  \"SIZE\"              If \"SIG\", LINE[\"SIG\"] is used.\r\n                                  LINE[\"SIZE\"] is the default.\r\nAspectRatio   1\r\nDataRange     Default             If Default, PlotRange becomes square for\r\n                                  axes = {\"X\", \"Y\"} or {\"PX\", \"PY\"}<\/pre>\n<pre>See also:\r\n <a href=#LBEAMSIZE(BEAM)>BEAMSIZE(BEAM)<\/a> <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LCODPLOT>CODPLOT<\/a><\/pre>\n<li>\n<h3><a name=LColumnPlot>ColumnPlot<\/a><\/h3>\n<pre>Usage:  ColumnPlot[data, options, ...]\r\n\r\nplots a column plot.\r\n1) If data is a 1D vector, it makes a simple column plot.\r\n2) If data is a 2D matrix, it makes a multiple-column plot.\r\n3) If data is a 3D list, it makes a stacked, multiple-column plot.\r\n\r\nBesides options common for all plotting functions, ColumnPlot has its own\r\noptions:\r\n\r\nOption           Value          Default             Action\r\n---------------------------------------------------------------------------\r\nColumnOffset    0 < number < 1  0.15            Ratio of spacing of columns\r\nReference        number         0               Where column starts\r\nOrientation     Vertical        Vertical        Orientation of columns\r\n                Horizontal\r\nColumnLabel     List of Str.    Automatic       Labels for each column\r\n                Function                        Scale for column number\r\n                None                            No labels\r\nFillColor       color                           Colors to fill columns\r\n                list of colors\r\nMeshStyle       bitmap                          Bitmap to fill columns\r\n                list of bitmaps                 to distinguish stacking\r\nTextSize        positive number 1               relative label size\r\nPlotNull        True or False   False           plot a minimal rect for 0 occurrence\r\n\r\nExample:\r\n  g=ColumnPlot[{{{1,1,2},{2,2,3}}, {{1,4,2},{2,2,3}}, {{1,3,2},{2,2,3}}}, Orientation->Horizontal];\r\n\r\n Update[];\r\n\r\n<img decoding=\"async\" src=\"\/SAD\/SADHelp_img\/ColumnPlot.png\" align=\"middle\" width=540>\r\n<\/pre>\n<pre>See also:\r\n <a href=#LGraphics>Graphics<\/a><\/pre>\n<li>\n<h3><a name=LFitPlot>FitPlot<\/a><\/h3>\n<pre>Usage: FitPlot[data, fun, var, {par1,ini1}, .. , {parn, inin}, opt].<\/pre>\n<pre>See also:\r\n <a href=#LFit>Fit<\/a><\/pre>\n<li>\n<h3><a name=LGeometryPlot>GeometryPlot<\/a><\/h3>\n<pre>Usage: GeometryPlot[options]\r\n\r\nplots a geometry of beam line.\r\n\r\noptions       defaults\r\n-----------------------------------------\r\nRegion        {1,LINE[\"LENGTH\"]}  {begin, end}, begin and end can be strings.\r\n                                  Both begin and end point of drawing region\r\n                                  could be given by \"S\" unit by using S[begin|end] form.\r\nNames         \"*\"                 A pattern of component names to be plotted.<\/pre>\n<pre>See also:\r\n <a href=#LGraphics>Graphics<\/a> <a href=#LOpticsPlot>OpticsPlot<\/a><\/pre>\n<li>\n<h3><a name=LHistoPlot>HistoPlot<\/a><\/h3>\n<pre>Usage:  HistoPlot[data, options, ...]\r\n\r\nplots a histogram using ColumnPlot(default) or ListPlot.\r\nData can be a single list, or list of lists, which results in a multi-column histogram on a common\r\naxis.\r\nBesides options common for all plotting functions and ColumnPlot, it has its own options:\r\n\r\nOption           Value          Default             Action\r\n---------------------------------------------------------------------------\r\nBins            number          Automatic           number of bins\r\nBinRange        {min,max}       Automatic           Range of bins\r\nPlotStyle       ColumnPlot      ColumnPlot          plot function\r\n                ListPlot\r\n                FitPlot\r\nOrientation     Vertical        Vertical            orientation of columns\r\n                Horizontal\r\nFitParameters   args for FitPlot in a list<\/pre>\n<pre>See also:\r\n <a href=#LGraphics>Graphics<\/a> <a href=#LColumnPlot>ColumnPlot<\/a> <a href=#LListPlot>ListPlot<\/a> <a href=#LFitPlot>FitPlot<\/a><\/pre>\n<li>\n<h3><a name=LListContourPlot>ListContourPlot<\/a><\/h3>\n<pre>Usage:  ListContourPlot[list, options, ...]\r\n\r\nplots a contour plot by list which is a 2D List of Real data.\r\n\r\nOption           Value            Default         Action\r\n---------------------------------------------------------------------------\r\nContours         Real             10              number of contours\r\nPlotRange        {min,max}, {prxy, prz}, or {prx, pry, prz}\r\n                                  Automatic       depth of contours (prz) and PlotRange for x-y (prxy)\r\nAspectRatio\r\n     Real             1\r\nMeshRange        ({x1,xn},{y1,yn}} or {{x1,..,xn},{y1,..,y1n}}\r\n                                  Automatic       Range of x and y axes\r\nColorFunction    Color scheme (Blue, Purple, Pink, Yellow, Green, Cyan),Function, or String\r\n                                  Blue            Null or None means \"white\"\r\nContourColorFunction\r\n                 Function or String\r\n                                  Automatic       Null or None to hide\r\nColorScale       True or False    True            displays a color scale on the right\r\nSmoothing        integer >= 0     1               number of linear interpolations\r\n\r\nExample:\r\n xr0=0;xr=Table[xr0+=Sin[i*Pi\/21],{i,20}];xr-=(xr[[1]]+xr[[-1]])\/2;\r\n yr=xr;\r\n table=Outer[Cos[Sqrt[(#^2+#2^2)\/2]]&,xr,yr];\r\n\r\n gc=Graphics[MapThread[\r\n  Rectangle[#2,#3,\r\n    ListContourPlot[table, MeshRange->{xr, yr}, AspectRatio->1,\r\n      DisplayFunction->Identity, ColorFunction->#,\r\n      FrameLabel->{\"x\", \"y\", ToString[#]}]]&,\r\n   {{ Blue,        Pink,       Green,      Purple,      Yellow,     Cyan},\r\n     {{-0.15,0.65},{0.25,0.65},{0.65,0.65},{-0.15,0   },{0.25,0   },{0.65,0}},\r\n     {{ 0.2, 1.1 },{0.6, 1.1 },{1,   1.1 },{ 0.2, 0.45},{0.6 ,0.45},{1.0, 0.45}}}]];\r\n Show[gc];Update[];\r\n<img decoding=\"async\" src=\"\/SAD\/SADHelp_img\/ListContourPlot.png\" align=\"middle\" width=540>\r\n<\/pre>\n<pre>See also:\r\n <a href=#LGraphics>Graphics<\/a> <a href=#LListPlot>ListPlot<\/a> <a href=#LListDensityPlot>ListDensityPlot<\/a><\/pre>\n<li>\n<h3><a name=LListDensityPlot>ListDensityPlot<\/a><\/h3>\n<pre>Usage:  ListDensityPlot[list, options, ...]\r\n\r\nplots a density plot by list which is a 2D List of Real data.\r\n\r\nOption           Value            Default         Action\r\n---------------------------------------------------------------------------\r\nPlotRange        {min,max}, {prxy, prz}, or {prx, pry, prz}\r\n                                  Automatic       depth of contours (prz) and PlotRange for x-y (prxy)\r\nAspectRatio\r\n     Real             1\r\nMeshRange        ({x1,xn},{y1,yn}} or {{x1,..,xn},{y1,..,y1n}}\r\n                                  Automatic       Range of x and y axes\r\nColorFunction    Color scheme (Blue, Purple, Pink, Yellow, Green, Cyan),Function, or String\r\n                                  Blue            Null or None means \"white\"\r\nMesh             True or False    False           True to draw mesh\r\nMeshColor        Function or String\r\n                                  Automatic       Null or None to hide\r\nColorScale       True or False    True            displays a color scale on the right\r\nSmoothing        integer >= 0     1               number of linear interpolations\r\n\r\nExample:\r\n   data = Table[Sin[x]\/Cos[x^2 + y^2], {x, -2, 2, 0.1}, {y, -2, 2, 0.1}];\r\n   ListDensityPlot[data,PlotRange->{-5,5}, MeshRange->{{-2,2},{-2,2}}, FrameLabel->{\"x\",\"y\"}];\r\n   Update[];\r\n\r\n<img decoding=\"async\" src=\"\/SAD\/SADHelp_img\/ListDensityPlot.png\" align=\"middle\" width=540>\r\n<\/pre>\n<pre>See also:\r\n <a href=#LGraphics>Graphics<\/a> <a href=#LListPlot>ListPlot<\/a> <a href=#LListContourPlot>ListContourPlot<\/a><\/pre>\n<li>\n<h3><a name=LListPlot>ListPlot<\/a><\/h3>\n<pre>Usage: ListPlot[{{x1,y1},..,{xn,yn}}, options]\r\n\r\nmakes a graphic with points.\r\nListPlot[{y1,..,yn}, options] assumes 1,..n for the x-xoordinate.\r\nListPlot[{{x,y,dy}, ..}, options ] plots error bars of length dy in y.\r\nListPlot[{{x,y,dx,dy}, ..}, options ] plots error bars in x and y.\r\n\r\noption           default         optional values\r\n------------------------------------------------\r\nPlotJoined       False           True\r\n                                 Step\r\nStepRatio        1               ratio of stepping position\r\n                                 between two data points\r\n\r\nType ? to see other options for Graphics.\r\n\r\nExample:\r\n  data1={{1,2},{3,5},{4,-1}};\r\n  data2={{1,4},{2,-2},{3.5,3},{5,3}};\r\n  g1=ListPlot[data1, PointColor->\"dark slate blue\",PlotJoined->True, Thickness->2, PlotColor->\"dark\r\nslate blue\", FrameLabel->{\"x\",\"y\"}, Legend->\"data1\", DisplayFunction->Identity];\r\n  g2=ListPlot[data2, PointColor->\"tomato\", Legend->\"data2\", DisplayFunction->Identity];\r\n  Show[g1,g2];\r\n  Update[];\r\n\r\n<img decoding=\"async\" src=\"\/SAD\/SADHelp_img\/ListPlot.png\" align=\"middle\" width=540>\r\n<\/pre>\n<pre>See also:\r\n <a href=#LGraphics>Graphics<\/a> <a href=#LPlot>Plot<\/a><\/pre>\n<li>\n<h3><a name=LOpticsPlot>OpticsPlot<\/a><\/h3>\n<pre>Usage: OpticsPlot[fun_list, options]\r\n\r\nmakes a plot of built-in optical functions, user-defined functions, or\r\nlist of data at components on the beam line.   The parameters are:\r\n\r\n            \r\nfun_list:   a list of objects to be plotted in a window. The number of windows in a plot is the length\r\n            of fun_list object plotted in a window MUST have same dimensions. An element of fun_list\r\n            is one of fun_label, fun, list_data or a list as {object, options}, where\r\nfun_label:  one of \"AX\", \"BX\", \"GMX\", \"NX\", \"EX\", \"EPX\", \"DX\", \"DPX\", \"AY\", \"BY\", \"GMY\", \"NY\", \"EY\",\r\n            \"EPY\", \"DY\", \"DPY\", \"R1\", \"R2\", \"R3\", \"R4\", \"DETR\", \"AZ\", \"BZ\", \"GMZ\", \"NZ\", \"ZX\", \"ZPX\",\r\n            \"ZY\", \"ZPY\", \"DZ\",\"DDP\",\"PEX\", \"PEPX\", \"PEY\", \"PEPY\", \"GAMMA\", \"GAMMABETA\",\"SIGab\", where\r\n            a and b in \"SIGab\" are one of X, PX, Y, PY, Z, DP. \"R\"\/\/fun_label refers the reference\r\n            optics. \"D\"\/\/fun_label refers the difference between the current and reference optics.\r\nfun:        Any function of the component number.   A fractional number may be used to obtain the\r\n            intermediate value.\r\nlist_data:  a list of {{pos1, val1}..{posn,valn}}.\r\n\r\noptions       defaults\r\n-----------------------------------------\r\nRegion        {1,LINE[\"LENGTH\"]}  {begin, end}, begin and end can be strings.\r\n                                  Both begin and end point of drawing region\r\n                                  could be given by \"S\" unit by using S[begin|end] form.\r\nLattice       True                False to turn of drawing lattice\r\nLatticeRegion Automatic           {low,high}, the region where lattice is drawn\r\nFrameHeight   Automatic           List of relative heights of each frame\r\nInfoLabel     False               If True, pressing Button shows Twiss, etc.\r\nNames         \"*\"                 A pattern of component names to be plotted.\r\nRemoveOverlap \"L$NAME\"            If not \"L$NAME\", overlapping of lattice names\r\n                                  remain untouched.\r\nTags          False               True to attach tags \"C$\"\/\/(component name)\r\n                                  to each rectangle for the lattice, and\r\n                                  \"L$\"\/\/(component name) to the component \r\n                                  label (CanvasDrawer only).\r\nLegend        False               If Automatic, Legend is composed from FrameLabel\r\n                                  Automatically.\r\n\r\noptions in a fun_list element:\r\noptions       defaults\r\n-----------------------------------------\r\nUnit          1                  Unit of the object. \"Meter\", \"InvMeter\",etc.\r\nFrameLabel    \"\"                 Left frame label.\r\nLegend        False               If Automatic, Legend is composed from FrameLabel\r\n                                  Automatically.\r\n\r\nExample:\r\n   p2=OpticsPlot[{{\"BX\",\"BY\"}, {\"DX\",{{{10,0.001},{20,0.002}}, FrameLabel->\"DX meas.\", Unit->Meter,\r\nThickness->2, Names->\"Q*\"}}}];\r\n   Update[];\r\n\r\n<img decoding=\"async\" src=\"\/SAD\/SADHelp_img\/OpticsPlot.png\" align=\"middle\" width=540>\r\n<\/pre>\n<pre>See also:\r\n <a href=#LGraphics>Graphics<\/a> <a href=#LListPlot>ListPlot<\/a> <a href=#LTwiss>Twiss<\/a> <a href=#Lreference-optics>reference-optics<\/a><\/pre>\n<li>\n<h3><a name=LPlot>Plot<\/a><\/h3>\n<pre>Usage: Plot[fun, range, options] or Plot[{fun1, .. }, range, options],\r\n\r\nwhere fun is a function and range is a list given as {x, xmin, xmax}.\r\n\r\noptions        defaults\r\n-----------------------------------------\r\nMaxBend        0.04\r\nPlotPoints     25\r\nPlotDivision   250\r\nDashing        {\"1\",\"0.8 0.24\",\"0.4 0.12\",\"0.2 0.08\",\"0.1 0.08\",\r\n                  \"0.8 0.08 0.08 0.08\",\"0.4 0.08 0.08 0.08\"}\r\nOptions for ListPlot and Graphics are also available\r\n\r\nThe independent variable should have been cleared (i.e., no value should\r\nnot be set) when Plot is called. \r\n\r\nExample:\r\n  ff[x_]:=Sin[x]\/x;\r\n\r\n  ff[0]=1;\r\n  Plot[{Cos[x],ff[x]}, {x,0,10}, Thickness->2];\r\n  Update[];\r\n\r\n<img decoding=\"async\" src=\"\/SAD\/SADHelp_img\/Plot.png\" align=\"middle\" width=540>\r\n<\/pre>\n<pre>See also:\r\n <a href=#LGraphics>Graphics<\/a> <a href=#LListPlot>ListPlot<\/a><\/pre>\n<\/ul>\n<li>\n<h3><a name=LInput\/Output>Input\/Output<\/a><\/h3>\n<pre><\/pre>\n<ul>\n<li>\n<h3><a name=L$FORM>$FORM<\/a><\/h3>\n<pre>$FORM is a character-string to specify the format of the output of a real number.\r\n\r\nUsage: $FORM=\"w.f\"\r\n       $FORM=\"Sw.f\"\r\n       $FORM=\"Fw.f\"\r\n       $FORM=\"Mw.f\"\r\n\r\nwhere w is the width of the output, and f is the length of the fractions. If S is attached, trailing\r\nzeroes are omitted. If F is attached, it becomes same as FORTRAN's F-format. If M is attached, the\r\nexponent is expressed as 10^n. If w and f are omitted, 17.15 is assumed.\r\n   The default is S17.15 .<\/pre>\n<li>\n<h3><a name=L$Input>$Input<\/a><\/h3>\n<pre>$Input holds the file number for console input stream. The default is -1.<\/pre>\n<pre>See also:\r\n <a href=#L$Output>$Output<\/a><\/pre>\n<li>\n<h3><a name=L$Output>$Output<\/a><\/h3>\n<pre>$Output holds the file number for console output. The default is -1.<\/pre>\n<pre>See also:\r\n <a href=#L$Input>$Input<\/a><\/pre>\n<li>\n<h3><a name=LClose>Close<\/a><\/h3>\n<pre> Close[f] closes file number [f]. It is necessary to complete the output to an external file.\r\n Close[f1, ...] and Close[{f1, ...}] close all files f1, ...<\/pre>\n<pre>See also:\r\n <a href=#LOpenRead>OpenRead<\/a> <a href=#LOpenWrite>OpenWrite<\/a> <a href=#LOpenAppend>OpenAppend<\/a> <a href=#LOpenShared>OpenShared<\/a> <a href=#LStringToStream>StringToStream<\/a>\r\n<\/pre>\n<li>\n<h3><a name=LOpenAppend>OpenAppend<\/a><\/h3>\n<pre>f = OpenAppend[file]\r\n\r\nopens file (_String) for write and returns the file number (_Real)<\/pre>\n<pre>See also:\r\n <a href=#LClose>Close<\/a> <a href=#LOpenRead>OpenRead<\/a> <a href=#LOpenWrite>OpenWrite<\/a><\/pre>\n<li>\n<h3><a name=LOpenRead>OpenRead<\/a><\/h3>\n<pre>f = OpenRead[file]\r\n\r\nopens file (_String) for read and returns the file number (_Real)<\/pre>\n<pre>See also:\r\n <a href=#LClose>Close<\/a> <a href=#LOpenWrite>OpenWrite<\/a> <a href=#LOpenAppend>OpenAppend<\/a><\/pre>\n<li>\n<h3><a name=LOpenWrite>OpenWrite<\/a><\/h3>\n<pre>f = OpenWrite[file]\r\n\r\nopens file (_String) for write and returns the file number (_Real)<\/pre>\n<pre>See also:\r\n <a href=#LClose>Close<\/a> <a href=#LOpenRead>OpenRead<\/a> <a href=#LOpenAppend>OpenAppend<\/a><\/pre>\n<li>\n<h3><a name=LPageWidth>PageWidth<\/a><\/h3>\n<pre>PageWidth is the number of columns of the output. The default is set from GetEnv[\"WIDTH\"].<\/pre>\n<li>\n<h3><a name=LPrint>Print<\/a><\/h3>\n<pre>\r\n   Print[expr1 [,expr2 ...]]\r\n\r\nconverts expr1... to _String then write them to $Output. A newline character is appended at the end.<\/pre>\n<pre>See also:\r\n <a href=#LWrite>Write<\/a> <a href=#LWriteString>WriteString<\/a><\/pre>\n<li>\n<h3><a name=LRead>Read<\/a><\/h3>\n<pre>Read[f, item [, item1...] [, opts..]]\r\n\r\nreads item from file number f. If f is $Input, it reads from the current input stream. item can be\r\none of or a list of:\r\nWord        a word, delimited by WordSeparators\r\nReal        a real expression\r\nExpression  an expression\r\nCharacter   a single character\r\n\r\n A format n*item is possible with a positive integer n.\r\n A list {item1,.., itemn} is possible. The result is also a list.\r\n\r\n opts are options given by a Rule:\r\nOption         Value       Default    Effect\r\nWordSeparator  _String     \" ,\\t\"     the delimiters for Word\r\nReadNewRecord  True\/False  True       If true, read the next record of the file beyond the end of\r\nline\r\nNullWords      True\/False  False      If True, \"\" is returned when the input contains adjavent word\r\nseparators<\/pre>\n<pre>See also:\r\n <a href=#LOpenRead>OpenRead<\/a> <a href=#LClose>Close<\/a><\/pre>\n<li>\n<h3><a name=LReadString>ReadString<\/a><\/h3>\n<pre>ReadString[f]\r\n\r\nreads the next record from file number f, and returns it as a _String.<\/pre>\n<pre>See also:\r\n <a href=#LRead>Read<\/a> <a href=#LOpenRead>OpenRead<\/a> <a href=#LClose>Close<\/a><\/pre>\n<li>\n<h3><a name=LStandardForm>StandardForm<\/a><\/h3>\n<pre>StandardForm[expr]\r\n\r\nresets $FORM and PageWidth to their defaults, then evaluate expr, returns the result, and resets\r\n$FORM and PageWidth to those at the beginning of StandardForm.<\/pre>\n<pre>See also:\r\n <a href=#L$FORM>$FORM<\/a> <a href=#LPageWidth>PageWidth<\/a><\/pre>\n<li>\n<h3><a name=LStringToStream>StringToStream<\/a><\/h3>\n<pre>f = StringToStream[string]\r\n\r\nopens a character string for read and returns the file number (_Real)<\/pre>\n<pre>See also:\r\n <a href=#LClose>Close<\/a><\/pre>\n<li>\n<h3><a name=LWrite>Write<\/a><\/h3>\n<pre>   Write[f, expr1 [,expr2 ...]]\r\n\r\nconverts expr1... to _String then write them to file number f. A newline character is appended at\r\nthe end.<\/pre>\n<pre>See also:\r\n <a href=#LWriteString>WriteString<\/a> <a href=#LPrint>Print<\/a> <a href=#LOpenWrite>OpenWrite<\/a> <a href=#LOpenAppend>OpenAppend<\/a> <a href=#LClose>Close<\/a> <a href=#L$FORM>$FORM<\/a> <a href=#LPageWidth>PageWidth<\/a>\r\n <a href=#LStandardForm>StandardForm<\/a><\/pre>\n<li>\n<h3><a name=LWriteString>WriteString<\/a><\/h3>\n<pre>WriteString[f, expr1 [,expr2 ...]]\r\n\r\nconverts expr1... to _String then write them to file number f. No newline character is appended.<\/pre>\n<pre>See also:\r\n <a href=#LWrite>Write<\/a> <a href=#LOpenWrite>OpenWrite<\/a> <a href=#LOpenAppend>OpenAppend<\/a> <a href=#LClose>Close<\/a> <a href=#L$FORM>$FORM<\/a> <a href=#LPageWidth>PageWidth<\/a> <a href=#LStandardForm>StandardForm<\/a>\r\n<\/pre>\n<\/ul>\n<li>\n<h3><a name=LMultiprocessing>Multiprocessing<\/a><\/h3>\n<pre><\/pre>\n<ul>\n<li>\n<h3><a name=LFork>Fork<\/a><\/h3>\n<pre>Forks the process into a parent and a child processes.\r\n\r\n   Fork[]\r\n\r\nreturns 0 and the child's pid for the child and the parent, respectively.<\/pre>\n<li>\n<h3><a name=LOpenShared>OpenShared<\/a><\/h3>\n<pre>Allocated shared memory of n bytes.\r\n\r\n\r\n   s = OpenShared[n] ,\r\n\r\nwhere s is a file number to be used by Shared function. The allocated memory can be released by Close[s].<\/pre>\n<li>\n<h3><a name=LShared>Shared<\/a><\/h3>\n<pre>Read\/Write to the shared memory.\r\n\r\n   Shared[s]\r\n   Shared[s] = x\r\n   Shared[s] := x\r\n\r\nwhere s is given by OpenShared, and x is Real, built-in function, String, defined symbol, or list\r\nof them.<\/pre>\n<li>\n<h3><a name=LSharedSize>SharedSize<\/a><\/h3>\n<pre>Returns the size of an object for OpenShared.\r\n\r\n   n = SharedSize[x] <\/pre>\n<\/ul>\n<li>\n<h3><a name=LObject-oriented-programing>Object-oriented-programing<\/a><\/h3>\n<pre>Environment for an object-oriented-programming is supplied by:\r\n\r\nClass:          The function to define a class.\r\ncontext:        A class defines a context to define its all symbols for\r\n                the variables and methods within the context.\r\n                This automatically avoids conflicts of symbols between \r\n                classes, Global, and System. When c = Class[ ... ] is\r\n                done, a context c` is defined.\r\n\r\nmembers:        The set of Members of a class is a union of class variables,\r\n                instance variables, and class methods of the class.\r\n\r\noperator @:     A special operator to access class member. In a notation \r\n                f@g, g's context defaults the class of the class of f. \r\n                f@g@h[x] is recognized as ((f@g)@h)[x] , thus the context of\r\n                h defaults the class of f.\r\n\r\nsuperclasses:   A class inherits all class variables, instance variables,\r\n                class methods from its superclasses which are give by the\r\n                first argument of Class. If a null list is given, Object` \r\n                is set as the default superclass. Multiple inheritance is\r\n                allowed.\r\n\r\nclass variable: Class variables are given by the second argument of Class\r\n                as a list of symbols. They are unique in the class.\r\n                They can be initialized by declaring in a way such as \r\n                {a=1, {b, c} = {2, 3}} like Module. A form like\r\n                {a = b = c =1} is allowed.\r\n\r\ninstance variable: \r\n                Instance variables are given by the third argument of Class\r\n                as a list of symbols. An instance has those symbols\r\n                separately. They can be initialized by declaring in a way\r\n                such as {a=1, {b, c} = {2, 3}} like as Module. A form like as\r\n                {a = b = c =1} is allowed. Also they\r\n                are initialized at the creation of instance by rules as\r\n                x = c[ a->1, b:>Print[d]], etc.\r\n\r\nclass methods:  Class methods are given by the fourth(last) argument of\r\n                Class. They must be in the form of either one of\r\n\r\n                f_[arg___] := g_;\r\n                With[_, f_[arg___] := g_];\r\n                With[_, f_[arg___] := g_; .. ];\r\n                If[_,\r\n                  ft_[argt___] := gt_; ..,\r\n                  ft_[argf___] := gf_; ..,];\r\n                h_[f_[arg___], b___] ^:= g_; .\r\n\r\n                where f is the symbol for the method to be defined.\r\n                Set may be used instead of SetDelayed if necessary.\r\n\r\nThis:           A symbol This in the definition of the method, it is \r\n                translated to the object (the instance or the class) which \r\n                refers the member.\r\n\r\ndefault reference:\r\n                In the definition of the class methods, whenever a member of\r\n                the class is appeared, it is recognized as This@member.\r\n                When a symbol of the member conflicts the symbol in System`,\r\n                the system symbol should be wrapped by Literal.\r\n\r\nreference of member of superclasses:\r\n                Members of the superclasses (denote cc) are referred by \r\n                cc`member in the definition of the method.\r\n\r\ncopying an instance:\r\n                An instance c of a class can be copied to another symbol\r\n                by c1 = c. After the copying, c1 and c refer the identical\r\n                instance. Destructing one of them by such as c1=. clears\r\n                the instance and also all the assigned symbols.\r\n\r\nConstructor:    When an instance is defined, by x = c[arg], a method\r\n                x@Constructor[arg] is always invoked.\r\n                In evaluation of instance definition under class scope,\r\n                class member symbol appeared 1st slot of Rule or RuleDelayed\r\n                argument is sent to Constructor of new class instance\r\n                without evaluation. (In other term, class member symbol on\r\n                1st slot of Rule or RuleDelayed argument behaves like\r\n                evaluating with implicit Literal[]) One can configure\r\n                Constructor[] in the definition of the class.\r\n                x = c[arg] returns the returned value of Constructor[arg].\r\n                The rules in the argument work in two ways: (1) A rule for an\r\n                instance variable or a class variable sets the initial value\r\n                of the variable, (2) Other rules are stored in an instance\r\n                variable Options as a list.\r\n\r\nDestructor:     An instance x is cleared by (x=.), which invokes \r\n                x@Destructor[]. The default Destructor is Object`Destructor,\r\n                but one can reconfigure it in the definition of the class.\r\n\r\nShort:          When an instance x is returned as the result of expression\r\n                for Out[], x@Short[] is invoked to show the result. The \r\n                default Short is Object`Short, but one can reconfigure it\r\n                in the definition of the class.\r\n\r\nother methods:  Class[] gives the class of the instance.\r\n                Parents[] gives the immediate superclasses.\r\n                AllParents[] gives the all superclasses.\r\n                Members[] gives a list of class variables, class methods,\r\n                and instance variables of the class.\r\n                AllMembers[] gives a list of class variables, class methods,\r\n                and instance variables of the class and its all parents.<\/pre>\n<pre>See also:\r\n <a href=#LMember(@)>Member(@)<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=LClass>Class<\/a><\/h3>\n<pre>Class sets up a class of objects.\r\n\r\nUsage:   a = Class[\r\n               list of superclasses,\r\n               list of class-variables,\r\n               list of instance-variables,\r\n               class-methods];\r\n\r\nExample: a = Class[\r\n               {aa, bb},      (* aa and bb are superclasses *)\r\n               {a1, a2},      (* class-variables *)\r\n               {v1, v2},      (* instance-variables *)\r\n               Constructor[arg__] := (Print[{arg}]; v1 = Plus[arg]);\r\n               sum[] := v1 + v2 (* defining Constructor and method \"sum\"*)\r\n             ];\r\n\r\n         a1 = a[1, 2]          (* creating an instance of a *)\r\n         a1@v1                 (* accessing an instance variable *)\r\n         a1@v2 = 3             (* setting an instance variable *)\r\n         a1@sum[]              (* calling a method \"sum\" *)\r\n         a1=.                  (* delete an instance *)<\/pre>\n<\/ul>\n<li>\n<h3><a name=LRandom-number-functions>Random-number-functions<\/a><\/h3>\n<pre>The random number functions use common seed given by SEED command or SeedRandom function. It has\r\nan initial value 17 at the beginning of FFS. The cut-off value of GaussRandom[] is given by variable\r\nGCUT.<\/pre>\n<pre>See also:\r\n special-variables: <a href=#LGCUT>GCUT<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=LRandom>Random<\/a><\/h3>\n<pre>Random[]           gives a uniform random number between 0 and 1.\r\nRandom[n]          gives a list of n uniform random numbers.\r\nRandom[n1, n2, ..] gives a (n1 * n2 * .. ) tensor of uniform random numbers.<\/pre>\n<pre>See also:\r\n <a href=#LGaussRandom>GaussRandom<\/a> <a href=#LParabolaRandom>ParabolaRandom<\/a> <a href=#LSeedRandom>SeedRandom<\/a><\/pre>\n<li>\n<h3><a name=LGaussRandom>GaussRandom<\/a><\/h3>\n<pre>GaussRandom[]           gives a Gaussian random number with average 0, \r\n                        standard deviation 1, cutoff at GCUT.\r\nGaussRandom[n]          gives a list of n Gaussian random numbers.\r\nGaussRandom[n1, n2, ..] gives a (n1 * n2 * .. ) tensor of Gaussian random\r\n                        numbers.<\/pre>\n<pre>See also:\r\n <a href=#LRandom>Random<\/a> <a href=#LParabolaRandom>ParabolaRandom<\/a> <a href=#LSeedRandom>SeedRandom<\/a><\/pre>\n<li>\n<h3><a name=LParabolaRandom>ParabolaRandom<\/a><\/h3>\n<pre>ParabolaRandom[]           gives a parabola random number between -1 and 1. \r\nParabolaRandom[n]          gives a list of n parabola random numbers.\r\nParabolaRandom[n1, n2, ..] gives a (n1 * n2 * .. ) tensor of parabola random\r\n                           numbers.<\/pre>\n<pre>See also:\r\n <a href=#LRandom>Random<\/a> <a href=#LGaussRandom>GaussRandom<\/a> <a href=#LSeedRandom>SeedRandom<\/a><\/pre>\n<li>\n<h3><a name=LSeedRandom>SeedRandom<\/a><\/h3>\n<pre>SeedRandom[plugin_String] selects new pseudo random-number generator\r\n                          plugin named as plugin.\r\nSeedRandom[seed_Real]     initializes the internal state of the current\r\n                          pseudo random-number generator plugin by seed.\r\nSeedRandom[{seeds__Real}] initializes the internal state of the current\r\n                          pseudo random-number generator plugin by {seeds}.\r\nSeedRadnom[state_List]    restores both the selection of the pseudo random-number\r\n                          generator plugin and the internal state of the selected\r\n                          plugin by using state dumped by SeedRandom[].\r\nSeedRandom[]              returns List containing both the current selected pseudo\r\n                          random-number generator plugin name and its internal state.<\/pre>\n<pre>See also:\r\n <a href=#LListRandom>ListRandom<\/a> <a href=#LRandom>Random<\/a> <a href=#LGaussRandom>GaussRandom<\/a> <a href=#LParabolaRandom>ParabolaRandom<\/a><\/pre>\n<li>\n<h3><a name=LListRandom>ListRandom<\/a><\/h3>\n<pre>ListRandom[] returns List of available pseudo random-number generator plugins.<\/pre>\n<pre>See also:\r\n <a href=#LSeedRandom>SeedRandom<\/a><\/pre>\n<\/ul>\n<li>\n<h3><a name=LSystem-interface>System-interface<\/a><\/h3>\n<pre><\/pre>\n<ul>\n<li>\n<h3><a name=LSystem>System<\/a><\/h3>\n<pre>System[string] executes string as a shell command. It returns the system return code.<\/pre>\n<li>\n<h3><a name=LTemporaryName>TemporaryName<\/a><\/h3>\n<pre>TemporaryName[] returns a unique file name for a temporary use.<\/pre>\n<\/ul>\n<li>\n<h3><a name=LUtilities>Utilities<\/a><\/h3>\n<pre><\/pre>\n<ul>\n<li>\n<h3><a name=LDateString>DateString<\/a><\/h3>\n<pre> DateString[] returns the current date and time as string  \"mm\/dd\/CCYY HH:MM:SS\".\r\n DateString[date] converts date to string as above. The date can be either a real number (in second,\r\ndate=0 is 1\/1\/1900 0:0:0) or a list of 6 reals {Y,m,d,H,M,S}.<\/pre>\n<li>\n<h3><a name=LMemoryCheck>MemoryCheck<\/a><\/h3>\n<pre>MemoryCheck[n]\r\n\r\nchecks the consistency of the memory allocation by SAD. The range of the check and the output depend\r\non n:\r\n\r\n                \r\nMemoryCheck[]   : checks the consistency of the free area and returns the allocation info,\r\nMemoryCheck[1]  : checks the consistensy of the free and used areas. Returns the allocation info.\r\nMemoryCheck[2]  : checks the consistensy of the free and used areas. Returns the allocation info.\r\n                and a list of free segments.\r\n\r\n The returned value is {used, allocated from system, # of free segments, missing size[, list of free\r\nsegments]} in units of word (= 8 bytes).\r\n If an inconsistency is found, messages are printed out.<\/pre>\n<li>\n<h3><a name=LTimeUsed>TimeUsed<\/a><\/h3>\n<pre>TimeUsed[] returns the cputime since the start of SAD in seconds.<\/pre>\n<pre>See also:\r\n <a href=#LTiming>Timing<\/a><\/pre>\n<li>\n<h3><a name=LTiming>Timing<\/a><\/h3>\n<pre>Timing[fun]\r\n\r\nevaluates fun and returns {cputime, result}. cputime is in seconds.<\/pre>\n<pre>See also:\r\n <a href=#LTimeUsed>TimeUsed<\/a><\/pre>\n<li>\n<h3><a name=LTracePrint>TracePrint<\/a><\/h3>\n<pre>TracePrint[fun]\r\n\r\nprints out all function calls and each expression compound in \";\" in the evaluation of fun.<\/pre>\n<\/ul>\n<\/ul>\n<h3><a name=LFIT>FIT<\/a><\/h3>\n<pre>Usage: (1) FIT [component]\r\n       (2) FIT component1 component2\r\n\r\nsets the current location where the matching condition is applied. The component is given with the\r\nform name[.order][{+-}offset] (see components). If component is omitted, the end of the beam line\r\nis chosen.\r\n   If two components are given, it means a relative-fitting or zone-fitting. If the fitting condition\r\nis not maximum-fitting, the condition means to make values at two components equal (for AX, BX, GMX,\r\nAY, BY, GMY, EX, EPX, EY, EPY, R1, R2, R3, R4, DX, DPX, DY, DPY, PEX, PEPX, PEY, PEPY, CHI1, CHI2,\r\nCHI3),  or have the specified difference (for NX, NY, LENG, GX, GY, GZ). If the fitting condition\r\nis maximum-fitting, the condition means a zone-fitting (for AX, BX, GMX, AY, BY, GMY, EX, EPX, EY,\r\nEPY, R1, R2, R3, R4, DX, DPX, DY, DPY, PEX, PEPX, PEY, PEPY, CHI1, CHI2, CHI3), which suppress the\r\nmaximum of the function in the region between component1 and component2, or maximum-fitting for the\r\ndifference of the function (for NX,  NY, LENG, GX, GY, GZ). The fit region is shown in the first\r\npart of the prompt when FFSPRMPT is ON.\r\n\r\nExamples: (1) FIT QF.2-10\r\n\r\nsets the current fit point at  10 components upstream from the entrance of the second QF.\r\n\r\n          (2) FIT QF QD NX 0.5 BXM 10\r\n\r\nsets the two-point fitting between QF and QD, then set the difference of NX between QF and QD to\r\nbe 0.5, and the maximum of BX to be 10 in the region between QF and QD.<\/pre>\n<pre>See also:\r\n <a href=#Lmatching-function-commands>matching-function-commands<\/a> <a href=#Lcomponents>components<\/a> <a href=#LSHOW>SHOW<\/a> <a href=#LGO>GO<\/a> <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a>\r\n<\/pre>\n<h3><a name=LFITPOINTS(FITP)>FITPOINTS(FITP)<\/a><\/h3>\n<pre>Usage: FITP n\r\n\r\n sets n to the number of off-momentum points in the off-momentum matching. If the fitting condition\r\nis on-momentum only, it is not affected.<\/pre>\n<pre>See also:\r\n <a href=#Lmatching-function-commands>matching-function-commands<\/a><\/pre>\n<h3><a name=LFIX>FIX<\/a><\/h3>\n<pre>Usage: (1) FIX element-pattern [keyword] [element-pattern1 [keyword1]..]\r\n\r\nremoves elements which match element-pattern from the matching variables. The optional keyword specifies\r\nthe non-default variables. If the keyword is omitted, all keywords are removed.\r\n   For the MARK element at the beginning of the beam line, a special form can be used for the FIX\r\ncommand. That is a form &lt matching-function>&gt I (appending \"I\" to a matching-function name).\r\n\r\nExample: FIX AXI BXI AYI BYI\r\n\r\nremoves incoming AX, BX, AY, and BY from the matching variables.\r\n\r\nUsage: (2) FIX\r\n\r\nsets the standard optics for the orbit correction commands.<\/pre>\n<pre>See also:\r\n <a href=#LFREE>FREE<\/a> <a href=#LFIT>FIT<\/a> <a href=#LSHOW>SHOW<\/a> <a href=#LGO>GO<\/a> <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a> <a href=#Lwildcards>wildcards<\/a> <a href=#Lelements>elements<\/a><\/pre>\n<h3><a name=LFREE>FREE<\/a><\/h3>\n<pre>Usage: FREE element-pattern [keyword] [element-pattern1 [keyword1]..]\r\n\r\nspecifies elements which match element-pattern as the matching variables. The optional keyword specifies\r\nthe non-default variables. See default-keyword. \r\n   For the MARK element at the beginning of the beam line, a special form can be used for the FREE\r\ncommand. That is a form &lt matching-function &gt I  (appending \"I\" to a matching-function name)\r\nwhich means the incoming condition of the matching-function is varied in the matching.\r\n\r\nExample: FREE AXI BXI AYI BYI\r\n\r\nchanges incoming AX, BX, AY, and BY to find the solution.<\/pre>\n<pre>See also:\r\n <a href=#LFIX>FIX<\/a> <a href=#LFIT>FIT<\/a> <a href=#LSHOW>SHOW<\/a> <a href=#LGO>GO<\/a> <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a> <a href=#Lwildcards>wildcards<\/a> <a href=#Lelements>elements<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=Ldefault-keyword>default-keyword<\/a><\/h3>\n<pre>The default and available non-default variable keywords are:\r\n\r\ntype    default-keyword  non-default variable keyword\r\nDRIFT   L                -\r\nBEND    ANGLE            K1,K0,E1,E2\r\nQUAD    K1               ROTATE\r\nSEXT    K2               ROTATE\r\nOCT     K3               ROTATE\r\nDECA    K4               ROTATE\r\nDODECA  K5               ROTATE\r\nMULT    K1               K0,K2..K21,SK0,SK1,SK2..SK21,ROTATE,ANGLE\r\nMARK    -                AX,BX,EX,EPX,AY,BY,EY,EPY,R1,R2,R3,R4,DETR,\r\n                         DX,DPX,DY,DPY,DZ,DDP,AZ,BZ,ZX,ZPX,ZY,ZPY<\/pre>\n<pre>See also:\r\n <a href=#Lkeywords>keywords<\/a><\/pre>\n<\/ul>\n<h3><a name=Lgeometric-functions>geometric-functions<\/a><\/h3>\n<pre>Available geometric-functions are:\r\n\r\nGX      geometrical coordinate xi\r\nGY      geometrical coordinate eta\r\nGZ      geometrical coordinate zeta\r\nCHI1    geometrical rotation angle ch1_1\r\nCHI2    geometrical rotation angle ch1_2\r\nCHI3    geometrical rotation angle ch1_3\r\n\r\nThe geometrical coordinate {xi, eta, zeta} is set by the ORG command, and its default origin is at\r\nthe entrance of the beam line, and the default directions are xi in s-direction, eta in -(x-direction),\r\nand zeta in -(y-direction) at the entrance. The set {xi, eta, zeta} forms a right-hand system.\r\n   The rotation angles are defined so as to give the local {x,y,s} is written\r\n\r\n    {x, y, s}_local\r\n   = rotate[s, chi3] rotate[x, chi2] rotate[y, -chi1]{x, y, s}_origin,\r\n\r\nwhere rotate[a, b] reads \"rotate around the new-a vector by b right-handedly.\r\n\r\ngeometric functions disignate the geometry of the coordinate. If the geometry of orbit is needed,\r\nuse LINE[\"OGEO\"], etc., or DISP OG.<\/pre>\n<pre>See also:\r\n <a href=#Loptical-functions>optical-functions<\/a> <a href=#Lmatching-function-commands>matching-function-commands<\/a> <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a>\r\n <a href=#LGEOCAL>GEOCAL<\/a> <a href=#LGEOFIX>GEOFIX<\/a> <a href=#LORG>ORG<\/a> <a href=#LLINE>LINE<\/a><\/pre>\n<h3><a name=LGO>GO<\/a><\/h3>\n<pre>Usage: GO [[NO]EXPAND]\r\n\r\nDoes matching for fitting conditions given by matching-function-commands with variables specified\r\nby FREE.\r\n\r\nIf an option EXPAND is given (default), it expands the beam line before the calculation. If NOEXPAND\r\nis given, it avoids any expansion.   FFS[\"CAL\"] and FFS[\"GO\"] returns the result as a list, whose\r\nformat is\r\n\r\n   {dp, kind, reslist, function-values},\r\n\r\nwhere\r\n\r\n          \r\ndp:       a list contains dp\/p0 .\r\nkind:     a list of kind of the orbit (usually 0, but 1 to 6 for the finite amplitude matching, see\r\n          MatchingAmplitude).\r\nreslist:  a list of {residual, xstab, ystab}, where\r\n       residual: matching residual,\r\n       xstab:    True when the matrix is stable in X,\r\n       ystab:    True when the matrix is stable in Y, for each orbit.\r\n\r\nAbove are lists with length nf (== number of orbits).\r\n\r\nfunction-values: a list of length nc (== number of calculated items). Each element has the form:\r\n\r\n       {component1, component2, function, list-of-values},\r\n\r\n       where\r\n\r\n       component1, component2: fit locations (see FIT).\r\n       function: name of the function (see matching-function-commands).\r\n       list-of-values: list of the value of the function for each orbit Length nf.\r\n       The central orbit comes at the Floor[(n+1)\/2]-th element.<\/pre>\n<pre>See also:\r\n <a href=#LFIT>FIT<\/a> <a href=#LSHOW>SHOW<\/a> <a href=#Lmatching-function-commands>matching-function-commands<\/a> <a href=#Loff-momentum-matching>off-momentum-matching<\/a>\r\n <a href=#LFREE>FREE<\/a> <a href=#LFIX>FIX<\/a> <a href=#LVARIABLES(VAR)>VARIABLES(VAR)<\/a> <a href=#LCOUPLE(COUP)>COUPLE(COUP)<\/a> <a href=#LATTRIBUTE(ATTR)>ATTRIBUTE(ATTR)<\/a> <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a>\r\n <a href=#LVARY>VARY<\/a> <a href=#LSHOW>SHOW<\/a> <a href=#LCONV>CONV<\/a> <a href=#LCONVERGENCE>CONVERGENCE<\/a> <a href=#LMatchingResidual>MatchingResidual<\/a> <a href=#LMatchingAmplitude>MatchingAmplitude<\/a>\r\n <a href=#LFitFunction>FitFunction<\/a> <a href=#LFFS>FFS<\/a> <a href=#LOptimizeOptics>OptimizeOptics<\/a><\/pre>\n<h3><a name=LIF>IF<\/a><\/h3>\n<pre>Usage: IF expr1 body1 [ELSEIF expr2 body2 [ELSEIF ..]] [ELSE body3] ENDIF\r\n\r\nThis is a FORTRAN77 like IF-structure. If the expression expr1 is True(==1) or nonzero, executes\r\ncommands in body1. If it is False(==0), skip commands until ELSE, ELSEIF or ENDIF appears at the\r\nsame level of the IF-structure, and executes commands after ELSE or ENDIF, or executes the ELSEIF\r\ncommand. If expr1 is not a real number, an error message is printed and ignores the command line.<\/pre>\n<pre>See also:\r\n <a href=#LELSE>ELSE<\/a> <a href=#LELSEIF>ELSEIF<\/a> <a href=#LENDIF>ENDIF<\/a> <a href=#Lexpression>expression<\/a> <a href=#Lcommand-syntax>command-syntax<\/a> If<\/pre>\n<h3><a name=LINPUT(IN)>INPUT(IN)<\/a><\/h3>\n<pre>IN {filename | file-number} switches the input stream to the specified file or the file-number. The\r\noriginal stream is kept and to be returned by TERMINATE(TERM). The input file is not rewound.<\/pre>\n<pre>See also:\r\n <a href=#LTERMINATE(TERM)>TERMINATE(TERM)<\/a> <a href=#LCLOSE(CLO)>CLOSE(CLO)<\/a> <a href=#LREAD>READ<\/a> <a href=#LOUTPUT(OUT)>OUTPUT(OUT)<\/a> <a href=#LAPPEND(APP)>APPEND(APP)<\/a>\r\n <a href=#LEND>END<\/a><\/pre>\n<h3><a name=Lmachine-error-commands>machine-error-commands<\/a><\/h3>\n<pre>Usage: machine-error-command [options] amount component-pattern ..\r\n\r\nwhere machine-error-command is one of\r\n\r\ncommand    keyword affected     applicable types\r\nDELX       DX                   BEND QUAD SEXT OCT DECA DODECA SOL CAV\r\nDELY       DY                   BEND QUAD SEXT OCT DECA DODECA SOL CAV\r\nDL         L                    DRIFT SOL\r\nDTHETA     ROTATE               QUAD SEXT OCT DECA DODECA CAV\r\nDTHETA     DROTATE              BEND\r\nDK         default-keyword      DRIFT BEND QUAD SEXT OCT DECA DODECA MULT SOL CAV\r\nDDK        K0 or DBZ            BEND SOL\r\n\r\n   amount is the amount of the error,\r\n   component-pattern is the pattern to specify the components to be applied.\r\n\r\n   Options are\r\n\r\n                 \r\nRANDOM(R)        Set amount*GaussRandom[] to the keyword.\r\nUNIFORM(U)       Set the specified amount to the keyword without random number.\r\nINCOHERENT(INC)  GaussRandom[] is called for each component. Default.\r\nCOHERENT(C)      GaussRandom[] is called once for each component-pattern.\r\nPUT(P)           Set the error to the keyword. Default.\r\nADD(A)           Add the error to the keyword.<\/pre>\n<pre>See also:\r\n <a href=#Lcomponents>components<\/a> <a href=#Lwildcards>wildcards<\/a> <a href=#Lkeywords>keywords<\/a> <a href=#Ldefault-keyword>default-keyword<\/a> <a href=#LDUMP>DUMP<\/a> <a href=#LSEED>SEED<\/a>\r\n<\/pre>\n<h3><a name=Lmatching-function-commands>matching-function-commands<\/a><\/h3>\n<pre>Usage: (1) matching-function  goal-value [off-momentum-points]\r\n       (2) matching-functionM goal-value [off-momentum-points]\r\n       (3) matching-functionI incoming-value\r\n       (4) matching-functionSCALE scale\r\n\r\n(1) sets the matching condition for matching-function at the current fitting point or region with\r\nthe goal-value and the off-momentum-points (see off-momentum-matching).\r\n   If off-momentum-points is omitted, the previous value for this matching-function at this fitting-point\r\nis assumed. If the previous value is not defined, 1 is assumed. If -1 is given for off-momentum-points,\r\nthe matching-function is rejected from the matching (see REJECT(REJ)).\r\n   If \"*\" is given for goal-value, the previous value is used if exists.\r\n\r\nExample:   BX 10 3    (beta_x to be 10 at 3 momenta) \r\n           BX 20      (now beta_x to be 20 at 3 momenta (previous setting))\r\n           BX *  5    (now beta_x to be 20 (previous setting) at 5 momenta)\r\n\r\n(2) If the letter \"M\" is appended to matching-function, it means the maximum-fitting for the function.\r\nThe maximum of either the value (for positive-definite functions) or the absolute value (for bipolar\r\nfunctions) are to be limited in the matching.\r\n\r\n(3) If the letter \"I\" is appended to matching-function, it specifies the value of the incoming beam.\r\n\r\n(4)\r\nIf SCALE is appended to matching-function, it sets the scale of the input\/output of the function\r\nto scale. This scale is used in the matching-function commands, DISPLAY(DISP), SHOW, etc.\r\n(5) If the current fit location is at a MARK, @ for the goal value refers the save value at the MARK.\r\n@- refers -(save value). These are useful to match between two beam lines.\r\n\r\n   Available matching-functions are:\r\noptical-functions (see optical-functions):\r\nAX BX GMX NX AY BY GMY NY EX EPX EY EPY R1 R2 R3 R4 DETR DX DPX DY DPY DZ DDP PEX PEPX PEY PEPY TRX\r\nTRY LENG\r\ngeometric-functions (see geometric-functions):\r\nGX GY GZ CHI1 CHI2 CHI3<\/pre>\n<pre>See also:\r\n <a href=#LFIT>FIT<\/a> <a href=#LGO>GO<\/a> <a href=#LSHOW>SHOW<\/a> <a href=#LMARK>MARK<\/a> <a href=#Loptical-functions>optical-functions<\/a> <a href=#Lgeometric-functions>geometric-functions<\/a>\r\n <a href=#Loff-momentum-matching>off-momentum-matching<\/a> <a href=#Lx-y-coupling>x-y-coupling<\/a> <a href=#LREJECT(REJ)>REJECT(REJ)<\/a> <a href=#Lspecial-variables>special-variables<\/a>\r\n <a href=#LDP>DP<\/a> <a href=#Lfunctions>functions<\/a> <a href=#LFitValue>FitValue<\/a> <a href=#LMatchingAmplitude>MatchingAmplitude<\/a><\/pre>\n<h3><a name=Lmulti-turn-tracking>multi-turn-tracking<\/a><\/h3>\n<pre>The multi-turn tracking can be done by TrackParticles or DynamicApertureSurvey[] function in FFS.\r\n\r\nThe\r\nmulti-turn tracking uses the closed orbit, normal coordinate, and the equilibrium emittances. Therefore\r\nOne of EMITTANCE(EMIT), the Emittance[] function, or the EMIT command in the MAIN level are necessary\r\nto be done once in prior to the multi-turn-tracking. The values of EMITX, EMITY, EMITZ, SIGE can\r\nbe changed between EMITs and the multi-turn-tracking.<\/pre>\n<pre>See also:\r\n <a href=#LTrackParticles>TrackParticles<\/a> <a href=#LDynamicApertureSurvey>DynamicApertureSurvey<\/a> <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a>\r\n <a href=#LRFSW>RFSW<\/a> <a href=#LRAD>RAD<\/a> <a href=#LFLUC>FLUC<\/a> <a href=#LRADCOD>RADCOD<\/a> <a href=#LSPAC>SPAC<\/a> <a href=#LWSPAC>WSPAC<\/a> <a href=#Lspecial-variables>special-variables<\/a> <a href=#Lequilibrium-beam-envelope>equilibrium-beam-envelope<\/a>\r\n<\/pre>\n<h3><a name=LMATRIX(MAT)>MATRIX(MAT)<\/a><\/h3>\n<pre>Usage: MATRIX [{SYMPLECTIC(S) | PHYSICAL(P)}] [from to]\r\n\r\nprints out the 4 by 5 (w\/CALC4D) or 6 by 6 (w\/CALC6D) transfer matrix from from-component to to-component.\r\nIf SYMPLECTIC(S) is specified (default), the symplectic transfer matrix on {x,px\/p0,y,py\/p0,dp\/p0}\r\nwhere p0 is the nominal momentum at the entrance, is given. Otherwise, in the case of TRPT, the transfer\r\nmatrix on {x,px\/p0(s),y,py\/p0(s),dp\/p0(s)} is printed out.\r\n   If the from- and to- components are omitted, entire beam line is assumed.\r\nIf to-component is upstream the from-component, it gives the inverse matrix (TRPT) or one-turn-wrapped\r\nmatrix (RING).<\/pre>\n<pre>See also:\r\n <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a> <a href=#LTRPT>TRPT<\/a> <a href=#LRING>RING<\/a> <a href=#LCALC4D>CALC4D<\/a> <a href=#LCALC6D>CALC6D<\/a> TransferMatrix<\/pre>\n<h3><a name=LMEASURE(MEA)>MEASURE(MEA)<\/a><\/h3>\n<pre>Usage: MEA [end-component] [OUT file plot-spaces]\r\n\r\ntracks particles from the entrance to end-component and prints out the statistics at the end. If\r\nend-component is omitted, the component end used in the last MEASURE(MEA) (default: end of the beam\r\nline) is assumed.\r\n   If OUT file plot-spaces are attached, it plots phase space distribution on file. The phase-spaces\r\nare specified like as X-PX, \r\nor X-Y, etc., (up to any numbers).\r\n   Parameters for the tracking are specified by special-variables and flags:\r\n\r\nseed for the random-number generator:\r\n     SeedRandom[seed_Real] or SeedRandom[{seeds__Real}]\r\n\r\nspecial-variables (can be set with =):\r\n     NP        number of particles \r\n     EMITX     horizontal emittance\r\n     EMITY     vertical emittance\r\n     DP        relative momentum spread\r\n     DP0       relative momentum offset dp\/p0\r\n     GCUT      cut-off value of the Gaussian tail\r\nflags:\r\n     GAUSS\/UNIFORM    Gaussian\/uniform(default) momentum distribution\r\n     JITTER\/NOJITTER  off(default)\/on nullifying the incoming centroid offset\r\n     RFSW\/NORFSW      switch on(default)\/off the rf-cavities\r\n     RAD\/NORAD        synchrotron radiation on\/off\r\n     RADCOD\/NORADCOD  off\/on compensation of energy loss due to radiation\r\n     FIXSEED\/MOVESEED keep(default)\/unkeep the initial random-number seed\r\n\r\n   The initial transverse distribution is Gaussian.<\/pre>\n<pre>See also:\r\n <a href=#Lspecial-variables>special-variables<\/a> <a href=#LTrackParticles>TrackParticles<\/a> <a href=#LSeedRandom>SeedRandom<\/a> RESULTOFTRACKING<\/pre>\n<h3><a name=Loff-momentum-matching>off-momentum-matching<\/a><\/h3>\n<pre>FFS matches the optical functions for an orbit with finite momentum deviation.\r\n\r\nExample: \r\n   DP=0.01;      sets the range of momentum to DP0-0.01 < dp\/p0 < DP0+0.01 .\r\n   BX 10 9;      sets the goal of betax to 10 m, at 9 points.\r\n                 in the range above, i.e.,\r\n                 dp\/p0 = {-0.01,-0.0075,-0.005,-0.0025,0,\r\n                          0.0025,0.005,0.0075,0.01} + DP0 .\r\n   GO starts the matching.\r\n\r\nAs this example, the off-momentum points are chosen with equal separation. If the off-momentum point\r\nn is an even number, the chosen points are same as the case of n+1, but the on-momentum point (==DP0)\r\nis excluded.<\/pre>\n<pre>See also:\r\n <a href=#Lmatching-function-commands>matching-function-commands<\/a> <a href=#LDP>DP<\/a> <a href=#LDP0>DP0<\/a><\/pre>\n<h3><a name=Loptical-functions>optical-functions<\/a><\/h3>\n<pre>Available optical functions for matching are:\r\n\r\n      \r\nAX    alpha_X\r\nBX    beta_X\r\nGMX   gamma_X\r\nNX    psi_X, the default scale is 1\/(2Pi)\r\nAY    alpha_Y\r\nBY    beta_Y\r\nGMY   gamma_Y\r\nNY    psi_Y, the default scale is 1\/(2Pi)\r\nEX    eta_X   (dispersion_X)\r\nEPX   eta_Px  (dispersion_PX)\r\nEY    eta_Y   (dispersion_Y)\r\nEPY   eta_Py  (dispersion_PY)\r\nR1    R_1     (see x-y-coupling)\r\nR2    R_2     (see x-y-coupling)\r\nR3    R_3     (see x-y-coupling)\r\nR4    R_4     (see x-y-coupling)\r\nDETR  R_1*R_4 - R_2*R_3 (see x-y-coupling)\r\nDX    dx\r\nDPX   dpx\r\nDY    dy\r\nDPY   dpy\r\nDZ    dz\r\nDDP   delta=dp\/p0\r\nAZ    alpha_Z\r\nBZ    beta_Z\r\nGMZ   gamma_Z\r\nNZ    psi_Z, the default scale is 1\/(2Pi)\r\nZX    zeta_X  (z-dispersion_X)\r\nZPX   zeta_Px (z-dispersion_PX)\r\nZY    zeta_Y  (z-dispersion_Y)\r\nZPY   zeta_Py (z-dispersion_PY)\r\nPEX   eta_x   (dispersion_x)\r\nPEPX  eta_px  (dispersion_px)\r\nPEY   eta_y   (dispersion_y)\r\nPEPY  eta_yy  (dispersion_py)\r\nTRX   trace(T_X), only defined at the end of the beam line.\r\nTRY   trace(T_Y), only defined at the end of the beam line.\r\nLENG  length of the design orbit\r\n\r\nIn the above, upper case X, Px, Y, Py represents the x-y decoupled coordinate. EX, EPX, EY, EPY refer\r\nthe decoupled coordinate, while PEX, PEPX, PEY, PEPY are in the physical coordinate. On the other\r\nhand,  DX, DPX, DY, DPY refer the physical coordinate.<\/pre>\n<pre>See also:\r\n <a href=#Lgeometric-functions>geometric-functions<\/a> <a href=#Lx-y-coupling>x-y-coupling<\/a> <a href=#Lmatching-function-commands>matching-function-commands<\/a>\r\n <a href=#LGO>GO<\/a> <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a> <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a> <a href=#LSHOW>SHOW<\/a><\/pre>\n<h3><a name=LORG>ORG<\/a><\/h3>\n<pre>Usage: ORG location, dgx, dgy, dgz, dchi1, dchi2, dch3\r\n\r\nsets the origin of the geometrical coordinate relative to the location with a relative shift (dgx,\r\ndgy, dgz) and rotation (dchi1, dchi2, dchi3).<\/pre>\n<h3><a name=LOUTPUT(OUT)>OUTPUT(OUT)<\/a><\/h3>\n<pre>OUT {filename | file-number} switches the output stream to the specified file or the file-number.\r\nThe file is written from the beginning.<\/pre>\n<pre>See also:\r\n <a href=#LTERMINATE(TERM)>TERMINATE(TERM)<\/a> <a href=#LCLOSE(CLO)>CLOSE(CLO)<\/a> <a href=#LINPUT(IN)>INPUT(IN)<\/a> <a href=#LREAD>READ<\/a> <a href=#LAPPEND(APP)>APPEND(APP)<\/a>\r\n <a href=#LEND>END<\/a><\/pre>\n<h3><a name=Lpattern>pattern<\/a><\/h3>\n<pre> Pattern is a special expression for mathing arguments in function definitions and rules with several\r\nforms:\r\n\r\n_           matches any single argument.\r\n__          matches a sequence of 1 or more arguments.\r\n___         matches a sequence of 0 or more arguments.\r\nx_          matches any single argument, which is names x.\r\nx__         matches a sequence of 1 or more arguments, which is named x.\r\nx___        matches a sequence of 0 or more arguments, which is named x.\r\nx:pattern   a pattern which is named x.\r\npattern:v   a pattern which has a default value v when matching is failed.\r\npattern..   a non-null sequence of arguments each of which matches pattern.\r\npattern...  a sequence, which can be null, of arguments each of which matches pattern.\r\nexpression  matches expression.<\/pre>\n<pre>See also:\r\n <a href=#LMatchQ>MatchQ<\/a> <a href=#Ldefining-functions>defining-functions<\/a> rules<\/pre>\n<ul>\n<li>\n<h3><a name=LMatchQ>MatchQ<\/a><\/h3>\n<pre> MatchQ[x, pat] returns True if x matches pat<\/pre>\n<\/ul>\n<h3><a name=Lphysical-constants>physical-constants<\/a><\/h3>\n<pre><img decoding=\"async\"  class=\"eqs\" src=\"\/SAD\/SADHelp_img\/equ_213.svg\" \/><\/pre>\n<pre>See also:\r\n <a href=#Lconstants>constants<\/a> <a href=#Lexpression>expression<\/a> <a href=#Lspecial-variables>special-variables<\/a><\/pre>\n<h3><a name=LPRINT(PRI)>PRINT(PRI)<\/a><\/h3>\n<pre>PRI expression evaluates expression and prints out the result.<\/pre>\n<pre>See also:\r\n <a href=#Lexpression>expression<\/a> <a href=#LPrint>Print<\/a><\/pre>\n<h3><a name=LQUIT>QUIT<\/a><\/h3>\n<pre>Exits FFS and return to SAD\/MAIN level, without saving the values of the elements.<\/pre>\n<pre>See also:\r\n <a href=#LSTOP>STOP<\/a> <a href=#LSAVE>SAVE<\/a> <a href=#LABORT>ABORT<\/a> <a href=#LUSE>USE<\/a> <a href=#LVISIT>VISIT<\/a> <a href=#LBYE>BYE<\/a><\/pre>\n<h3><a name=LRADINT>RADINT<\/a><\/h3>\n<pre>RADINT prints out the radiation integrals involving the x-coupling for all components of the beam\r\nline.<\/pre>\n<h3><a name=LREAD>READ<\/a><\/h3>\n<pre>READ {filename | file-number} switches the input stream to the specified file or the file-number.\r\nThe original stream is kept and to be returned by TERMINATE(TERM). The input file is rewound.<\/pre>\n<pre>See also:\r\n <a href=#LTERMINATE(TERM)>TERMINATE(TERM)<\/a> <a href=#LCLOSE(CLO)>CLOSE(CLO)<\/a> <a href=#LINPUT(IN)>INPUT(IN)<\/a> <a href=#LOUTPUT(OUT)>OUTPUT(OUT)<\/a> <a href=#LAPPEND(APP)>APPEND(APP)<\/a>\r\n <a href=#LEND>END<\/a><\/pre>\n<h3><a name=LRECOVER(REC)>RECOVER(REC)<\/a><\/h3>\n<pre>REC exchanges the values of FREEd elements with those when the last GO command was issued. FIXed\r\nelements are not affected.<\/pre>\n<pre>See also:\r\n <a href=#LGO>GO<\/a> <a href=#LFREE>FREE<\/a> <a href=#LFIX>FIX<\/a> <a href=#LRESET>RESET<\/a> <a href=#LSAVE>SAVE<\/a><\/pre>\n<h3><a name=LREFERENCE(REF)>REFERENCE(REF)<\/a><\/h3>\n<pre>REFERENCE(REF) sets the current optics as the reference optics.<\/pre>\n<pre>See also:\r\n <a href=#Lreference-optics>reference-optics<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=Lreference-optics>reference-optics<\/a><\/h3>\n<pre>Optics stored as a reference. Can be refered by DISP REF (mode), DRAW, Twiss, OpticsPlot. Set automatically\r\nby the first CALC or GO after USE. Can be updated by REFERENCE(REF).<\/pre>\n<pre>See also:\r\n <a href=#LREFERENCE(REF)>REFERENCE(REF)<\/a> <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a> <a href=#LDRAW>DRAW<\/a> <a href=#LTwiss>Twiss<\/a> <a href=#LOpticsPlot>OpticsPlot<\/a><\/pre>\n<\/ul>\n<h3><a name=LREJECT(REJ)>REJECT(REJ)<\/a><\/h3>\n<pre>Usage: (1) REJ matching-function-pattern [matching-function-pattern1..]\r\n       (2) REJ TOTAL\r\n       (3) REJ TOTALFIT\r\n\r\nrejects the matching-functions which match matching-function-pattern at the current FIT location.\r\nIf TOTAL or TOTALFIT is given, the entire matching conditions in all locations are rejected, then\r\noutput parameters by CALCULATE are reset when TOTAL is given.<\/pre>\n<pre>See also:\r\n <a href=#Lmatching-function-commands>matching-function-commands<\/a> <a href=#LFIT>FIT<\/a> <a href=#Lwildcards>wildcards<\/a><\/pre>\n<h3><a name=LRENUMBER(RENUM)>RENUMBER(RENUM)<\/a><\/h3>\n<pre>RENUM comp renumbers the component number starting from a component comp.<\/pre>\n<pre>See also:\r\n <a href=#Lcomponents>components<\/a><\/pre>\n<h3><a name=LREPEAT(REP)>REPEAT(REP)<\/a><\/h3>\n<pre>Usage: REP [n] body UNTIL [expr1]\r\n\r\nexecutes commands in body n times until expr1 gives nonzero. The number n can be any expression which\r\ngives a number. If n is omitted, infinity is assumed. If expr1 is omitted, False(==0) is assumed.<\/pre>\n<pre>See also:\r\n <a href=#LUNTIL>UNTIL<\/a><\/pre>\n<h3><a name=LRESET>RESET<\/a><\/h3>\n<pre>Usage: RESET [ALL] [element-pattern]\r\n\r\nrestores the value of the elements. What are restored are the value of the default keyword of all\r\nelements, the values of the non-default keywords which have been changed manually or by the matching.\r\nIf ALL is given, it resets all keywords. If element-pattern is given, reset is limited to the elements\r\nwhich match the pattern.<\/pre>\n<pre>See also:\r\n <a href=#LSAVE>SAVE<\/a> <a href=#LUSE>USE<\/a> <a href=#LVISIT>VISIT<\/a> <a href=#Lwildcards>wildcards<\/a> <a href=#LRECOVER(REC)>RECOVER(REC)<\/a><\/pre>\n<h3><a name=LRESUME(RES)>RESUME(RES)<\/a><\/h3>\n<pre>Resumes reading from the previous input stream suspended by SUSPEND(SUSP) or END.<\/pre>\n<pre>See also:\r\n <a href=#LSUSPEND(SUSP)>SUSPEND(SUSP)<\/a> <a href=#LEND>END<\/a><\/pre>\n<h3><a name=LREVERSE(REV)>REVERSE(REV)<\/a><\/h3>\n<pre>REV changes the sign of AX, AY, EPX, EPY, R2, R3, DPX, DPY at the\r\nentrance of the beam line.<\/pre>\n<pre>See also:\r\n <a href=#Lmatching-function-commands>matching-function-commands<\/a><\/pre>\n<h3><a name=Lset-value-of-element>set-value-of-element<\/a><\/h3>\n<pre>Usage: element-pattern [keyword] [{MIN | MAX | MINMAX | MAXMIN}] value\r\n\r\nsets value to the specified keyword of the elements which match element-pattern. If keyword is omitted,\r\nthe default-keyword is assumed. keyword can be a wildcard to apply all matching keywords.\r\n   If MIN, MAX, MINMAX, MAXMIN are specified, it sets the limit of the default-keyword. Both MINMAX\r\nand MAXMIN means MIN=-Abs[value] and MAX=+Abs[value].\r\n   If the keyword is not the default-keyword, it affects both the current and the saved value.<\/pre>\n<pre>See also:\r\n <a href=#LATTRIBUTE(ATTR)>ATTRIBUTE(ATTR)<\/a> <a href=#LSAVE>SAVE<\/a> <a href=#Lelements>elements<\/a> <a href=#Ldefault-keyword>default-keyword<\/a> <a href=#Lwildcards>wildcards<\/a>\r\n <a href=#LElement>Element<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=Lkeywords>keywords<\/a><\/h3>\n<pre>Available keywords are:\r\n\r\n        \r\ntype    keywords\r\nDRIFT   L RADIUS\r\nBEND    L ROTATE DROTATE DX DY ANGLE K0 K1 E1 E2 AE1 AE2 F1 FB1 FB2 FRINGE DISFRIN DISRAD EPS RANKICK\r\nQUAD    L ROTATE DX DY K1 F1 F2 FRINGE DISFRIN DISRAD EPS\r\nSEXT    L ROTATE DX DY K2 DISFRIN DISRAD\r\nOCT     L ROTATE DX DY K3 DISFRIN DISRAD\r\nDECA    L ROTATE DX DY K4 DISFRIN DISRAD\r\nDODECA  L ROTATE DX DY K5 DISFRIN DISRAD\r\nMULT    L DX DY DZ CHI1 CHI2 ROTATE(=CHI3) K0..K21 SK0..SK21 DISFRIN F1 F2 FRINGE DISRAD EPS VOLT\r\n        DVOLT HARM PHI DPHI FREQ RADIUS ANGLE E1 E2 AE1 AE2 DROTATE\r\nSOL     BZ DX DY DZ DPX DPY BOUND GEO CHI1 CHI2 CHI3 DBZ DISFRIN\r\nCAVI    L ROTATE DX DY VOLT DVOLT V1 V20 V11 V02 FREQ PHI HARM RANVOLT RANPHASE DISFRIN FRINGE\r\nTCAVI   L ROTATE DX DY K0 V1 FREQ PHI HARM RANKICK RANPHASE\r\nCOORD   DX DY CHI1 CHI2 CHI3 DIR\r\nMARK    AX BX AY BY EX EPX EY EPY R1 R2 R3 R4 DETR DX DPX DY DPY DZ DDP AZ BZ NZ ZX ZPX ZY ZPY EMITX\r\n        EMITY DP AZ SIGZ GEO OFFSET\r\nAPERT   DX1 DX2 DY1 DY2 DP AX AY DX DY<\/pre>\n<pre>See also:\r\n <a href=#Ldefault-keyword>default-keyword<\/a> <a href=#Lset-value-of-element>set-value-of-element<\/a> <a href=#LElement>Element<\/a><\/pre>\n<li>\n<h3><a name=Ldefault-keyword>default-keyword<\/a><\/h3>\n<pre>The default and available non-default variable keywords are:\r\n\r\ntype    default-keyword  non-default variable keyword\r\nDRIFT   L                -\r\nBEND    ANGLE            K1,K0,E1,E2\r\nQUAD    K1               ROTATE\r\nSEXT    K2               ROTATE\r\nOCT     K3               ROTATE\r\nDECA    K4               ROTATE\r\nDODECA  K5               ROTATE\r\nMULT    K1               K0,K2..K21,SK0,SK1,SK2..SK21,ROTATE,ANGLE\r\nMARK    -                AX,BX,EX,EPX,AY,BY,EY,EPY,R1,R2,R3,R4,DETR,\r\n                         DX,DPX,DY,DPY,DZ,DDP,AZ,BZ,ZX,ZPX,ZY,ZPY<\/pre>\n<pre>See also:\r\n <a href=#Lkeywords>keywords<\/a><\/pre>\n<\/ul>\n<h3><a name=Lspecial-variables>special-variables<\/a><\/h3>\n<pre>There are several variables which have special rolls in FFS. Some of them are also accessible in\r\nthe MAIN level.<\/pre>\n<pre>See also:\r\n <a href=#Lconstants>constants<\/a> <a href=#Lexpression>expression<\/a> <a href=#Lflags>flags<\/a><\/pre>\n<ul>\n<li>\n<h3><a name=L$Line>$Line<\/a><\/h3>\n<pre> %Line counts the number of the results in FFS Shown with Out[]:= . Out remembers all outputs up\r\nto Out[$Line]. $Line = 0 resets the counter and forgets the outputs.<\/pre>\n<li>\n<h3><a name=LCASE>CASE<\/a><\/h3>\n<pre>CASE is a character-string to be attached with TITLE to issue the CASE command of TopDrawer in DRAW\r\nor GEO commands.<\/pre>\n<pre>See also:\r\n <a href=#LTITLE>TITLE<\/a> <a href=#LDRAW>DRAW<\/a> <a href=#LGEO>GEO<\/a><\/pre>\n<li>\n<h3><a name=LCHARGE>CHARGE<\/a><\/h3>\n<pre>CHARGE contains the charge of the particle. The default is +1.<\/pre>\n<li>\n<h3><a name=LCONVERGENCE>CONVERGENCE<\/a><\/h3>\n<pre>CONVERGENCE is the goal of the convergence(==MatchingResidual) in the matching. If MatchingResidual\r\nbecomes smaller than CONVERGENCE times the effective number of the conditions, the matching by GO\r\nterminates. The flag CONV is set when MatchingResidual is smaller than CONVERGENCE after GO or CALCULATE(CAL).\r\nThe default value is 10^-9.<\/pre>\n<pre>See also:\r\n <a href=#LGO>GO<\/a> <a href=#LMatchingResidual>MatchingResidual<\/a> <a href=#LCONV>CONV<\/a><\/pre>\n<li>\n<h3><a name=LDAPWIDTH>DAPWIDTH<\/a><\/h3>\n<pre>DAPWIDTH is the successive width of the x-amplitudes to terminate the tracking assuming that the\r\naperture is enough. The default is 7.<\/pre>\n<pre>See also:\r\n <a href=#LDynamicApertureSurvey>DynamicApertureSurvey<\/a><\/pre>\n<li>\n<h3><a name=LDP>DP<\/a><\/h3>\n<pre>DP represents the relative momentum spread of the beam. It is automatically set by the keyword DP\r\nof the MARK element at the beginning of the beam line. The value of EMITY affects the default weight\r\nof variables in the matching. In the off-momentum matching, the range DP0 - DP < dp\/p0 < DP0 + DP\r\nis used for the matching. The assumed momentum-distribution in the BEAMSIZE(BEAM), MEASURE(MEA),\r\netc. commands, is Gaussian with the standard deviation DP and the mean DP0 if the flag GAUSS is on,\r\notherwise uniform (square) in the range DP0 - DP < dp\/p0 < DP0 + DP.<\/pre>\n<pre>See also:\r\n <a href=#LDP0>DP0<\/a> <a href=#Loff-momentum-matching>off-momentum-matching<\/a> <a href=#LGAUSS>GAUSS<\/a> <a href=#LUNIFORM>UNIFORM<\/a> <a href=#Lelements>elements<\/a> <a href=#LMARK>MARK<\/a><\/pre>\n<li>\n<h3><a name=LDP0>DP0<\/a><\/h3>\n<pre> DP0 represents the central value of the relative momentum offset in the optics calculation, or the\r\ncenter of the momentum distribution of the beam. The on-momentum optics has the relative momentum\r\ndeviation dp\/p0 == DP0, and the off-momentum calculation is done in the range DP0 - DP < dp\/p0 <\r\nDP0 + DP.\r\n DP0 sets the momentum deviation of the closed orbit at the entrance for EMIT with RADTAPER.<\/pre>\n<pre>See also:\r\n <a href=#LDP>DP<\/a> <a href=#Loff-momentum-matching>off-momentum-matching<\/a> <a href=#Lmatching-function-commands>matching-function-commands<\/a>\r\n <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LRADTAPER>RADTAPER<\/a><\/pre>\n<li>\n<h3><a name=LDTSYNCH>DTSYNCH<\/a><\/h3>\n<pre> DTSYNCH is the equilibrium arrival time advance (= -c*delta t, in meter) where the synchrotron radiation\r\nloss balances with the RF, calculated by EMIT\/Emittance[SaveEMIT->True]. This corresponds to the\r\norigin of the RF phase. The default is zero.<\/pre>\n<pre>See also:\r\n <a href=#LEMITX>EMITX<\/a> <a href=#LEMITY>EMITY<\/a> <a href=#LEMITZ>EMITZ<\/a> <a href=#LSIGZ>SIGZ<\/a> <a href=#LSIGE>SIGE<\/a> <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LEmittance>Emittance<\/a> <a href=#LPHICAV>PHICAV<\/a>\r\n<\/pre>\n<li>\n<h3><a name=LEFFRFFREQ>EFFRFFREQ<\/a><\/h3>\n<pre> The effective angular frequency weff (= 2 Pi EFFRFFREQ) is obtained using the second derivative\r\n\r\n  d^2Vcacc\/dt^2 == -weff^2 Vcacc ,\r\n\r\nehere Vcacc is the total acceleration voltage at the equilibrium phase PHICAV. These quantities Vcacc\r\nand its derivatives are summed over all CAVIs and MULTs.\r\n It is set by EMITTANCE(EMIT) or Emittance[]. Effective with RING only.<\/pre>\n<pre>See also:\r\n <a href=#LEFFVC>EFFVC<\/a> <a href=#LPHICAV>PHICAV<\/a><\/pre>\n<li>\n<h3><a name=LEFFVC>EFFVC<\/a><\/h3>\n<pre> Effective peak rf voltage EFFVC is given by\r\n\r\n  Abs[ weff Vcacc + I dVcacc\/dt ] \/ weff ,\r\n\r\nwhere Vcacc, weff are total acceleration voltage at the equilibrium phase PHICAV and the effective\r\nRF angular frequency (=2 Pi EFFRFFREQ). DVcacc\/dt is the time derivative of Vcacc. The quantity Vcacc\r\nand its derivatives are summed over all CAVIs and MULTs.\r\n It is set by EMITTANCE(EMIT) or Emittance[]. The unit is Volt. Effective with RING only.<\/pre>\n<pre>See also:\r\n <a href=#LEFFVCRATIO>EFFVCRATIO<\/a> <a href=#LEFFRFFREQ>EFFRFFREQ<\/a> <a href=#LPHICAV>PHICAV<\/a><\/pre>\n<li>\n<h3><a name=LEFFVCRATIO>EFFVCRATIO<\/a><\/h3>\n<pre> Ratio of (effective voltage)\/(Sum[VOLT_k,{k}]) (default: 1). Set by EMITTANCE(EMIT) or Emittance[].\r\nEffective with RING only.<\/pre>\n<pre>See also:\r\n <a href=#LPHICAV>PHICAV<\/a> <a href=#LEFFVC>EFFVC<\/a><\/pre>\n<li>\n<h3><a name=LElementValues>ElementValues<\/a><\/h3>\n<pre>ElementValues is a symbol to assign rules to determine values of keywords of elements or components.\r\nThis is used to give a dependence between keywords of different elements or components, or determine\r\nthen by a parametric expression.\r\n\r\nUseage:  ElementValues = { key[elem] :> expr, ...}\r\n\r\nwhere\r\n\r\n       \r\nkey:   keyword to specify a value (string).\r\nelem:  String to specify the elements or components, wildcards are allowed.\r\nexpr:  an expression which returs a real number to be set to the elements or components.\r\n\r\nExample:  ElementValues = \r\n            { \"DX\"[\"QF1\"] :> \"DX\"[\"QD1\"]-0.001,\r\n              \"DY\"[\"QF2.3\"] :> -\"DY\"[\"QD1.2\"],\r\n              \"ROTATE\"[\"QF*\"] :> f[x] }\r\n\r\nRemarks:\r\n\r\n\r\n1.  Iff elem contains \".\", it is recognized as components, otherwise as elements.\r\n2.  In the r.h.s. of the rule, an expression like key[elem] is evaluated as either LINE[key, elem]\r\n    or Element[key, elem], depending on elem has \".\".\r\n3.  The expression expr can be any expression returning a real number.\r\n4.  Later rules overrides the former, if many rules apply on the same keyword of the same element.\r\n5.  The rule given by ElementValues overrides the relation given by COUP_LE command.\r\n6.  Use a[b] in stead of a@b.\r\n7.  ElementValues is cleared by USE. It is hidden by VISIT and restored by BYE.<\/pre>\n<pre>See also:\r\n <a href=#LCOUPLE(COUP)>COUPLE(COUP)<\/a><\/pre>\n<li>\n<h3><a name=LEMITX>EMITX<\/a><\/h3>\n<pre>EMITX is a real variable for the horizontal emittance (not normalized by gamma beta). It is automatically\r\nset by the keyword EMITX of the MARK element at the beginning of the beam line. The EMITTANCE(EMIT)\r\ncommand returns its calculated value in EMITX. The value of EMITX affects the default weight of variables\r\nin the matching. Accessible in MAIN.<\/pre>\n<pre>See also:\r\n <a href=#LEMITY>EMITY<\/a> <a href=#LEMITZ>EMITZ<\/a> <a href=#LSIGZ>SIGZ<\/a> <a href=#LSIGE>SIGE<\/a> <a href=#LDP>DP<\/a> <a href=#Lelements>elements<\/a> <a href=#LMARK>MARK<\/a><\/pre>\n<li>\n<h3><a name=LEMITXE>EMITXE<\/a><\/h3>\n<pre>EMITXE specifies the minimum horizontal emittance for EMITTANCE(EMIT) and Emittance[] calculations.\r\nIt is useful to give emittance determined externally, such as for proton machines.<\/pre>\n<pre>See also:\r\n <a href=#LEMITYE>EMITYE<\/a> <a href=#LEMITZE>EMITZE<\/a><\/pre>\n<li>\n<h3><a name=LEMITY>EMITY<\/a><\/h3>\n<pre>EMITY is a real variable for the vertical emittance (not normalized by gamma beta). It is automatically\r\nset by the keyword EMITY of the MARK element at the beginning of the beam line. The EMITTANCE(EMIT)\r\ncommand returns its calculated value in EMITY. The value of EMITY affects the default wei\u00f7ht of\r\nvariables in the matching. Accessible in MAIN.<\/pre>\n<pre>See also:\r\n <a href=#LEMITX>EMITX<\/a> <a href=#LEMITZ>EMITZ<\/a> <a href=#LSIGZ>SIGZ<\/a> <a href=#LSIGE>SIGE<\/a> <a href=#LDP>DP<\/a> <a href=#Lelements>elements<\/a> <a href=#LMARK>MARK<\/a><\/pre>\n<li>\n<h3><a name=LEMITYE>EMITYE<\/a><\/h3>\n<pre>EMITYE specifies the minimum vertical emittance for EMITTANCE(EMIT) and Emittance[] calculations.\r\nIt is useful to give emittance determined externally, such as for proton machines.<\/pre>\n<pre>See also:\r\n <a href=#LEMITXE>EMITXE<\/a> <a href=#LEMITZE>EMITZE<\/a><\/pre>\n<li>\n<h3><a name=LEMITZ>EMITZ<\/a><\/h3>\n<pre>EMITZ is a real variable for the longitudinal emittance (not normalized by gamma beta). It is automatically\r\nset by the keyword EMITZ of the MARK element at the beginning of the beam line. The EMITTANCE(EMIT)\r\ncommand returns its calculated value in EMITZ. Accessible in MAIN.<\/pre>\n<pre>See also:\r\n <a href=#LEMITX>EMITX<\/a> <a href=#LEMITY>EMITY<\/a> <a href=#LSIGZ>SIGZ<\/a> <a href=#LSIGE>SIGE<\/a> <a href=#LDP>DP<\/a> <a href=#Lelements>elements<\/a> <a href=#LMARK>MARK<\/a><\/pre>\n<li>\n<h3><a name=LEMITZE>EMITZE<\/a><\/h3>\n<pre>EMITZE specifies the minimum longitudinal emittance for EMITTANCE(EMIT) and Emittance[] calculations.\r\nIt is useful to give emittance determined externally, such as for proton machines.<\/pre>\n<pre>See also:\r\n <a href=#LEMITXE>EMITXE<\/a> <a href=#LEMITYE>EMITYE<\/a><\/pre>\n<li>\n<h3><a name=LExponentOfResidual>ExponentOfResidual<\/a><\/h3>\n<pre>The exponent to calculate MatchinResidual. The default is 2.<\/pre>\n<pre>See also:\r\n <a href=#LMatchingResidual>MatchingResidual<\/a> <a href=#LGO>GO<\/a><\/pre>\n<li>\n<h3><a name=LFFS$NumericalDerivative>FFS$NumericalDerivative<\/a><\/h3>\n<pre>If False (default), the calculation of response matrix for each matching variables uses analytical\r\nexpressions as much as possible. If True, performs numerical differentiation during the matching\r\nby GO. It is useful for some variables and matching functions in some cases. It is slow, so should\r\nbe avoided for off-momentum-matching for a large beam line.<\/pre>\n<pre>See also:\r\n <a href=#LGO>GO<\/a> <a href=#Loff-momentum-matching>off-momentum-matching<\/a><\/pre>\n<li>\n<h3><a name=LFitFunction>FitFunction<\/a><\/h3>\n<pre>FitFunction is a symbol to assign user-defined functions for matching with the GO command. \r\n\r\nUsage:   FitFunction := fun, \r\n\r\nwhere fun is a function that returns a real number or a list of real numbers, to be matched to zero\r\nby GO. The goal of GO is to make fun zero or a list of zeros, together with built-in matching conditions.\r\nThus the sum of fun^2 is added to MatchingResidual. GO also evaluates FitFunction to obtain the derivatives\r\nnumerically. The function fun can refer the value of variables by Element or LINE functions, and\r\nthe optical functions at DP0 by Twiss. The algorithm of matching is same as that for built-in conditions,\r\nbut it is slower because of the numerical differentiation, when the beam line is long and the number\r\nof variables large.\r\n\r\nExample:  FitFunction := {Twiss[\"BX\",\"$$$\"]-20, Twiss[\"BY\",\"$$$\"]-20};\r\n\r\nwhich puts the same goal as\r\n\r\n   FIT $$$ BX 20 BY 20 .\r\n\r\n   FitFunction is cleared by USE. It is also hidden by VISIT and restored by BYE.<\/pre>\n<pre>See also:\r\n <a href=#LGO>GO<\/a> <a href=#LFREE>FREE<\/a> <a href=#LMatchingResidual>MatchingResidual<\/a> <a href=#LDP0>DP0<\/a> <a href=#LElement>Element<\/a> <a href=#LLINE>LINE<\/a> <a href=#LTwiss>Twiss<\/a><\/pre>\n<li>\n<h3><a name=LFSHIFT>FSHIFT<\/a><\/h3>\n<pre>FSHIFT is the relative shift df\/f0 of the revolution (or rf) frequency in a ring. This is valid in\r\nEMITTANCE(EMIT), the particle-tracking, and CAL\/GO with CALC6D. For CAL\/GO with CALC4D, DP0 should\r\nbe used instead.<\/pre>\n<pre>See also:\r\n <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a> <a href=#LGO>GO<\/a> <a href=#LCALC6D>CALC6D<\/a> <a href=#LCALC4D>CALC4D<\/a> <a href=#LDP0>DP0<\/a><\/pre>\n<li>\n<h3><a name=LGCUT>GCUT<\/a><\/h3>\n<pre>GCUT specifies the cut-off value of Gaussian distribution in unit of the standard deviation. Accessible\r\nin MAIN.<\/pre>\n<pre>See also:\r\n <a href=#LSEED>SEED<\/a> <a href=#LGAUSS>GAUSS<\/a> <a href=#LGaussRandom>GaussRandom<\/a><\/pre>\n<li>\n<h3><a name=LInitialOrbits>InitialOrbits<\/a><\/h3>\n<pre>Usage: InitialOrbits = { {x1, px1, y1, py1, z1, dp1}, ...};\r\n\r\nor     InitialOrbits = { {ax1, bx1, nx1, ay1, by1, ny1,\r\n          ex1, epx1, ey1, epy1, r11, r21, r31, r41,\r\n          x1, px1, y1, py1, z1, dp1, 0, 0, 0, 0, 0, 0, 0}, ...};\r\n\r\nspecifies initial conditions of a number of orbits for the optics calculation by CALCULATE(CAL) and\r\nGO. Those coordinates are offset from the central orbit. If six numbers are given, only the offsets\r\nof the orbits are affected. If 27 numbers are given, all Twiss parameters are set (values for non-orbit\r\nparams are used directly. Orbits are giving offsets.)\r\n  If InitialOrbits are given, the off-momentum matching and finite-amplitude matching is disabled.\r\n\r\n InitialOrbits is also necessary to calculate optics with wake field.<\/pre>\n<pre>See also:\r\n <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a> <a href=#LGO>GO<\/a> <a href=#Loff-momentum-matching>off-momentum-matching<\/a> <a href=#LMatchingAmplitude>MatchingAmplitude<\/a>\r\n<\/pre>\n<li>\n<h3><a name=LLOSSAMPL>LOSSAMPL<\/a><\/h3>\n<pre>\r\nLOSSAMPL is the transverse amplitude beyond which a particle is judged to have been lost. The default\r\nis 1 m. Accessible in MAIN.<\/pre>\n<pre>See also:\r\n <a href=#LLOSSDZ>LOSSDZ<\/a> <a href=#LAPERT>APERT<\/a><\/pre>\n<li>\n<h3><a name=LLOSSDZ>LOSSDZ<\/a><\/h3>\n<pre>LOSSDZ is the longitudinal position z beyond which a particle is judged to have been lost. The default\r\nis 100 m. Accessible in MAIN. LOSSDZ is effective only when SPAC is ON.<\/pre>\n<pre>See also:\r\n <a href=#LLOSSAMPL>LOSSAMPL<\/a> <a href=#LAPERT>APERT<\/a> <a href=#LSPAC>SPAC<\/a><\/pre>\n<li>\n<h3><a name=LMatchingAmplitude>MatchingAmplitude<\/a><\/h3>\n<pre>MatchingAmplitude is a list of amplitudes for the finite-amplitude matching.\r\n\r\nUsage: MatchingAmplitude := { {dp1,x1,y1}, ..};\r\n\r\nwhere dp1 is the momentum deviation to be matched, x1 and y1 are the horizontal and vertical amplitudes\r\nat the beginning of the beam line, normalized by Sqrt of the sum of the emittance, i.e., Sqrt[(EMITX+EMITY)].\r\nThree orbits are chosen in each dimension. The initial conditions of the orbit is chosen as\r\n\r\n   {X,Px,Y,Py} =\r\n   { {x1,0,0,0}, {-x1\/2,Sqrt[3]\/2 x1,0,0}, {-x1\/2,-Sqrt[3]\/2 x1,0,0},\r\n     {0,0,y1,0}, {0,0,-y1\/2,Sqrt[3]\/2 y1}, {0,0,-y1\/2,Sqrt[3]\/2 y1} },\r\n\r\nand when x1==0 or y1==0 corresponding orbits are excluded. The above are labeled {x1,x2,x3,y1,y2,y3}\r\nin the output of CALCULATE(CAL) or GO, and also labeled 1 to 6 in the second element of FFS[\"CALC\"]\r\nand FFS[\"GO\"].\r\n\r\n    This matching is done when dp1 is within the off-momentum range given by DP, i.e., Abs[dp1] <\r\nDP. If dp1 is in the range, the nearest zero- amplitude optics is chosen. The maching conditions\r\nfor the finite- amplitude optics are same as those for the zero-amplitude one.\r\n   Th orbit with finte initial condition never close after one revolution, but FFS simply ignores\r\nit and obtain the periodic optics around the open\r\norbit.<\/pre>\n<pre>See also:\r\n <a href=#LDP>DP<\/a> <a href=#LEMITX>EMITX<\/a> <a href=#LEMITY>EMITY<\/a> <a href=#Loff-momentum-matching>off-momentum-matching<\/a> <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a> <a href=#LGO>GO<\/a>\r\n<\/pre>\n<li>\n<h3><a name=LMatchingResidual>MatchingResidual<\/a><\/h3>\n<pre>MatchingResidual holds the convergence in the last GO or CALCULATE(CAL) commands. It is calculated\r\nby\r\n\r\n     sw*(Sum[(w_i*df_i)^ExponentOfResidual,{i}]\/sw)^(2\/ExponentOfResidual)\r\n     +penalty\r\n where w_i is the weight of the i-th condition, df_i is the difference of the i-th function from\r\nthe goal, penalty is an additional big number  (typically 10), when the optics is unstable or closed\r\norbit is not found in the case of CELL. The parameter sw is defined as\r\n\r\n     sw=Sum[(OffMomentumWeight\/2\/woff)^2,{i}]\r\n with\r\n\r\n     woff = 1                               for on-momentum optics\r\n          = Sqrt[number-of-momentum-points] for off-momentum optics.\r\n The weight of the function is lighter in the case of off-momentum-matching so that all off-momentum\r\ndeviations functions weight equal to the on-momentum one. However, the relative weight for the off-momentum\r\npart can be changed by setting OffMomentumWeight. \r\n   The weight of each function at each point with each momentum can be specified by defining the\r\nFitWeight function.<\/pre>\n<pre>See also:\r\n <a href=#LExponentOfResidual>ExponentOfResidual<\/a> <a href=#LCONVERGENCE>CONVERGENCE<\/a> <a href=#LOffMomentumWeight>OffMomentumWeight<\/a> <a href=#Loff-momentum-matching>off-momentum-matching<\/a>\r\n <a href=#LFitWeight>FitWeight<\/a><\/pre>\n<li>\n<h3><a name=LMASS>MASS<\/a><\/h3>\n<pre>MASS is the rest mass of the particle in eV. The default is the electron mass.<\/pre>\n<li>\n<h3><a name=LMINCOUP>MINCOUP<\/a><\/h3>\n<pre>MINCOUP is the minimum emittance ratio to be assumed in the calculation of intrabeam effects in EMITTANCE(EMIT)\r\nand Emittance[]. Emittances Max[emit_k, MINCOUP*(emit_x+emit_y)] (k=x,y) are assumed in the intrabeam\r\ncalculation. Accessible in MAIN.<\/pre>\n<pre>See also:\r\n <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LEmittance>Emittance<\/a> <a href=#LINTRA>INTRA<\/a> <a href=#Lequilibrium-beam-envelope>equilibrium-beam-envelope<\/a>\r\n<\/pre>\n<li>\n<h3><a name=LMOMENTUM>MOMENTUM<\/a><\/h3>\n<pre>MOMENTUM is the nominal momentum of the beam line at the entrance in eV\/c. Accessible in MAIN.<\/pre>\n<li>\n<h3><a name=LNBUNCH>NBUNCH<\/a><\/h3>\n<pre>NBUNCH is the number of bunches for the calculation of WakeFunction. Accessible in MAIN.<\/pre>\n<pre>See also:\r\n <a href=#LPBUNCH>PBUNCH<\/a><\/pre>\n<li>\n<h3><a name=LNetResidual>NetResidual<\/a><\/h3>\n<pre>The net residual of convergence except the penalty for unstable optics.<\/pre>\n<pre>See also:\r\n <a href=#LMatchingResidual>MatchingResidual<\/a> StablilityLevel<\/pre>\n<li>\n<h3><a name=LNP>NP<\/a><\/h3>\n<pre>NP is the number of particles in the tracking. Accessible in MAIN.<\/pre>\n<pre>See also:\r\n <a href=#LMEASURE(MEA)>MEASURE(MEA)<\/a><\/pre>\n<li>\n<h3><a name=LNPARA>NPARA<\/a><\/h3>\n<pre>NPARA specifies the maximum number of parallel processes for various calculations such as CALC, GO,\r\nTrackParticles, DynamicApertureSurve, etc.<\/pre>\n<pre>See also:\r\n <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a> <a href=#LGO>GO<\/a> <a href=#LTrackParticles>TrackParticles<\/a> <a href=#LDynamicApertureSurvey>DynamicApertureSurvey<\/a>\r\n<\/pre>\n<li>\n<h3><a name=LOffMomentumWeight>OffMomentumWeight<\/a><\/h3>\n<pre>Relative weight of the off-momentum deviation for the off-momentum matching. The default is 1.<\/pre>\n<pre>See also:\r\n <a href=#LExponentOfResidual>ExponentOfResidual<\/a> <a href=#LCONVERGENCE>CONVERGENCE<\/a> <a href=#LMatchingResidual>MatchingResidual<\/a> <a href=#Loff-momentum-matching>off-momentum-matching<\/a>\r\n <a href=#LFitWeight>FitWeight<\/a><\/pre>\n<li>\n<h3><a name=LOMEGA0>OMEGA0<\/a><\/h3>\n<pre>OMEGA0 is 2*Pi*SpeedOfLight\/LINE[\"s\",\"$$$\"] . Accessible in MAIN.<\/pre>\n<pre>See also:\r\n <a href=#LSpeedOfLight>SpeedOfLight<\/a> <a href=#LLINE>LINE<\/a><\/pre>\n<li>\n<h3><a name=LOpticsEpilog>OpticsEpilog<\/a><\/h3>\n<pre>OpticsEpilog is a variable to assign a user-defined function which is to be executed every time after\r\nan optics calculation is done in CALCULATE(CAL) or GO commands. In GO, OpticsEpilog is called at\r\nthe end of each iteration. This function is useful, for instance, for setting parameters which depends\r\non the result of optics calculation itself.<\/pre>\n<pre>See also:\r\n <a href=#LOpticsProlog>OpticsProlog<\/a><\/pre>\n<li>\n<h3><a name=LOpticsProlog>OpticsProlog<\/a><\/h3>\n<pre>OpticsProlog is a variable to assign a user-defined function which is to be executed every time before\r\nan optics calculation is done in the CALCULATE(CAL) or GO commands. In GO, OpticsProlog is called\r\nat the beginning of each iteration. This function is useful, for instance, for setting parameters\r\nwhich depends on the result of optics calculation itself.<\/pre>\n<pre>See also:\r\n <a href=#LOpticsEpilog>OpticsEpilog<\/a><\/pre>\n<li>\n<h3><a name=LPBUNCH>PBUNCH<\/a><\/h3>\n<pre>PBUNCH is the number of particles\/bunch for the calculation of the intra-beam and space charge effects\r\nin EMITTANCE(EMIT), and WakeFunction. Accessible in MAIN.<\/pre>\n<pre>See also:\r\n <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LINTRA>INTRA<\/a> <a href=#LWSPAC>WSPAC<\/a> <a href=#LWakeFunction>WakeFunction<\/a> <a href=#Lequilibrium-beam-envelope>equilibrium-beam-envelope<\/a>\r\n<\/pre>\n<li>\n<h3><a name=LPhotonList>PhotonList<\/a><\/h3>\n<pre>When PHOTONS is ON (default is OFF), with RAD and FLUC, TrackParticles generates a list of all photons\r\nradiated through the tracking. The list is assigned to a symbol PhotonList. PhotonList is a list\r\nof\r\n\r\n{en, gx, gy, gz, nx, ny, nz, xi1, xi2, xi3, np, nele}\r\n\r\nwhere\r\n\r\nen:    photon energy [eV]\r\ngx:    GX coordinate of the emission point [m]\r\ngy:    GY coordinate of the emission point [m]\r\ngz:    GZ coordinate of the emission point [m]\r\nnx:    GX component of the photon direction vector\r\nny:    GY component of the photon direction vector\r\nnz:    GZ component of the photon direction vector (nx^2+ny^2+nz^2)=1.\r\nxi1:   Stokes' parameter for polarization 45 degree to the GZ=0 plane.\r\nxi2:   Stokes' parameter for right-handed polarization\r\nxi3:   Stokes' parameter for polarization in the GZ=0 plane.\r\nnp:    particle number\r\nnele:  component number in the beam line\r\n\r\nThe probability of each polarization is given by each Stokes' parameter as (1+xi)\/2 . TrackParticles\r\nalways updates PhotonList. The length of PhtonList is the number of emitted photons.\r\n   Remember that the {GX, GY, GZ} = {0, 0, 0} and their directions are {z, -x, -y} at the entrance\r\nof the beam line by default. It is changeable by the GEO command anyway.<\/pre>\n<pre>See also:\r\n <a href=#LPHOTONS>PHOTONS<\/a> <a href=#LTrackParticles>TrackParticles<\/a><\/pre>\n<li>\n<h3><a name=LPHICAV>PHICAV<\/a><\/h3>\n<pre>The equilibrium RF phase (in radian, = 2 Pi EFFRFFREQ DTSYNCH\/c) where the synchrotron radiation\r\nloss and acceleration balances. If there are phase, voltage, frequency variations in RF cavities,\r\nit is calculated based on \"effective voltage\". Effective with RING only.<\/pre>\n<pre>See also:\r\n <a href=#LEFFVC>EFFVC<\/a> <a href=#LEFFRFFREQ>EFFRFFREQ<\/a> <a href=#LDTSYNCH>DTSYNCH<\/a> <a href=#LCAVI>CAVI<\/a> <a href=#LMULT>MULT<\/a><\/pre>\n<li>\n<h3><a name=LSIGE>SIGE<\/a><\/h3>\n<pre> SIGE is the equilibrium momentum spread at the entrance of the beam line calculated by EMIT\/Emittance[SaveEMIT->True].<\/pre>\n<pre>See also:\r\n <a href=#LEMITX>EMITX<\/a> <a href=#LEMITY>EMITY<\/a> <a href=#LEMITZ>EMITZ<\/a> <a href=#LSIGZ>SIGZ<\/a> <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LEmittance>Emittance<\/a><\/pre>\n<li>\n<h3><a name=LSIGZ>SIGZ<\/a><\/h3>\n<pre> SIGZ is the equilibrium bunch length at the entrance of the beam line calculated by EMIT\/Emittance[SaveEMIT->True].<\/pre>\n<pre>See also:\r\n <a href=#LEMITX>EMITX<\/a> <a href=#LEMITY>EMITY<\/a> <a href=#LEMITZ>EMITZ<\/a> <a href=#LSIGE>SIGE<\/a> <a href=#LEMITTANCE(EMIT)>EMITTANCE(EMIT)<\/a> <a href=#LEmittance>Emittance<\/a><\/pre>\n<li>\n<h3><a name=LSpeedOfLight>SpeedOfLight<\/a><\/h3>\n<pre>SpeedOfLight is 299792458.<\/pre>\n<li>\n<h3><a name=LStabilityLevel>StabilityLevel<\/a><\/h3>\n<pre>Number of unstable planes in the optics calculations. Equal to zero if all x and y optics are stable\r\nfor on\/off-momentum and finite amplitude matching.<\/pre>\n<pre>See also:\r\n <a href=#LNetResidual>NetResidual<\/a> <a href=#LMatchingResidual>MatchingResidual<\/a><\/pre>\n<li>\n<h3><a name=LTITLE>TITLE<\/a><\/h3>\n<pre>TITLE is a character-string to make the title of the plot in DRAW or GEO commands.<\/pre>\n<pre>See also:\r\n <a href=#LCASE>CASE<\/a> <a href=#LDRAW>DRAW<\/a> <a href=#LGEO>GEO<\/a><\/pre>\n<\/ul>\n<h3><a name=LSAVE>SAVE<\/a><\/h3>\n<pre>Usage: SAVE [element-pattern]\r\n\r\nsaves the values of the elements. What are saved are the value of the default keyword of all elements,\r\nthe values of the non-default keywords which have been changed manually or by the matching. If ALL\r\nis given it resets all keywords. If element-pattern is given, it is only limited to the elements\r\nwhich match the pattern, otherwise all elements are saved.<\/pre>\n<pre>See also:\r\n <a href=#LRESET>RESET<\/a> <a href=#LUSE>USE<\/a> <a href=#LVISIT>VISIT<\/a> <a href=#LBYE>BYE<\/a> <a href=#LSTOP>STOP<\/a> <a href=#LQUIT>QUIT<\/a> <a href=#Lwildcards>wildcards<\/a><\/pre>\n<h3><a name=LSEED>SEED<\/a><\/h3>\n<pre>The SEED command is obsolete. Use SeedRandom[] function instead of SEED.<\/pre>\n<pre>See also:\r\n <a href=#LMEASURE(MEA)>MEASURE(MEA)<\/a> <a href=#LFIXSEED>FIXSEED<\/a> <a href=#LMOVESEED>MOVESEED<\/a> <a href=#LSeedRandom>SeedRandom<\/a><\/pre>\n<h3><a name=LSHOW>SHOW<\/a><\/h3>\n<pre>SHOW prints out the current matching conditions.\r\n\r\n   FFS[\"SHOW\"] or FFS$SHOW[] returns the current matching conditions as a list. Each element has\r\na form of\r\n\r\n{component1, component2, function, goal-value, number-of-momentums, scale},\r\n\r\nwhich corresponds to the format of the print-out by SHOW.<\/pre>\n<pre>See also:\r\n <a href=#Lmatching-function-commands>matching-function-commands<\/a> <a href=#LFIT>FIT<\/a> <a href=#LFFS>FFS<\/a> <a href=#LFFS$SHOW>FFS$SHOW<\/a><\/pre>\n<h3><a name=LSPLIT>SPLIT<\/a><\/h3>\n<pre>Usage: SPLIT component length\r\n\r\nsplits the component into two pieces at the point where the distance from the entrance is length.\r\nThe new components have the same name as the original, and the strengths are proportional to the\r\nnew lengths. Only magnets and cavities can be split. You should CALCULATE(CAL) after SPLIT to get\r\noptical parameters after SPLIT. Matching using SPLIT element as a variable may degrade the speed\r\nof convergence.<\/pre>\n<h3><a name=LSTATUS(STAT)>STATUS(STAT)<\/a><\/h3>\n<pre>STAT shows the current settings of flags, fit points, \r\nspecial-variables, the region for DISPLAY, seed of the random number generator, and elapsed CPU time,\r\netc.<\/pre>\n<pre>See also:\r\n <a href=#Lspecial-variables>special-variables<\/a> <a href=#Lflags>flags<\/a><\/pre>\n<h3><a name=LSTOP>STOP<\/a><\/h3>\n<pre>Exits FFS and returns to SAD\/MAIN level, with saving the values of the elements.<\/pre>\n<pre>See also:\r\n <a href=#LQUIT>QUIT<\/a> <a href=#LSAVE>SAVE<\/a> <a href=#LABORT>ABORT<\/a> <a href=#LUSE>USE<\/a> <a href=#LVISIT>VISIT<\/a> <a href=#LBYE>BYE<\/a><\/pre>\n<h3><a name=LSUSPEND(SUSP)>SUSPEND(SUSP)<\/a><\/h3>\n<pre>Suspend reading from the current input stream, and wait for input from the console. Resumes by RESUME(RES)<\/pre>\n<pre>See also:\r\n <a href=#LRESUME(RES)>RESUME(RES)<\/a> <a href=#LEND>END<\/a><\/pre>\n<h3><a name=LTERMINATE(TERM)>TERMINATE(TERM)<\/a><\/h3>\n<pre>   TERM [INPUT(IN)] suspends the current input stream and switches it to the previous input stream.\r\n\r\n  TERM OUTPUT(OUT) suspends the current output and switches it to the previous output stream.<\/pre>\n<pre>See also:\r\n <a href=#LCLOSE(CLO)>CLOSE(CLO)<\/a> <a href=#LINPUT(IN)>INPUT(IN)<\/a> <a href=#LREAD>READ<\/a> <a href=#LOUTPUT(OUT)>OUTPUT(OUT)<\/a> <a href=#LAPPEND(APP)>APPEND(APP)<\/a> <a href=#LEND>END<\/a><\/pre>\n<h3><a name=LTYPE(T)>TYPE(T)<\/a><\/h3>\n<pre>Usage: TYPE [element-pattern [element-pattern1..]]\r\n\r\nprints out the values of elements which match element-pattern in the SAD MAIN input format. Keywords\r\nwhich have zero values are omitted unless it is the default variable. If non element-pattern is given,\r\nall elements are printed out.<\/pre>\n<pre>See also:\r\n <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a> <a href=#LVARIABLES(VAR)>VARIABLES(VAR)<\/a> <a href=#Lelements>elements<\/a><\/pre>\n<h3><a name=LUNTIL>UNTIL<\/a><\/h3>\n<pre>Usage: REP [n] body UNTIL [expr1]\r\n\r\nexecutes commands in body n times until expr1 gives nonzero. The number n can be any expression which\r\ngives a number. If n is omitted, infinity is assumed. If expr1 is omitted, False(==0) is assumed.<\/pre>\n<pre>See also:\r\n <a href=#LREPEAT(REP)>REPEAT(REP)<\/a> <a href=#Lexpression>expression<\/a> <a href=#Lcommand-syntax>command-syntax<\/a> <a href=#Lfunctions>functions<\/a> Do<\/pre>\n<h3><a name=LUSE>USE<\/a><\/h3>\n<pre>Usage: USE [[NO]EXPAND] beam-line\r\n\r\nswitches the beam line used in FFS to the beam line given by beam-line. beam-line can be an BeamLine\r\nobject or the name of a beam line defined in MAIN. All information specific to the current beam line,\r\nsuch as matching conditions is lost. If the keyword EXPAND is given (default), the new beam line\r\nis expanded, i.e., the values of components are refreshed to the saved values.\r\n   If a BeamLine object is used by USE or VISIT, the new beam line becomes a\r\nnew LINE in the MAIN level, with a name which is created automatically.<\/pre>\n<pre>See also:\r\n <a href=#LVISIT>VISIT<\/a> <a href=#LBYE>BYE<\/a> <a href=#LEXPAND>EXPAND<\/a> <a href=#LBeamLine>BeamLine<\/a> <a href=#LBeamLineName>BeamLineName<\/a><\/pre>\n<h3><a name=LVARIABLES(VAR)>VARIABLES(VAR)<\/a><\/h3>\n<pre>VARIABLES displays a list of current matching-variables and their present, previous, saved, minimum,\r\nand maximum values together with the COUPLEd master elements and their coefficients.\r\n   When executed in the FFS function, it returns the result as a list.\r\n\r\n   Usage:   FFS[\"VAR\"]\r\n\r\nreturns a list of nvar elements, where nvar is the number of current matching-variables given by\r\nthe FREE command. Each element has the form\r\n\r\n  {name, keyword, present, previous, saved, minimum, maximum, coupled-master-element, coupling-coefficient}\r\n,\r\n\r\nwhich corresponds to the output of the VARIABLES(VAR) command.<\/pre>\n<pre>See also:\r\n <a href=#LFREE>FREE<\/a> <a href=#LCOUPLE(COUP)>COUPLE(COUP)<\/a> <a href=#LFFS>FFS<\/a><\/pre>\n<h3><a name=LVARY>VARY<\/a><\/h3>\n<pre>Usage: VARY keyword element-pattern\r\n\r\nchanges the default-keyword of the elements which match element-pattern to keyword.<\/pre>\n<pre>See also:\r\n <a href=#LFREE>FREE<\/a> <a href=#Lelements>elements<\/a> <a href=#Lwildcards>wildcards<\/a><\/pre>\n<h3><a name=LVISIT>VISIT<\/a><\/h3>\n<pre>Usage: VISIT [[NO]EXPAND] beam-line\r\n\r\nswitches the beam line used in FFS to the beam line given by beam-line. beam-line can be an BeamLine\r\nobject or the name of a beam line defined in MAIN. All information specific to the current beam line,\r\nsuch as matching conditions are reserved, and the previous beam line is restored when BYE command\r\nis issued. If the keyword EXPAND is given (default), the new beam line is expanded, i.e., the values\r\nof components are refreshed to the saved values.\r\n   If a BeamLine object is used by USE or VISIT, the new beam line becomes a new LINE in the MAIN\r\nlevel, with a name which is created automatically.<\/pre>\n<pre>See also:\r\n <a href=#LUSE>USE<\/a> <a href=#LBYE>BYE<\/a> <a href=#LEXPAND>EXPAND<\/a> <a href=#LBeamLine>BeamLine<\/a> <a href=#LBeamLineName>BeamLineName<\/a><\/pre>\n<h3><a name=Lwildcards>wildcards<\/a><\/h3>\n<pre>   Many commands and functions accept the wildcards as a specification for the name of elements or\r\ncomponents. The valid wildcards are:\r\n\r\n       *         matches any zero or more characters.\r\n       %         matches one character.\r\n       {..}      matches any character enclosed.\r\n       {^..}     matches any character not enclosed.\r\n       ..|..     alternative pattern.<\/pre>\n<pre>See also:\r\n <a href=#Lelements>elements<\/a> <a href=#Lcomponents>components<\/a> <a href=#LDISPLAY(DISP)>DISPLAY(DISP)<\/a> <a href=#LTYPE(T)>TYPE(T)<\/a> <a href=#LSAVE>SAVE<\/a> <a href=#LRESET>RESET<\/a> <a href=#LFREE>FREE<\/a>\r\n <a href=#LFIX>FIX<\/a> <a href=#LATTRIBUTE(ATTR)>ATTRIBUTE(ATTR)<\/a> <a href=#LREJECT(REJ)>REJECT(REJ)<\/a> <a href=#LCALCULATE(CAL)>CALCULATE(CAL)<\/a> <a href=#Lfunctions>functions<\/a>\r\n <a href=#LElement>Element<\/a> <a href=#LLINE>LINE<\/a> <a href=#LTwiss>Twiss<\/a><\/pre>\n<hr>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to SAD\/FFS &#038; SADScript SAD\/FFS SADScript Version: 1.1.9.0.1k64, Updated: 08\/31\/2020 Please use browser&#8217;s search to find an item. The FFS commands are shown in uppercases. The minimum abbreviated form of each command is&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-82","post","type-post","status-publish","format-standard","hentry","category-how-to-use-sad"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/acc-physics.kek.jp\/SAD\/wp-json\/wp\/v2\/posts\/82","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/acc-physics.kek.jp\/SAD\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/acc-physics.kek.jp\/SAD\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/acc-physics.kek.jp\/SAD\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/acc-physics.kek.jp\/SAD\/wp-json\/wp\/v2\/comments?post=82"}],"version-history":[{"count":18,"href":"https:\/\/acc-physics.kek.jp\/SAD\/wp-json\/wp\/v2\/posts\/82\/revisions"}],"predecessor-version":[{"id":557,"href":"https:\/\/acc-physics.kek.jp\/SAD\/wp-json\/wp\/v2\/posts\/82\/revisions\/557"}],"wp:attachment":[{"href":"https:\/\/acc-physics.kek.jp\/SAD\/wp-json\/wp\/v2\/media?parent=82"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/acc-physics.kek.jp\/SAD\/wp-json\/wp\/v2\/categories?post=82"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/acc-physics.kek.jp\/SAD\/wp-json\/wp\/v2\/tags?post=82"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}