pyaccelerator.elements.utils

Module Contents

Functions

straight_element(theta: float, d_s: float) → np.ndarray

bent_element(theta: float, d_s: float, rho: float) → np.ndarray

deserialize(dic: Dict[str, Any]) → 'BaseElement'

Deserialize a element dictionary into an element instance.

pyaccelerator.elements.utils.straight_element(theta: float, d_s: float) → np.ndarray[source]
pyaccelerator.elements.utils.bent_element(theta: float, d_s: float, rho: float) → np.ndarray[source]
pyaccelerator.elements.utils.deserialize(dic: Dict[str, Any]) → ’BaseElement’[source]

Deserialize a element dictionary into an element instance.

Parameters

dic – Element dict.

Returns

Element instance.