Beam Line Functions

Functions/objects to construct/edit beam lines and elements in FFS.

BeamLine[]

Usage: BeamLine[e1, e2, ...];

where e1, e2 has a form of

  [ - ][ n* ] x ,

with x being one of

  1. a name (either a symbol or a character string) of an element defined in MAIN.
  2. a name (either a symbol or a character string) of a LINE defined in MAIN.
  3. a BeamLine object.

An optional negative sign specifies the direction and a number n the repetition number in the same way as MAIN. A BeamLine object is automatically expanded to the lowest level whenever it is evalluated. Editing of BeamLine can be done using any List-handling functions such as Join, Insert, Delete, etc. of FFS.

A BeamLine object can be used for FFS calculation when it is used as the argument of USE or VISIT commands:

Examples:
1) USE BeamLine[IP,QF,QD]
2) aaa=ExtractBeamLine[];
  USE Join[aaa,-aaa]

In these cases the new beam line becomes a new LINE in the MAIN level, with a name which is created automatically.

BeamLineName[]

BeamLineName[] returns the name of the current beam line. If a BeamLine object is used by USE or VISIT, the new beam line becomes a new LINE in the MAIN level, with a name which is created automatically.

ExtractBeamLine[]

Usage: ExtractBeamLine[line]

returns a BeamLine object which represents the expanded form of line which has been defined in MAIN. If line is omitted, the current line is assumed.

PrintBeamLine[]

Usage: PrintBeamLine[f, b1,.. ,option]

writes the BeamLine b1,.. to file f to stdout. If Format->"MAIN" is given, it writes in the MAIN-input format. If Name->{name1,..} is given, names of BeamLines are also written. The number of Name must be larger than number of BeamLines.

WriteBeamLine[]

Usage: WriteBeamLine[f, b1,.. ,option]

writes the BeamLine b1,.. to file f. If Format->"MAIN" is given, it writes in the MAIN-input format. If Name->{name1,..} is given, names of BeamLines are also written. The number of Name must be larger than number of BeamLines.


トップ   差分 バックアップ リロード   一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2008-04-02 (水) 19:18:59