element#
- class ElementConfigModel(*, name, description=None, lattice_names=None)[source]#
Bases:
BaseModelBase class for element configuration.
- Parameters:
name (str) – The name of the PyAML element.
description (str, optional) – Description of the element.
lattice_names (str or None, optional) – The name(s) of the associated element(s) in the lattice. By default, the PyAML element name is used. lattice_name accept the following syntax: - list(name,[name]) : Element names - [name]@idx[,idx] : Element indices in the subset formed by name. - [name]#start_idx..end_idx : Element range in the subset formed by name. In the above syntax, if the name is not specficied, the whole set of lattice element is used for indexing.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class Element(name)[source]#
Bases:
objectClass providing access to one element of a physical or simulated lattice
- name#
str The unique name identifying the element in the configuration file
- check_peer()[source]#
Throws an exception if the element is not attacched to a simulator or to a control system
- property peer: ElementHolder#
Returns the peer simulator or control system