helper module

Define functions to compute 1D longitudinal electric fields.

The ones used by Field will be in field_helpers.py from now on.

null_field_1d(pos)[source]

Define a null electric/magnetic field.

Parameters:

pos (Any)

Return type:

float

create_1d_field_func(field_values, corresponding_positions)[source]

Create the function to get spatial component of electric field.

Parameters:
Return type:

Callable[[float], float]

_evaluate_1d_field(pos, field_values, corresponding_positions)[source]

Interpolate an electric/magnetic 1D field file.

Parameters:
Return type:

float

normalized_e_1d(pos, e_func, phi, phi_0)[source]

Compute electric field, normalized.

Parameters:
Return type:

float

normalized_e_1d_complex(pos, e_func, phi, phi_0)[source]

Compute electric field, normalized.

Parameters:
Return type:

complex

e_1d(pos, e_func, phi, amplitude, phi_0)[source]

Compute normed 1D electric field.

Parameters:
Return type:

float

e_1d_complex(pos, e_func, phi, amplitude, phi_0)[source]

Compute normed 1D electric field.

Parameters:
Return type:

complex

shifted_e_spat(e_spat, z_shift, z_pos)[source]

Shift electric field by z_shift.

Parameters:
Return type:

float