Skip to main content
Opticsbuilder: button functions
- Add row(s): adds a row before the selected (to select a row, click on the very first column. You can select more with Shift). If N rows are selected, N new are added before the first selected
- Remove row(s): deletes selected rows. Note that trailing empty lines should be deleted at the end of the list, otherwise they are interpreted as 0-length drift elements
- Paste from clipboard: Pastes the table on clipboard, automatically inserting new lines if necessary
- Read TWISS file: reads a Twiss file, and fills the table and beam parameters. See this document for the Twiss file format
- Read aperture: add aperture information to the table. See this document for the format
- Reset table: clear the whole table
- Reference element row: Set it by selecting a row and pressing "Set Selected". At this point, the beginning of the element in the selected row will be at the position defined by (RefX, RefZ) and pointing towards RefTheta.
Note that if you change values in the table (magnetic field, length) you have to press this button again to recalculate positions.
- The searchbox allows you to find elements as you type. The list will jump to the first occurrence. Green background means found, red not found. If you want to search the end (instead of beginning, as you type), use the Search end button
- EmittanceX, EmittanceY: Defines the geometric (and not the normalized) emittance. This parameter is auto-filled when importing a Twiss file
- pMass: Rest mass of particle, the sign defining the charge in atomic units (-0.000511 for electron, 0.000511 for positron, 0.938 for proton). Auto-filled when importing Twiss file.
- Energy spread %: The energy spread, used to calculate the beam size. Be careful, it's in percent (not 0..1 fraction). Auto-filled from Twiss file.
- Current (mA): beam current, be careful to use mA and not A. Auto-filled from Twiss file.
- Beam energy (GeV): Kinetic energy of beam. Auto-filled from Twiss file.
- Step length (cm): Synrad will calculate the beam trajectory at this step length. Try to have around 1000 points per magnetic region, and not more than 100.000 in total.
- Photon energy min/max (eV): In Synrad, each region will generate photons in this energy range. Also, the spectrum plotter's X axis will be scaled to this.
- Start/end rows: if set, export will be limited to the region delimited by these two numbers. (When empty, the first/last rows will be the limits)
- Parameter output directory: parameter files will be written in this directory
- File number prefix: The number of the region will be written ahead of the name, allowing alphabetical order match the order of the sequence
- s position suffix: The s position (in meters) is added to the file name
- Write param files: When pressing this button, all param (and mag) files are exported to the specified directory. (Note that they will need a BXY file to work)
- BXY filename: the name of the BXY (lattice function) file. You have to specify it before exporting parameters, as the param files will refer to it
- Geometry filename: If aperture was defined, this Molflow/Synrad readable TXT file will contain the geometry (without the magnetic regions).
- Circle sides: the "resolution" of a circle, i.e. how many sides will a tube have. For racetrack profiles, I recommend a multiple of 4 so that sides can be symmetrically distributed
- Curve step every X radians: Polygons cannot follow a curve, so a bend must be split into straight sections. This is the maximum beding angle step between two straight sections. (If the total bend is not an integer multiple if this step, the section lengths will be automatically redistributed evenly.)
- Aperture change: Defines whether to generate a step or loft (taper) geometric transition when aperture changes.