[home]

Resources


MAD-X examples

The following repositories contains many examples and tests:


MAD-X optics files

MAD-X reference optics files for CERN accelerators can be found on the accelerator optics web page.

MAD-X reference optics scenarios for LHC and HLLHC can be found on the optics repository.

Relevant links for the LHC optics files (thick magnets) are:

MAD-X reference optics files for CERN accelerators can also be found on lxplus.cern.ch (AFS) at the absolute path

  /afs/cern.ch/eng/lhc/optics

This repository contains reference optics for the AD, LEIR, PSB, PS, SPS, TIs, LHC, etc, as well as optics for other projects under development like the HL-LHC (High Luminosity LHC) and the FCC (Future Circular Collider).


MAD-X interactive command line editing

For interactive use of MAD-X, it is convenient to wrap madx into the rlwrap application (available on lxplus). This gives the line edition flexibility provided by the readline library with deletion, history and history completion of commands.

  rlwrap madx script.madx
For more information on available features, please refer to the readline user manual.

MAD syntax highlighting

Users of the Vim, Emacs, Kate and other editors can benefit from syntax highlighting (Courtesy to R. De Maria and Y. Inntjore Levinsen) by using the files provided with the MAD-X distribution in the syntax/editor subdirectories. For more informations, see the README files in these directories.


Ndiff tool

Ndiff is a tool written specifically for testing MAD-X using the black box testing approach. This tool is able to compute the differences of files with numerical contents, taking into account user-defined constraints on the numerical values. Hence, it allows to build portable tests across platforms, compilers and settings.

ndiff is distributed with MAD-X releases and can be run on lxplus.cern.ch (AFS) at the absolute path

/afs/cern.ch/user/m/mad/bin
(shortcut ~mad/bin) or by adding it to your PATH environment variable.