11 Examples

Example runs and post-processing files are available in a separate tar file. The examples are intended to demonstrate program capabilities with minimal work on the user’s part. However, they don’t pretend to cover all the capabilities.

Each demo is (typically) invoked using a command (usually a C-shell script) that can both run elegant and post-process the output. The post-processing is often handled by a lower-level script that is called from the demo script. These lower-level scripts are good models for the creation of customized scripts for user applications.

The examples are organized into a number of directories and subdirectories. In each area, the user will find a “Notebook” file (a simple ASCII file) that describes the example and how to run it.

Many examples for storage ring simulations reside in the PAR subdirectory. The PAR (Particle Accumulator Ring) is a small storage ring in the APS injector that is good for quick examples because of its size.

Here’s a helpful tip in searching the examples on UNIX/LINUX systems: suppose one wants to find an example of the frequency_map command. One can search all the elegant command files very quickly with this command:

find . -name ’*.ele’ | xargs fgrep frequency_map

Similarly, to find all examples that use CSBEND elements, one could use

find . -name ’*.lte’ | xargs fgrep -i csbend