types module

Define some types to clarify inputs and ouptuts.

Pos1D

Describes a 1D position.

Pos2D

Describes a 2D position.

alias of tuple[float, float]

Pos3D

Describes a 3D position.

alias of tuple[float, float, float]

PosAnyDim = float | tuple[float, float] | tuple[float, float, float]

Describes a generic position, in any number of dimensions.

FieldFuncComponent

Takes in a position, returns the field spatial component at this position.

alias of Callable[[float | tuple[float, float] | tuple[float, float, float]], float]

FieldFuncComponent1D

Takes in a 1D position, returns the field spatial component at this position.

alias of Callable[[float], float]

FieldFuncTimedComponent

Takes in a position and a phase, returns the field component at this phase and position.

alias of Callable[[float | tuple[float, float] | tuple[float, float, float], float], float]

FieldFuncTimedComponent1D

Takes in a 1D position and a phase, returns the field component at this phase and position.

alias of Callable[[float, float], float]

FieldFuncComplexTimedComponent

Takes in a position and a phase, returns the complex field component at this phase and position.

alias of Callable[[float | tuple[float, float] | tuple[float, float, float], float], complex]

FieldFuncComplexTimedComponent1D

Takes in a 1D position and a phase, returns the complex field component at this phase and position.

alias of Callable[[float, float], complex]