field100 module
Define the rf field corresponding to FIELD_MAP 100.
This is 1D longitudinal field along z. The only one that is completely
implemented for now.
- class Field100(field_map_path: Path, length_m: float, z_0: float = 0.0)
Bases:
FieldDefine a RF field, 1D longitudinal.
- _load_fieldmap(path: Path, **validity_check_kwargs) tuple[Callable[[float], float], tuple[int], int]
Load a 1D field (
.edzextension).- Parameters:
path (pathlib.Path) – The path to the
.edzfile to load.- Returns:
e_z (Callable[[Pos1D], float]) – Function that takes in
zposition and returns corresponding field, at null phase, for amplitude of \(1\,\mathrm{MV/m}\).n_z (tuple[int]) – Number of interpolation points.
n_cell (int) – Number of cell for cavities.
- shift() None
Shift the electric field map.
Warning
You must ensure that for
z < 0andz > element.length_mthe electric field is null. Interpolation can lead to funny results!
- e_z(pos: float, phi: float, amplitude: float, phi_0_rel: float) complex
Give longitudinal electric field value.
- _abc_impl = <_abc._abc_data object at 0x7f36f968eac0>