Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
4d5d9b7
docs: introduce pyAML, its structure and the configuration rule
GamelinAl Sep 23, 2026
5e458d3
Edit
GamelinAl Sep 23, 2026
518565e
Edit 2
GamelinAl Sep 23, 2026
a27c994
Separate glossary
GamelinAl Sep 24, 2026
1522d34
Made the link to what is pyAML more visible by adding a tip.
TeresiaOlsson Sep 24, 2026
a81249a
Updated the description of pyAML to include that it is more than a si…
TeresiaOlsson Sep 24, 2026
a2d92ff
Updated why a middle layer part to better explain what a middle layer…
TeresiaOlsson Sep 24, 2026
1feac74
Remove space.
TeresiaOlsson Sep 24, 2026
069e6f2
Add that the test lattice is also used for integration tests.
TeresiaOlsson Sep 24, 2026
69042be
Change that all measurements behave in the same way to similar way.
TeresiaOlsson Sep 24, 2026
545f263
Merge pull request #44 from python-accelerator-middle-layer/docs/pyam…
TeresiaOlsson Sep 24, 2026
8e1120d
Merge pull request #43 from python-accelerator-middle-layer/docs/what…
TeresiaOlsson Sep 24, 2026
e928326
Merge pull request #45 from python-accelerator-middle-layer/docs/cont…
TeresiaOlsson Sep 24, 2026
1db6e25
Mark pyAT as a name as for other names.
TeresiaOlsson Sep 24, 2026
79efc5d
Added a tip to highlight that using the dynamic catalog is the recomm…
TeresiaOlsson Sep 24, 2026
f541530
Merge pull request #46 from python-accelerator-middle-layer/docs/glos…
GamelinAl Sep 24, 2026
8a31ec6
List classes for static catalog in tango-pyaml as a list.
TeresiaOlsson Sep 24, 2026
8ac91ca
Specify that each field is the name of the field in the constructor a…
TeresiaOlsson Sep 24, 2026
d230d26
Remove the grid since it required scrolling to be able to see both se…
TeresiaOlsson Sep 24, 2026
f80e3b6
Removed unknown fields are rejected since this is only true if valida…
TeresiaOlsson Sep 24, 2026
fda240a
Changed link for API documentation to the page with links for all pac…
TeresiaOlsson Sep 24, 2026
60194c2
Add JSON schema and link to tools to list of option to find fields.
TeresiaOlsson Sep 24, 2026
9d1b0bb
Updated info and config examples for the dynamic catalog.
TeresiaOlsson Sep 24, 2026
d118c89
Move glossary to main menu.
TeresiaOlsson Sep 24, 2026
375f908
Remove section about finding the fields to move it to the how-to guid…
TeresiaOlsson Sep 24, 2026
a1cc723
Merge info in configuration item into previous section.
TeresiaOlsson Sep 24, 2026
8387d09
Remove glossary from explanations index.
TeresiaOlsson Sep 24, 2026
61a03e8
Add tip to read the explanation page before starting.
TeresiaOlsson Sep 24, 2026
210ba64
Add some more details to the introduction.
TeresiaOlsson Sep 24, 2026
4064839
Remove in the introduction that the guide is about text file since it…
TeresiaOlsson Sep 24, 2026
f4197be
Update the rule to remember section to make it clearer how using a co…
TeresiaOlsson Sep 24, 2026
39485af
Update finding the fields section with content from moved from the co…
TeresiaOlsson Sep 24, 2026
9616c0b
Add that the configuration can be written as yaml, json or dict.
TeresiaOlsson Sep 24, 2026
33db49d
Change heading to make clear that the example is for using a text fil…
TeresiaOlsson Sep 24, 2026
bfd9280
Update the facility and machine name.
TeresiaOlsson Sep 24, 2026
0d5ad1d
Update the section about control modes since some information wrong.
TeresiaOlsson Sep 25, 2026
b6ee30a
Update full configuration to match other changes.
TeresiaOlsson Sep 25, 2026
7c9436f
Update catalog in example to match previous changes.
TeresiaOlsson Sep 25, 2026
567e341
Update text about using own classes.
TeresiaOlsson Sep 25, 2026
0e1f53f
Update section about loading the config.
TeresiaOlsson Sep 25, 2026
e87fa30
Update validation section since information in there was wrong.
TeresiaOlsson Sep 25, 2026
a49e578
Update section about tools.
TeresiaOlsson Sep 25, 2026
477fcb7
Merge pull request #49 from python-accelerator-middle-layer/docs/move…
GamelinAl Sep 25, 2026
352949f
Merge pull request #47 from python-accelerator-middle-layer/docs/catalog
GamelinAl Sep 25, 2026
86cf945
Merge pull request #48 from python-accelerator-middle-layer/docs/conf…
GamelinAl Sep 25, 2026
87ea332
Make more generic so it doesn't sound like live and design are all po…
TeresiaOlsson Oct 2, 2026
0d96f5a
Change RF plant to RF cavity since is better understood by the users.
TeresiaOlsson Oct 2, 2026
027365d
Make the explanation of the configuration more general since doesn't …
TeresiaOlsson Oct 2, 2026
25e9e83
Fix the link to the glossary since has been moved.
TeresiaOlsson Oct 2, 2026
2c688f8
Modify how the tutorials work for better reading flow.
TeresiaOlsson Oct 2, 2026
37c7e0f
Update the instructions for how run locally so not need to be updated…
TeresiaOlsson Oct 2, 2026
73f2b66
Change where to go next to not have to modify every time a new tutori…
TeresiaOlsson Oct 2, 2026
095c635
Moved test lattice explanation to separate page and reformatted conte…
TeresiaOlsson Oct 2, 2026
7d392da
Make yellow pages bold.
TeresiaOlsson Oct 2, 2026
e962ebf
Add how to try for an EPICS configuration.
TeresiaOlsson Oct 2, 2026
9109943
Change to the interface is exactly the same.
TeresiaOlsson Oct 2, 2026
2547779
Make it clearer that the names of the modes can be freely chosen and …
TeresiaOlsson Oct 2, 2026
206e687
Change name in configuration example since was wrongly changed.
TeresiaOlsson Oct 2, 2026
7c52937
Add a sentence to explain that accelerator is the name of the acceler…
TeresiaOlsson Oct 2, 2026
dde3d6f
Merge pull request #54 from python-accelerator-middle-layer/docs/cont…
GamelinAl Oct 5, 2026
c7f744e
Merge pull request #53 from python-accelerator-middle-layer/docs/insp…
GamelinAl Oct 5, 2026
c5d036c
Merge pull request #51 from python-accelerator-middle-layer/docs/intr…
GamelinAl Oct 5, 2026
15b65b7
Add a new tool pages
GamelinAl Oct 6, 2026
00ad2eb
Add back the test lattice text in the tutorial
GamelinAl Oct 6, 2026
3a934c5
Merge pull request #52 from python-accelerator-middle-layer/docs/crea…
GamelinAl Oct 6, 2026
a5f753b
Merge pull request #50 from python-accelerator-middle-layer/docs/conf…
TeresiaOlsson Oct 7, 2026
fcbc9d2
Fix broken link to glossary.
TeresiaOlsson Oct 7, 2026
95c80ce
Fix broken link to control modes.
TeresiaOlsson Oct 7, 2026
fcf8d3d
Fix broken link to catalogs.
TeresiaOlsson Oct 7, 2026
f5f79be
Merge pull request #55 from python-accelerator-middle-layer/fix-missi…
TeresiaOlsson Oct 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions docs/source/_static/fodo-cell.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions docs/source/_static/pyaml-hierarchy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@

myst_enable_extensions = [
"attrs_inline",
"deflist",
]
myst_heading_anchors = 3

sphinx_gallery_conf = {
"examples_dirs": ["../tutorials"],
Expand Down
63 changes: 63 additions & 0 deletions docs/source/explanation/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# What is pyAML?

The Python Accelerator Middle Layer (pyAML) is an ecosystem of Python packages that provides a common layer between people who operate or study particle accelerators and the different tools they need to work with, such as control systems and simulation codes. It is developed by a collaboration of accelerator facilities as a common framework for the design, commissioning, and operation of particle accelerators.

## Why a Middle Layer?

Many accelerator facilities rely on a *Middle Layer*, with the [MATLAB Middle Layer (MML)](https://github.com/atcollab/MML) being a well-known example at synchrotron light sources.

A middle layer provides a physics-oriented interface to a particle accelerator. It represents the machine in terms of familiar accelerator concepts, such as magnets, BPMs, and RF cavities, while hiding details such as control-system variables, hardware interfaces, units, and conversions from users.

The same interface can be used to interact with either the real accelerator, where values are read from and written to the control system, or a simulated accelerator, where they are obtained from and passed to a simulation code.

PyAML builds on this idea, but is implemented as a modern, Python-based, and extensible framework. Its key characteristics are:

- **Python-native**: pyAML integrates naturally with the Python scientific ecosystem and the growing number of accelerator-physics tools available in Python.

- **Modular and extensible**: Control systems, simulation codes, and physics applications are connected through well-defined interfaces, allowing new implementations to be added without changing the applications that use them.

- **Configuration-driven**: Accelerator-specific information is kept separate from application code, allowing the same software to be configured for different machines and facilities.

- **Real and virtual machines**: The same interface can be used with the real accelerator, an external digital twin, or an internal simulator, allowing physics applications to work independently of how the accelerator is represented.

## Goals

The collaboration has identified the following key features for pyAML. They are the goals of the project: some of them are already available, others are still being developed.

- An agnostic interface between an accelerator control system (TANGO, EPICS, ...), a virtual accelerator and a digital model.
- A base for developing and sharing beam measurement tools, such as orbit, trajectory, linear and non-linear optics corrections.
- The possibility to use a virtual accelerator or a digital twin, to test tuning tools in real-life conditions without the need for beam time.
- Handling of both physics and hardware units, with a flexible unit-conversion interface.
- The possibility to configure different types of accelerators: transfer lines, linear and circular accelerators, and ramped accelerators.
- Configuration and measurement data managed in a standardized manner.
- A set of standard measurement tools in a modular structure.
- Long-term maintainability, by following modern software practices.
- Easy integration of facility-specific functionality as separate packages.

## Layers of the Project

The software is organized in layers:

**Core**
: The features needed to configure a machine and communicate with the different backends: abstraction of devices (magnets, BPMs, tune monitors, ...), grouping of devices in arrays, the simulator backend based on pyAT, conversion between hardware and physics units, and the *abstract interface* to control systems. This is the `pyaml` package. The actual communication with a given control system is implemented in separate packages, the control-system bindings (`tango-pyaml`, `pyaml-cs-oa`), so that a facility only installs the ones it needs.

**Common high-level applications**
: Tools shared between facilities, built on top of the core: tune and chromaticity correction, response-matrix measurements, orbit correction, dispersion measurement, beam-based alignment, LOCO, etc.

**Facility-specific applications**
: Code developed by a single facility. If it follows the same standards as the rest of pyAML, it can be used together with the core, shared with other facilities, or later moved into the common applications.

See [pyAML Structure](architecture.md) for how these layers map to Python packages and objects.

## Guiding Principles for the Configuration

A facility adopts pyAML by writing a *configuration* describing its machine. The configuration follows these principles:

- It is **completely separated from the source code**. It describes what should be built, it does not contain code.
- It is **easy to extend**. Facility-specific devices can be added without modifying pyAML.
- It is possible to use **only a subset** of it, for example to use a single tool without configuring the whole machine.
- A facility only has to **install the packages it needs**, for example an EPICS facility does not need to install TANGO.

There is one simple rule behind the configuration: each item names a Python class, and each of its other fields is an argument of that class's constructor. See [Configuration Structure and Syntax](configuration.md).

The terms used throughout the documentation are defined in the [Glossary](../glossary.md).
Loading
Loading