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, length_m, z_0=0.0)[source]

Bases: Field

Define a RF field, 1D longitudinal.

Parameters:
extensions: Collection[str] = ('.edz',)
is_implemented: bool = True
_load_fieldmap(path, **validity_check_kwargs)[source]

Load a 1D field (EDZ extension).

Parameters:

path (Path) – The path to the EDZ file to load.

Return type:

tuple[Callable[[float], float], tuple[int], int]

Returns:

  • e_z – Function that takes in z position and returns corresponding field, at null phase, for amplitude of \(1\,\mathrm{MV/m}\).

  • n_z – Number of interpolation points.

  • n_cell – Number of cell for cavities.

shift()[source]

Shift the electric field map. :rtype: None

Warning

You must ensure that for z < 0 and z > element.length_m the electric field is null. Interpolation can lead to funny results!

e_z(pos, phi, amplitude, phi_0_rel)[source]

Give longitudinal electric field value.

Parameters:
Return type:

complex

_abc_impl = <_abc._abc_data object at 0x75e5174c1980>