Linac96

A GRAPHIC USER INTERFACE FOR THE

PARTICLE OPTICS CODE TRANSPORT

George H. Gillespie, Barrey W. Hill, Nathan A. Brown, R. Chris Babcock

G. H. Gillespie Associates, Inc., P.O. Box 2961, Del Mar, CA 92014, U.S.A.

and

David C. Carey

Fermi National Accelerator Laboratory, P. O. Box 500, Batavia, IL 60510, USA

Abstract

A graphic user interface (GUI), providing for easy problem set up and data input, has been integrated with the TRANSPORT program. TRANSPORT is a third-order optics code that is one of the standard programs used in the design of charged particle beamlines. We have developed a GUI for TRANSPORT using the Shell for Particle Accelerator Related Codes (S.P.A.R.C.), a software environment developed specifically to support accelerator simulation programs. Problem set up is accomplished graphically. The configuration of a TRANSPORT beamline is defined by selecting icons representing transport elements from a palette and dragging them to a window. A dynamic data structure is used, which expands as the beamline model is built. Default data is provided for all elements so each beamline is fully defined as it is constructed. Specific problems are formulated by editing the data presented in specialized windows: different options for describing each element are available, word descriptions for every parameter are given, several choices of units including "smart units" are offered, and user guidance limits are displayed for all parameters. TRANSPORT is executed using a MAD-type data file written by the GUI. This new approach to using TRANSPORT is described and examples from the interface are illustrated.

Introduction

TRANSPORT [1] is one of the standard programs used to model and design charged particle transport lines. Although TRANSPORT offers powerful fitting and other analysis capabilities, new users often find the initial set up of a design problem challenging and time consuming. We have developed a new approach to using TRANSPORT by integrating it with a GUI designed specifically to support particle beam simulation and analysis programs. Known as the Shell for Particle Accelerator Related Codes (S.P.A.R.C.), this GUI provides a unique software environment customized to the needs of the accelerator community [2]. The approach adopted for TRANSPORT is similar to that used for integrating other programs into the S.P.A.R.C. environment [3,4,5]. Figure 1 shows a computer interface screen for the TRANSPORT GUI.

Several advanced capabilities have been added to S.P.A.R.C. that are aimed at improving the productivity of new users. These new features were evaluated using a prototype of the TRANSPORT GUI as the primary computer tool in a recent course at the U. S. Particle Accelerator School (USPAS). This paper emphasizes several of the new features as well as other improvements implemented following the USPAS.


Figure 1. Example of the TRANSPORT graphic user interface.

Overview of the GUI for TRANSPORT

Three primary elements of the interface are similar to those of other S.P.A.R.C.-based applications and are shown in Figure 1: a Menu Bar, Palette Bar, and Document Window. The Menu Bar contains standard (File, Edit) menu items, specific menus (View, Commands, Preferences) used to support TRANSPORT, and a special menu (Trajectories) that supports new ray tracing modules built in to the GUI that do not use TRANSPORT. The ray tracing modules were developed for a cross-platform educational version of the software that is described elsewhere [6]. The Document Window and Palette Bar are the primary interface components for setting up a beamline. An example of a TRANSPORT beamline appears on the lower part (Model Space Pane) of the Document Window in Figure 1. To build a beamline, transport elements are selected from the Palette Bar and dragged to the Model Space Pane of the Document Window. The Palette Bar contains icons representing all of the transport components and other elements available in TRANSPORT.

Data Input

Parameters are input using Data Tables. The Global Parameter Pane shown in Figure 1 illustrates the basic Data Table which contains five fields for each parameter: the parameter name, a value input box, the units of the parameter, and two user guidance limits for the parameter value. The guidance limits can incorporate expert system type rules-of-thumb [2,3] to assist the user in setting up problems. All guidance limits are soft, so that any value can be entered and it will be passed to TRANSPORT. The limits serve only to provide users with a visual alert if an entered value may have impractical consequences.

Users may select different options for the units of a parameter via pop-up menus in the units field. The guidance limits, as well as the current value, are immediately displayed in the selected units. The Global Parameters include all of the top level beam parameters, the particle charge and mass, the initial beam energy, etc. Only some of the Global Parameters are used for TRANSPORT calculations while others, such as the beam current, are used by the ray tracing modules [6].

Data input for individual components ("Pieces") of the beamline is accomplished using Data Tables in Piece Windows. A Piece Window is accessed by "double clicking" the mouse button while the cursor is on the desired beamline component. The Piece Windows developed for the TRANSPORT GUI have several enhancements that distinguish them from those used in previous S.P.A.R.C.-based applications. Figure 2 illustrates an example of a new Piece Window.

One of the new features of the enhanced Piece Windows is the ability to use different sets of parameters to describe a beamline element. For the bend element illustrated in Figure 2, there are five different ways of defining the dipole strength of the bending magnet. The selection of input options shown in Figure 2 is based upon the different ways that a magnetic bend can be specified in a TRANSPORT input file, although other options could also be included in the Piece Window. When the user selects one of the dipole strength options, the value input boxes for the parameters associated with that selection become active (can be edited), while other (dependent) parameter values are presented in a display-only mode (cannot be edited). The S.P.A.R.C. expert rule system immediately updates all display-only parameters whenever an editable value is changed, providing users feedback on other bend parameters.

Figure 2. Example of new Piece Window, for parameter input to the magnetic bend element of TRANSPORT.

Output Displays

Graphic displays of TRANSPORT output data have traditionally been available only by using postprocessor programs with data archive files. Our GUI provides built-in plotting and graphical tools that display plots immediately after a TRANSPORT calculation. Three options are available for setting up plots using the current version of the GUI. Plots can be specified for (a) up to four matrix elements as a function of the beamline accumulated length, (b) up to four beam half-widths or centroids as a function of the beamline accumulated length, or (c) plots of the transverse (horizontal and vertical) phase space ellipses at the location of the Final Piece in the beamline. Figure 3 shows an example of the phase space ellipse plots.

Figure 3. Example of Final Ellipse Plots.

Once a graph such as that shown in Figure 3 has been generated, several support functions are available to the user for further analysis of the data. Specific plotted points used to generate the graphs are displayed by selecting Show Points. The coordinates of any plotted point are displayed by clicking on the symbol for that point. Any region of the graph may be selected and the Zoom In button used to expand the display for that region. An unlimited number of zooms are available for any region of the graph. An increasingly detailed display of the graph data can be generated by using multiple applications of the Zoom In feature.

Other Features

The GUI for TRANSPORT includes several other advanced features to aid researchers in solving beamline design problems, and to assist students in learning about particle optics. A full compliment of GUI tools has been developed to support TRANSPORT's fitting and parameter variation capabilities [1], including the ability to define algebraic functions of input and output parameters for use as fitting constraints. The Trajectories menu contains options [6] for tracing (and displaying) the transverse beam envelopes through the beamline, including space charge, and for tracing a single ray through the beamline, incorporating the effects of the envelope space charge forces. The TURTLE [7] program can also be run directly from the interface to trace up to 10,000 rays through the beamline.

Summary

A new graphical user interface has been developed for the TRANSPORT code. The integrated TRANSPORT-GUI program provides an interactive and intuitive package for designing beamlines. Both accomplished and novice users of TRANSPORT have realized increased productivity using the GUI. The new package compliments other codes operating in the same software environment [3-5] and provides accelerator scientists with a useful new tool.

Acknowledgements

The authors are indebted to Karl Brown for useful comments on early versions of the TRANSPORT GUI. The assistance of Mark Reed and James Gillespie in developing parts of the S.P.A.R.C. interface are gratefully acknowledged. Portions of this work have been supported by the U. S. Department of Energy under SBIR grant number DE-FG03-94ER81767.

References

[1] D. C. Carey, K. L. Brown and F. Rothacker, "Third-Order TRANSPORT - A Computer Program for Designing Charged Particle Beam Transport Systems," Stanford Linear Accelerator Center Report No. SLAC-R-95-462, 295 pages (1995).

[2] G. H. Gillespie, "The Shell for Particle Accelerated Related Codes (SPARC) - A Unique Graphical User Interface," AIP Conference Proceedings 297, 576-583 (1993).

[3] G. H. Gillespie and B. W. Hill, "A Graphical User Interface for TRACE 3-D Incorporating Some Expert System Type Features," 1992 Linear Accelerator Conference Proceedings (Ottawa), AECL-10728, 787-789 (1992).

[4] G. H. Gillespie and B. W. Hill, "An Interactive Graphical User Interface for the Linac Beam Dynamics Code PARMILA," Proceedings of the 1994 International Linac Conference (Tsukuba) 2, 517-519 (1994).

[5] C. C. Paulson, A. M. M. Todd, M. A. Peacock, M. F. Reusch, D. Bruhwiler, S. L. Mendelsohn, D. Berwald, C. Piaszczyk, T. Meyers, G. H. Gillespie, B. W. Hill and R. A. Jameson, "Accelerator Systems Optimizing Code," Proc. 1995 Particle Accelerator Conference,Vol.2, 1164-1166 (1995).

[6] G. H. Gillespie, B. W. Hill, N. A. Brown, R. C. Babcock, H. Martono and D. C. Carey, "The Particle Beam Optics Interactive Computer Laboratory," to be published in the proceedings of the Computational Accelerator Physics Conference, to be held 23-27 September in Williamsburg, Virginia (1996).

[7] D. C. Carey, "TURTLE (Trace Unlimited Rays Through Lumped Elements) A Computer Program for Simulating Charged Particle Beam Transport Systems," Fermi National Accelerator Laboratory Report No. NAL-64, 45 pages (1978).