forked from KatsOide/SAD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SADHelp.html
6934 lines (6224 loc) · 221 KB
/
SADHelp.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<HEAD>
<TITLE>
SAD/FFS SADScript Version: 1.0.10.5.4a Update:2014/01/18
</TITLE>
</HEAD>
<BODY>
<CENTER><H2>Welcome to SAD/FFS & SADScript
</H2></CENTER>
<PRE>
The FFS commands are shown in uppercases. The minimum abbreviated form
of each command is enclosed in (). Down to that form each command can be
shorten. The optional arguments for the commands are usually enclosed in
[].
</PRE><A HREF="http://acc-physics.kek.jp/SAD/">
<H4>
<IMG SRC="SAD.JPG" ALIGN="middle" ALT="SAD" WIDTH=60></A>
Back to SAD Home Page</H4>
<A HREF="example/design_example.html">
<H4>
SAD/FFS Examples</H4></A>
<HR>
<PRE>
<A HREF=#L1> </A>
<A HREF=#L2>ABORT</A>
<A HREF=#L3>APPEND(APP)</A>
<A HREF=#L4>ATTRIBUTE(ATTR)</A>
<A HREF=#L5>BYE</A>
<A HREF=#L6>command-syntax</A>
<A HREF=#L7>components</A>
<A HREF=#L8>CALCULATE(CAL)</A>
<A HREF=#L9>CHROMATICITY(CHRO)</A>
<A HREF=#L10>CLOSE(CLO)</A>
<A HREF=#L11>COUPLE(COUP)</A>
<A HREF=#L12>DISPLAY(DISP)</A>
<A HREF=#L13>ACCELERATION(A)</A>
<A HREF=#L14>ALL</A>
<A HREF=#L15>BEAM(B)</A>
<A HREF=#L16>DUMPOPTICS(D)</A>
<A HREF=#L17>GEOMETRY(G)</A>
<A HREF=#L18>OGEOMETRY(OG)</A>
<A HREF=#L19>ORBIT(O)</A>
<A HREF=#L20>pattern-string</A>
<A HREF=#L21>PHYSICAL(P)</A>
<A HREF=#L22>region</A>
<A HREF=#L23>RMATRIX(R)</A>
<A HREF=#L24>DRAW</A>
<A HREF=#L25>DUMP</A>
<A HREF=#L26>elements</A>
<A HREF=#L27>APERT</A>
<A HREF=#L28>BEND</A>
<A HREF=#L29>AE1</A>
<A HREF=#L30>AE2</A>
<A HREF=#L31>ANGLE</A>
<A HREF=#L32>DISFRIN</A>
<A HREF=#L33>DISRAD</A>
<A HREF=#L34>DROTATE</A>
<A HREF=#L35>DX</A>
<A HREF=#L36>DY</A>
<A HREF=#L37>E1</A>
<A HREF=#L38>E2</A>
<A HREF=#L39>F1</A>
<A HREF=#L40>FB1</A>
<A HREF=#L41>FB2</A>
<A HREF=#L42>FRINGE</A>
<A HREF=#L43>K0</A>
<A HREF=#L44>K1</A>
<A HREF=#L45>L</A>
<A HREF=#L46>ROTATE</A>
<A HREF=#L47>transformation</A>
<A HREF=#L48>CAVI</A>
<A HREF=#L49>DISFRIN</A>
<A HREF=#L50>DPHI</A>
<A HREF=#L51>DX</A>
<A HREF=#L52>DY</A>
<A HREF=#L53>FREQ</A>
<A HREF=#L54>HARM</A>
<A HREF=#L55>L</A>
<A HREF=#L56>PHI</A>
<A HREF=#L57>ROTATE</A>
<A HREF=#L58>V02</A>
<A HREF=#L59>V1</A>
<A HREF=#L60>V11</A>
<A HREF=#L61>V20</A>
<A HREF=#L62>VOLT</A>
<A HREF=#L63>COORD</A>
<A HREF=#L64>default-keyword</A>
<A HREF=#L65>DECA</A>
<A HREF=#L66>DISFRIN</A>
<A HREF=#L67>DISRAD</A>
<A HREF=#L68>DX</A>
<A HREF=#L69>DY</A>
<A HREF=#L70>K4</A>
<A HREF=#L71>L</A>
<A HREF=#L72>ROTATE</A>
<A HREF=#L73>transformation</A>
<A HREF=#L74>DODECA</A>
<A HREF=#L75>DISFRIN</A>
<A HREF=#L76>DISRAD</A>
<A HREF=#L77>DX</A>
<A HREF=#L78>DY</A>
<A HREF=#L79>K5</A>
<A HREF=#L80>L</A>
<A HREF=#L81>ROTATE</A>
<A HREF=#L82>transformation</A>
<A HREF=#L83>DRIFT</A>
<A HREF=#L84>L</A>
<A HREF=#L85>RADIUS</A>
<A HREF=#L86>transformation</A>
<A HREF=#L87>keywords</A>
<A HREF=#L88>MARK</A>
<A HREF=#L89>OFFSET</A>
<A HREF=#L90>MULT</A>
<A HREF=#L91>AE1</A>
<A HREF=#L92>AE2</A>
<A HREF=#L93>ANGLE</A>
<A HREF=#L94>DISFRIN</A>
<A HREF=#L95>DISRAD</A>
<A HREF=#L96>DPHI</A>
<A HREF=#L97>E1</A>
<A HREF=#L98>E2</A>
<A HREF=#L99>F1</A>
<A HREF=#L100>F2</A>
<A HREF=#L101>FB1</A>
<A HREF=#L102>FB2</A>
<A HREF=#L103>FREQ</A>
<A HREF=#L104>FRINGE</A>
<A HREF=#L105>HARM</A>
<A HREF=#L106>K0</A>
<A HREF=#L107>K1</A>
<A HREF=#L108>K10</A>
<A HREF=#L109>K11</A>
<A HREF=#L110>K12</A>
<A HREF=#L111>K13</A>
<A HREF=#L112>K14</A>
<A HREF=#L113>K15</A>
<A HREF=#L114>K16</A>
<A HREF=#L115>K17</A>
<A HREF=#L116>K18</A>
<A HREF=#L117>K19</A>
<A HREF=#L118>K2</A>
<A HREF=#L119>K20</A>
<A HREF=#L120>K21</A>
<A HREF=#L121>K3</A>
<A HREF=#L122>K4</A>
<A HREF=#L123>K5</A>
<A HREF=#L124>K6</A>
<A HREF=#L125>K7</A>
<A HREF=#L126>K8</A>
<A HREF=#L127>K9</A>
<A HREF=#L128>L</A>
<A HREF=#L129>misalignments</A>
<A HREF=#L130>multipole_with_nonzero_ANGLE</A>
<A HREF=#L131>PHI</A>
<A HREF=#L132>RADIUS</A>
<A HREF=#L133>SK0</A>
<A HREF=#L134>SK1</A>
<A HREF=#L135>SK10</A>
<A HREF=#L136>SK11</A>
<A HREF=#L137>SK12</A>
<A HREF=#L138>SK13</A>
<A HREF=#L139>SK14</A>
<A HREF=#L140>SK15</A>
<A HREF=#L141>SK16</A>
<A HREF=#L142>SK17</A>
<A HREF=#L143>SK18</A>
<A HREF=#L144>SK19</A>
<A HREF=#L145>SK2</A>
<A HREF=#L146>SK20</A>
<A HREF=#L147>SK21</A>
<A HREF=#L148>SK3</A>
<A HREF=#L149>SK4</A>
<A HREF=#L150>SK5</A>
<A HREF=#L151>SK6</A>
<A HREF=#L152>SK7</A>
<A HREF=#L153>SK8</A>
<A HREF=#L154>SK9</A>
<A HREF=#L155>VOLT</A>
<A HREF=#L156>OCT</A>
<A HREF=#L157>DISFRIN</A>
<A HREF=#L158>DISRAD</A>
<A HREF=#L159>DX</A>
<A HREF=#L160>DY</A>
<A HREF=#L161>K3</A>
<A HREF=#L162>L</A>
<A HREF=#L163>ROTATE</A>
<A HREF=#L164>transformation</A>
<A HREF=#L165>QUAD</A>
<A HREF=#L166>DISFRIN</A>
<A HREF=#L167>DISRAD</A>
<A HREF=#L168>DX</A>
<A HREF=#L169>DY</A>
<A HREF=#L170>F1</A>
<A HREF=#L171>F2</A>
<A HREF=#L172>FRINGE</A>
<A HREF=#L173>K1</A>
<A HREF=#L174>L</A>
<A HREF=#L175>ROTATE</A>
<A HREF=#L176>transformation</A>
<A HREF=#L177>SEXT</A>
<A HREF=#L178>DISFRIN</A>
<A HREF=#L179>DISRAD</A>
<A HREF=#L180>DX</A>
<A HREF=#L181>DY</A>
<A HREF=#L182>K2</A>
<A HREF=#L183>L</A>
<A HREF=#L184>ROTATE</A>
<A HREF=#L185>transformation</A>
<A HREF=#L186>SOL</A>
<A HREF=#L187>BOUND</A>
<A HREF=#L188>BZ</A>
<A HREF=#L189>DISFRIN</A>
<A HREF=#L190>DPX</A>
<A HREF=#L191>DPY</A>
<A HREF=#L192>DX</A>
<A HREF=#L193>DY</A>
<A HREF=#L194>F1</A>
<A HREF=#L195>GEO</A>
<A HREF=#L196>expressions</A>
<A HREF=#L197>(-)</A>
<A HREF=#L198>(/)</A>
<A HREF=#L199>AddTo(+=)</A>
<A HREF=#L200>Alternatives(|)</A>
<A HREF=#L201>And(&&)</A>
<A HREF=#L202>Apply(@@)</A>
<A HREF=#L203>CompoundExpression(;)</A>
<A HREF=#L204>Decrement(--)</A>
<A HREF=#L205>DivideBy(/=)</A>
<A HREF=#L206>Dot(.)</A>
<A HREF=#L207>Equal(==)</A>
<A HREF=#L208>Function(&)</A>
<A HREF=#L209>Greater(>)</A>
<A HREF=#L210>GreaterEqual(>= or =>)</A>
<A HREF=#L211>Increment(++)</A>
<A HREF=#L212>Less(<)</A>
<A HREF=#L213>LessEqual(<= or =<)</A>
<A HREF=#L214>List({})</A>
<A HREF=#L215>Map(/@)</A>
<A HREF=#L216>MapAll(//@)</A>
<A HREF=#L217>Member(@)</A>
<A HREF=#L218>MessageName(::)</A>
<A HREF=#L219>Not(~)</A>
<A HREF=#L220>Or(||)</A>
<A HREF=#L221>Part([[]])</A>
<A HREF=#L222>PatternTest(?)</A>
<A HREF=#L223>Plus(+)</A>
<A HREF=#L224>Power(^)</A>
<A HREF=#L225>Repeated(..)</A>
<A HREF=#L226>RepeatedNull(...)</A>
<A HREF=#L227>ReplaceAll(/.)</A>
<A HREF=#L228>ReplaceRepeated(//.)</A>
<A HREF=#L229>Rule(->)</A>
<A HREF=#L230>RuleDelayed(:>)</A>
<A HREF=#L231>SameQ(===)</A>
<A HREF=#L232>Sequence([])</A>
<A HREF=#L233>Set(=)</A>
<A HREF=#L234>SetDelayed(:=)</A>
<A HREF=#L235>StringJoin(//)</A>
<A HREF=#L236>SubtractFrom(-=)</A>
<A HREF=#L237>TagSet(/:)</A>
<A HREF=#L238>Times(*)</A>
<A HREF=#L239>TimesBy(*=)</A>
<A HREF=#L240>Unequal(<>)</A>
<A HREF=#L241>UnsameQ(<=>)</A>
<A HREF=#L242>Unset(=.)</A>
<A HREF=#L243>extended-Twiss-parameters</A>
<A HREF=#L244>definitions</A>
<A HREF=#L245>ELSE</A>
<A HREF=#L246>ELSEIF</A>
<A HREF=#L247>EMITTANCE(EMIT)</A>
<A HREF=#L248>END</A>
<A HREF=#L249>ENDIF</A>
<A HREF=#L250>EXECUTE(EXEC)</A>
<A HREF=#L251>flags</A>
<A HREF=#L252>ABSW</A>
<A HREF=#L253>BIPOL</A>
<A HREF=#L254>CELL</A>
<A HREF=#L255>CMPLOT</A>
<A HREF=#L256>COD</A>
<A HREF=#L257>CODPLOT</A>
<A HREF=#L258>CONV</A>
<A HREF=#L259>CONVCASE</A>
<A HREF=#L260>DAMPONLY</A>
<A HREF=#L261>DAPERT</A>
<A HREF=#L262>EMIOUT</A>
<A HREF=#L263>FFSPRMPT</A>
<A HREF=#L264>FIXSEED</A>
<A HREF=#L265>FLUC</A>
<A HREF=#L266>GAUSS</A>
<A HREF=#L267>GEOCAL</A>
<A HREF=#L268>GEOFIX</A>
<A HREF=#L269>IDEAL</A>
<A HREF=#L270>INS</A>
<A HREF=#L271>INTRA</A>
<A HREF=#L272>JITTER</A>
<A HREF=#L273>LWAKE</A>
<A HREF=#L274>MOVESEED</A>
<A HREF=#L275>PHOTONS</A>
<A HREF=#L276>PRSVCASE</A>
<A HREF=#L277>PSPAC</A>
<A HREF=#L278>QUIET</A>
<A HREF=#L279>RAD</A>
<A HREF=#L280>RADCOD</A>
<A HREF=#L281>RADLIGHT</A>
<A HREF=#L282>REAL</A>
<A HREF=#L283>RELW</A>
<A HREF=#L284>RFSW</A>
<A HREF=#L285>RING</A>
<A HREF=#L286>SELFCOD</A>
<A HREF=#L287>SPAC</A>
<A HREF=#L288>STABLE</A>
<A HREF=#L289>TRPT</A>
<A HREF=#L290>TWAKE</A>
<A HREF=#L291>UNIFORM</A>
<A HREF=#L292>UNIPOL</A>
<A HREF=#L293>UNSTABLE</A>
<A HREF=#L294>WSPAC</A>
<A HREF=#L295>functions</A>
<A HREF=#L296>Beam-line-functions</A>
<A HREF=#L297>BeamLine</A>
<A HREF=#L298>BeamLineName</A>
<A HREF=#L299>ExtractBeamLine</A>
<A HREF=#L300>PrintBeamLine</A>
<A HREF=#L301>WriteBeamLine</A>
<A HREF=#L302>Data-Manipulation</A>
<A HREF=#L303>Fit</A>
<A HREF=#L304>PolynomialFit</A>
<A HREF=#L305>Spline</A>
<A HREF=#L306>NIntegrate</A>
<A HREF=#L307>DownhillSimplex</A>
<A HREF=#L308>FFS-dedicated-functions</A>
<A HREF=#L309>AccelerateParticles</A>
<A HREF=#L310>BeamMatrix</A>
<A HREF=#L311>DynamicApertureSurvey</A>
<A HREF=#L312>Element</A>
<A HREF=#L313>key-strings</A>
<A HREF=#L314>Emittance</A>
<A HREF=#L315>ExternalMap</A>
<A HREF=#L316>FFS</A>
<A HREF=#L317>FitValue</A>
<A HREF=#L318>FitWeight</A>
<A HREF=#L319>GeoBase</A>
<A HREF=#L320>LINE</A>
<A HREF=#L321>key-strings</A>
<A HREF=#L322>OptimizeOptics</A>
<A HREF=#L323>OrbitGeo</A>
<A HREF=#L324>RadiationField</A>
<A HREF=#L325>RadiationSpectrum</A>
<A HREF=#L326>SetElement</A>
<A HREF=#L327>SurvivedParticles</A>
<A HREF=#L328>SymplecticJ</A>
<A HREF=#L329>SynchroBetaEmittance</A>
<A HREF=#L330>TouschekLifetime</A>
<A HREF=#L331>TrackParticles</A>
<A HREF=#L332>Twiss</A>
<A HREF=#L333>VariableRange</A>
<A HREF=#L334>VariableWeight</A>
<A HREF=#L335>WakeFunction</A>
<A HREF=#L336>Functional-operations</A>
<A HREF=#L337>Difference</A>
<A HREF=#L338>FixedPoint</A>
<A HREF=#L339>FixedPointList</A>
<A HREF=#L340>SelectCases</A>
<A HREF=#L341>SwitchCases</A>
<A HREF=#L342>Graphics</A>
<A HREF=#L343>ListPlot</A>
<A HREF=#L344>ColumnPlot</A>
<A HREF=#L345>HistoPlot</A>
<A HREF=#L346>ListContourPlot</A>
<A HREF=#L347>ListDensityPlot</A>
<A HREF=#L348>GeometryPlot</A>
<A HREF=#L349>BeamPlot</A>
<A HREF=#L350>OpticsPlot</A>
<A HREF=#L351>FitPlot</A>
<A HREF=#L352>Plot</A>
<A HREF=#L353>Multiprocessing</A>
<A HREF=#L354>Fork</A>
<A HREF=#L355>OpenShared</A>
<A HREF=#L356>Shared</A>
<A HREF=#L357>SharedSize</A>
<A HREF=#L358>Object-oriented-programing</A>
<A HREF=#L359>Class</A>
<A HREF=#L360>Random-number-functions</A>
<A HREF=#L361>Random</A>
<A HREF=#L362>GaussRandom</A>
<A HREF=#L363>ParabolaRandom</A>
<A HREF=#L364>SeedRandom</A>
<A HREF=#L365>ListRandom</A>
<A HREF=#L366>System-interface</A>
<A HREF=#L367>System</A>
<A HREF=#L368>TemporaryName</A>
<A HREF=#L369>Utilities</A>
<A HREF=#L370>DateString</A>
<A HREF=#L371>FIT</A>
<A HREF=#L372>FITPOINTS(FITP)</A>
<A HREF=#L373>FIX</A>
<A HREF=#L374>FREE</A>
<A HREF=#L375>default-keyword</A>
<A HREF=#L376>geometrical-functions</A>
<A HREF=#L377>GEO</A>
<A HREF=#L378>GO</A>
<A HREF=#L379>IF</A>
<A HREF=#L380>INPUT(IN)</A>
<A HREF=#L381>machine-error-commands</A>
<A HREF=#L382>matching-function-commands</A>
<A HREF=#L383>multi-turn-tracking</A>
<A HREF=#L384>MATRIX(MAT)</A>
<A HREF=#L385>MEASURE(MEA)</A>
<A HREF=#L386>off-momentum-matching</A>
<A HREF=#L387>optical-functions</A>
<A HREF=#L388>OUTPUT(OUT)</A>
<A HREF=#L389>PRINT(PRI)</A>
<A HREF=#L390>QUIT</A>
<A HREF=#L391>RADINT</A>
<A HREF=#L392>READ</A>
<A HREF=#L393>RECOVER(REC)</A>
<A HREF=#L394>REJECT(REJ)</A>
<A HREF=#L395>REPEAT(REP)</A>
<A HREF=#L396>RESET</A>
<A HREF=#L397>REVERSE(REV)</A>
<A HREF=#L398>set-value-of-element</A>
<A HREF=#L399>keywords</A>
<A HREF=#L400>default-keyword</A>
<A HREF=#L401>special-symbols</A>
<A HREF=#L402>special-variables</A>
<A HREF=#L403>$FORM</A>
<A HREF=#L404>CASE</A>
<A HREF=#L405>CHARGE</A>
<A HREF=#L406>CONVERGENCE</A>
<A HREF=#L407>DAPWIDTH</A>
<A HREF=#L408>DP</A>
<A HREF=#L409>DP0</A>
<A HREF=#L410>DTSYNCH</A>
<A HREF=#L411>EFFVCRATIO</A>
<A HREF=#L412>ElementValues</A>
<A HREF=#L413>EMITX</A>
<A HREF=#L414>EMITXE</A>
<A HREF=#L415>EMITY</A>
<A HREF=#L416>EMITYE</A>
<A HREF=#L417>EMITZ</A>
<A HREF=#L418>EMITZE</A>
<A HREF=#L419>FFS$NumericalDerivative</A>
<A HREF=#L420>FitFunction</A>
<A HREF=#L421>FSHIFT</A>
<A HREF=#L422>GCUT</A>
<A HREF=#L423>InitialOrbits</A>
<A HREF=#L424>LOSSAMPL</A>
<A HREF=#L425>LOSSDZ</A>
<A HREF=#L426>MatchingAmplitude</A>
<A HREF=#L427>MatchingResidual</A>
<A HREF=#L428>MASS</A>
<A HREF=#L429>MINCOUP</A>
<A HREF=#L430>MOMENTUM</A>
<A HREF=#L431>NBUNCH</A>
<A HREF=#L432>NetResidual</A>
<A HREF=#L433>NP</A>
<A HREF=#L434>OffMomentumWeight</A>
<A HREF=#L435>OMEGA0</A>
<A HREF=#L436>OpticsEpilog</A>
<A HREF=#L437>OpticsProlog</A>
<A HREF=#L438>PageWidth</A>
<A HREF=#L439>PBUNCH</A>
<A HREF=#L440>PhotonList</A>
<A HREF=#L441>PHICAV</A>
<A HREF=#L442>SpeedOfLight</A>
<A HREF=#L443>StabilityLevel</A>
<A HREF=#L444>STACKSIZ</A>
<A HREF=#L445>TITLE</A>
<A HREF=#L446>SAVE</A>
<A HREF=#L447>SEED</A>
<A HREF=#L448>SHOW</A>
<A HREF=#L449>SPLIT</A>
<A HREF=#L450>STATUS(STAT)</A>
<A HREF=#L451>STOP</A>
<A HREF=#L452>TDR</A>
<A HREF=#L453>TERMINATE(TERM)</A>
<A HREF=#L454>TYPE(T)</A>
<A HREF=#L455>UNTIL</A>
<A HREF=#L456>USE</A>
<A HREF=#L457>VARIABLES(VAR)</A>
<A HREF=#L458>VARY</A>
<A HREF=#L459>VISIT</A>
<A HREF=#L460>wildcards</A>
<A HREF=#L461>x-y-coupling</A>
</PRE><HR>
<H3><A NAME=L1>
</A>
</H3>
<PRE>
</PRE>
<H3><A NAME=L2>
ABORT</A>
</H3>
<PRE>Stops SAD immediately.
</PRE>
<H3><A NAME=L3>
APPEND(APP)</A>
</H3>
<PRE>APP {filename | file-number} switches the output stream to the specified
file or the file number. The output is appended to the existing file.
</PRE>
<H3><A NAME=L4>
ATTRIBUTE(ATTR)</A>
</H3>
<PRE>Usage: ATTR element-pattern
prints out the current value, minimum and maximum values, COUPLEd element
and its coefficient for elements which match the element-pattern.
</PRE>
<H3><A NAME=L5>
BYE</A>
</H3>
<PRE>Exits from the current beam line and returns to the original beam line
where VISIT command was issued. All information specific to the beam line,
such as matching conditions are restored.
Note that BYE does neither SAVE the values of elements of the leaving
beam line, nor RESET the values of elements of the returning beam line.
</PRE>
<H3><A NAME=L6>
command-syntax</A>
</H3>
<PRE>The command syntax in FFS is
expression1 [param1..] [;] expression2..
(1) The input is first evaluated as an expression. If the expression
returns a Symbol with the same name as the expression itself, it is
interpreted as an FFS command, otherwise the returned value is printed
out unless it is Null.
(2) Each command takes succeeding its parameters if necessary. A command with
indefinite number of parameters can be terminated by semicolon.
Most commands terminate itself at the end of line.
(3) A line can be continued to the next line if a backslash is placed at the
end of the line.
(4) An expression continues to the next line if it is not closed in the line.
(5) An exclamation mark comments out the rest of the line.
Example: A command line
QF* .1
means the set-value-of-element command as unless the symbol QF has been defined otherwise.
If QF has been defines as a number, such as QF=2.5, the above command line
is interpreted as Times[QF,.1] then returns .25 .
</PRE>
<H3><A NAME=L7>
components</A>
</H3>
<PRE>Components are the objects which consist the beam line. A component simulates
an individual magnet, drift space, or rf-cavity. The parameters of a
component is specified the values in the corresponding element with the
same name as the component, which simulates a power supply. Many
components can be attached to the same element. Parameters of each
component may deviate from the corresponding element if machine errors are
given.
A component is specified with the form name[.order][{+-}offset], where
name is the name of the component. The number order means the order-th
component which belongs to name element, counted from the beginning of the
line starting from 1. Offset is a positive or negative number to specify
the downstream or upstream components from the given component. If order
is omitted, the first element is assumed, and if offset is omitted, zero is
assumed.
The end of line is specified by $$$. The first component can be
specified by ^^^.
</PRE>
<H3><A NAME=L8>
CALCULATE(CAL)</A>
</H3>
<PRE>Usage: (1) CALC [[NO]EXPAND]]
(2) CALC matching-function1[-] [matching-function2[-]..]
(1) With no argument or with an option [NO]EXPAND, calculates the optics
and the matching-functions using the current values of the components.
It prints out the values of the matching-functions specified either by the
matching-function-commands or the second usage of CALC, as described below.
If an option EXPAND is given(default), it expands the beam line before the
calculation. If NOEXPAND is given, it calculates without any expansion.
FFS["CAL"] and FFS["GO"] returns the result as a list, whose format
is
{dp, kind, reslist, function-values},
where
dp: a list contains dp/p0 .
kind: a list of kind of the orbit (ususally 0, but 1 to 6 for the
finite amplitude matching, see special-variables:MatchingAmplitude).
reslist: a list of {residual, xstab, ystab}, where
residual: matching residual,
xstab: True when the matrix is stable in X,
ystab: True when the matrix is stable in Y, for each orbit.
Above are lists with length nf (== number of orbits).
function-values: a list of length nc (== number of calculated items). Each
element has the form:
{component1, component2, function, list-of-values},
where
component1, component2: fit locations (see FIT).
function: name of the function (see matching-function-commands).
list-of-values: list of the value of the function for each orbit.
Length nf.
The central orbit comes at the Floor[(n+1)/2]-th element.
(2) With matching-fuction names, sets the matching-functions at the current
fit point to be printed out after calculation. If the matching-function is
followed by a minus sign, it suppresses the print-out.
Example: CALC BX BY CALC
</PRE>
<H3><A NAME=L9>
CHROMATICITY(CHRO)</A>
</H3>
<PRE>CHRO prints out the chromaticity of QUAD and SEXT in the entire beam
line using the simplest formula:
xi_{x,y}=Integrate[-(K1/L) beta_{x,y}(s) ds] for QUAD,
xi_{x,y}=Integrate[-(K2/L) eta_x (s) beta_{x,y}(s) ds] for SEXT.
These formula are not valid when there is x-y coupling or vertical
dispersion.
</PRE>
<H3><A NAME=L10>
CLOSE(CLO)</A>
</H3>
<PRE> CLOSE [INPUT(IN)] closes the current input stream and switches it to
the previous input stream.
CLOSE OUTPUT(OUT) suspends the current output and switches it to the
previous output stream.
</PRE>
<H3><A NAME=L11>
COUPLE(COUP)</A>
</H3>
<PRE>Usage: COUP slave-element master-element coefficient
sets the value of the default-keyword of slave-element to be equal to
coefficient times the value of the default-keyword of master-element.
COUPLE(COUP) cannot be cascaded. The master-element cannot be COUPLEd to
any other element. To reset COUPLE, say COUP slave-element slave-element 1.
</PRE>
<H3><A NAME=L12>
DISPLAY(DISP)</A>
</H3>
<PRE>Usage: DISP_LAY [keywords] [pattern-string] [region]
Displays values of various optical-/geometric-functions at the components
given by the pattern-string in the region (see region) in the current beam
line.
It has several display modes specified by the keywords. As the default,
it displays AX, BX, NX, EX, EPX, AY, BY, NY, EY, EPY, LENG, the length and
the value of the default-keyword of the component.
Each line refers to the entrance of each component of the line.
The end of the beam line has the name "$$$". The first component can be
specified by "^^^".
DISP does not calculate the functions to be displayed, so CALCULATE(CALC)
is necessary whenever values of components are updated.
</PRE>
<UL>
<LI>
<H3><A NAME=L13>
ACCELERATION(A)</A>
</H3>
<PRE>DISP A displays the nominal energy, energy deviation(DDP), longitudinal
position(z), and emittances for a transport line with accelerating cavities.
The flag TRPT must be on.
</PRE>
<LI>
<H3><A NAME=L14>
ALL</A>
</H3>
<PRE>ALL is a word to choose the entire beam line for the region to be displayed.
</PRE>
<LI>
<H3><A NAME=L15>
BEAM(B)</A>
</H3>
<PRE>DISP B displays the beam sizes and the projected Twiss parameters,
calculated either by the BEAMSIZE(BEAM) command or the EMIT command with
the CODPLOT flag.
Example: EMITX=...; EMITY=...;DP=...;
BEAMSIZE(BEAM)
DISP B
</PRE>
<LI>
<H3><A NAME=L16>
DUMPOPTICS(D)</A>
</H3>
<PRE>DISP D displays all matching-functions in one line
suitable to be read by a spread-sheet program.
</PRE>
<LI>
<H3><A NAME=L17>
GEOMETRY(G)</A>
</H3>
<PRE>DISP G displays geometric information of the beam line.
It shows the geometry at the coordinate, except for a SOL region,
where the geometry at the orbit is shown.
</PRE>
<LI>
<H3><A NAME=L18>
OGEOMETRY(OG)</A>
</H3>
<PRE>DISP OG displays geometric information at the orbit.
</PRE>
<LI>
<H3><A NAME=L19>
ORBIT(O)</A>
</H3>
<PRE>DISP O displays the orbits DX, DPX, DY, DPY together with the other
optical-functions.
</PRE>
<LI>
<H3><A NAME=L20>
pattern-string</A>
</H3>
<PRE>The components in the current region can be selectively displayed
by the DISP command using the pattern-string. The pattern-string is a
character string involving the wildcards to match the name of the components.
Note that the components are chosen in the current region, and the keyword
ALL is necessary to extend it to the entire beam line.
</PRE>
<LI>
<H3><A NAME=L21>
PHYSICAL(P)</A>
</H3>
<PRE>DISP P displays the physical dispersions PEX, PEPX, PEY, PEPY,
together with the 1D optical parameters.
</PRE>
<LI>
<H3><A NAME=L22>
region</A>
</H3>
<PRE>Region for DISPLAY(DISP) is specified as
DISP .... begin [end]
with begin and end having the form name[.order][{+-}offset] (see components).
Example: DISP ... QF.2-10 QD+5
displays functions starting at 10 elements upstream from the entrance of the
second QF through 5 elements downstream from the entrance of the first QD.
The region for DISP is kept after once set It is shown in the second part
of the prompt when FFSPRMPT is ON, and also seen by the STATUS(STAT)
command.
The components which match the pattern-string in DISP are only chosen in
the current region.
</PRE>
<LI>
<H3><A NAME=L23>
RMATRIX(R)</A>
</H3>
<PRE>DISP R displays the components of the x-y coupling matrix R
together with the 1D optical parameters. See x-y-coupling.
</PRE>
</UL>
<H3><A NAME=L24>
DRAW</A>
</H3>
<PRE>Usage: DRAW [begin end] fun1 [fun2..] [& fun11 [fun12..]] [element-pattern]
prints out the TopDrawer commands of the plots of functions fun1...
Available functions are all matching-functions (except LENG, TRX, TRY, GX,
GY, GZ, CHI1, CHI2, CHI3) and additional functions. If functions are
separated by ampersand (&), these are plotted in a separated window.
If begin- and end-components are specified, the plot region is limited
between them. If the end-component comes earlier than the
begin-components, it wraps the plot around the beam line.
If the optional element-pattern is given, it draws the beam-line lattice
with the labels for elements which match element-pattern. If LAT is
specified for element-pattern, the lattice is drawn without label.
</PRE>
<H3><A NAME=L25>
DUMP</A>
</H3>
<PRE>Usage: DUMP component-pattern [compnent-pattern1..]
prints out the current machine errors of components which match component-
pattern.
</PRE>
<H3><A NAME=L26>
elements</A>
</H3>
<PRE>An element in FFS represents an object which has a unique name and
several keywords with values. This simulates a power supply of a magnet.
An element has one or more components, which correspond to individual
magnets in a beam line. Each component may have different values from
the values of the corresponding element. This simulates the machine error
which varies magnet to magnet.
The value of an element can be saved to or recovered from the
element-save-buffer by SAVE or RESET commnads. Different beam lines can
share the same element, and their values can be different to each other,
but they have the common element-save-buffer. Therefore the value of an
element can be transferred between beam lines by SAVE and RESET command
through the element-save-buffer.
An element is created only in SAD MAIN level. In the definition, if a
keyword is omitted, the previous definition is unchanged. All keywords have
the default value zero. In FFS, it is only possible to change their values.
</PRE>
<UL>
<LI>
<H3><A NAME=L27>
APERT</A>
</H3>
<PRE>An aperture. Only valid in tracking. A particle with
(x - DX)^2/AX^2 + (y - DY)^2/AY^2 < 1 &&
Min[DX1, DX2] < x < Max[DX1, DX2] &&
Min[DY1, DY2] < y < Max[DY2, DY2]
can pass through the aperture, otherwise it is lost and a message
is printed out. If AX or AY is zero (default), they are interpreted as
infinity. If AX <=> 0 && AY <=> 0 and (DX1 == DX2 or DY1 == DY2) then
the aperture is only determined by AX and AY.
</PRE>
<LI>
<H3><A NAME=L28>
BEND</A>
</H3>
<PRE>A bending magnet.
</PRE>
<UL>
<LI>
<H3><A NAME=L29>
AE1</A>
</H3>
<PRE>The absolute face angle at the entrance.
The effective face angle is E1 * ANGLE + AE1, and a positive
angle at the entrance corresponds to a surface with dx/ds > 0.
</PRE>
<LI>
<H3><A NAME=L30>
AE2</A>
</H3>
<PRE>The absolute face-angle at the exit to the bending angle.
The effective face angle is E2 * ANGLE + AE2, and a positive
angle at the exit corresponds to a surface with dx/ds < 0.
</PRE>
<LI>
<H3><A NAME=L31>
ANGLE</A>
</H3>
<PRE>The bending angle. If positive, it bends the orbit in x-s plane toward
negative-x-direction. ANGLE determines the geometry of the beam line,
while K0 represents a dipole kick on top of the bending angle given by
ANGLE, i.e., the total deflection of the beam is given of ANGLE + K0.
</PRE>
<LI>
<H3><A NAME=L32>
DISFRIN</A>
</H3>
<PRE>If nonzero, the nonlinear Maxwellian fringe is suppressed.
</PRE>
<LI>
<H3><A NAME=L33>
DISRAD</A>
</H3>
<PRE>If nonzero, the synchrotron radiation in the particle-tracking is inhibited.
</PRE>
<LI>
<H3><A NAME=L34>
DROTATE</A>
</H3>
<PRE>Additional rotation in x-y plane to simulate a rotation error.
DROTATE does not afgfect the geometry of the ring.
</PRE>
<LI>
<H3><A NAME=L35>
DX</A>
</H3>
<PRE>Horizontal displacement of magnet. This applied before the rotation by
ROTATE.
</PRE>
<LI>
<H3><A NAME=L36>
DY</A>
</H3>
<PRE>Vertical displacement of magnet. This applied before the rotation by
ROTATE.
</PRE>
<LI>
<H3><A NAME=L37>
E1</A>
</H3>
<PRE>The ratio of the face-angle at the entrance to the bending angle.
The effective face angle is E1 * ANGLE + AE1, and a positive
angle at the entrance corresponds to a surface with dx/ds > 0.
For example, a symmetrically-placed rectangular magnet has
E1 = 0.5 and E2 = 0.5.
</PRE>
<LI>
<H3><A NAME=L38>
E2</A>
</H3>
<PRE>The ratio of the face-angle at the exit to the bending angle.
The effective face angle is E2 * ANGLE + AE2, and a positive
angle at the exit corresponds to a surface with dx/ds < 0.
For example, a symmetrically-placed rectangular magnet has
E1 = 0.5 and E2 = 0.5.
</PRE>
<LI>
<H3><A NAME=L39>
F1</A>
</H3>
<PRE>Length of the slope of the field at the edge as:
By(s) | *******
| *
| *
|*
*
*|
* |
* |
----*******---+--------- s
| |
|<----->|
| F1 |
Only the effects up to y^4 in Hamiltonian are taken into account.
More rigorous definition is
F1 = 6 Integrate[By(s)/B0 - (By(s)/B0)^2, {s, -Inf, Inf}] ,
where integration is done over one fringe.
The transformation of the linear fringe of the entrance of a bend is
exp(:V:), V = -f^2/rhob px/p/24 - f/rhob^2 y^2/p/12
+ 1/rhob^2/f y^4/p/6 ,
where 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 changed.
This linear fringe also changes the path length in the body of the bend as
l'=l-(phi0 f)^2/l/24 Sin[(phi0(1-E1-E2)-AE1-AE2)/2]/Sin[phi0/2]
to maintain the geometric position of the design orbit, i.e., you have to
increase the bend field a little bit to keep the orbit unchanged. Unlike a
quadrupole, the effect of linear fringe is always applied at both the
entrance and the exit, otherwise you cannot obtain a circular design orbit.
Use FB1 and FB2 to specify the values of entrance and exit separately.
</PRE>
<LI>
<H3><A NAME=L40>
FB1</A>
</H3>
<PRE> F1 at the entrance. Actually F1 + FB1 is used at the entrance.
</PRE>
<LI>
<H3><A NAME=L41>
FB2</A>
</H3>
<PRE> F1 at the exit. Actually F1 + FB2 is used at the exit.
</PRE>
<LI>
<H3><A NAME=L42>
FRINGE</A>
</H3>
<PRE>When FRINGE is non-zero, the effect of the linear fringe F1 is taken into
account both at the entrance and the exit.
The transformation of the linear fringe of the entrance of a bend is
exp(:V:), V = -f^2/rhob px/p/24 - f/rhob^2 y^2/p/12
+ 1/rhob^2/f y^4/p/6 ,
where 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 changed.
This linear fringe also changes the path length in the body of the bend as
l'=l-(phi0 f)^2/l/24 Sin[(phi0(1-E1-E2)-AE1-AE2)/2]/Sin[phi0/2]
to maintain the geometric position of the design orbit, i.e., you have to
increase the bend field a little bit to keep the orbit unchanged. Unlike a
quadrupole, the effect of linear fringe is always applied at both the
entrance and the exit, otherwise you cannot obtain a circular design orbit.
Use FB1 and FB2 to specify the values of entrance and exit separately.
</PRE>
<LI>
<H3><A NAME=L43>
K0</A>
</H3>
<PRE>The normal 2-pole magnetic field component (times the length L).
K0 = B^(0)L/(Brho),
where L is the length of the component. Positive sign means horizontal
focusing.
</PRE>
<LI>
<H3><A NAME=L44>
K1</A>
</H3>
<PRE>The normal 4-pole magnetic field component (times the length L).