fibermodes.mode¶
Fiber mode representations, and utility functions.
Classes
Family |
Constants for identifying mode family. |
Mode |
Fiber mode representation. |
Module details
-
class
fibermodes.mode.Family¶ Bases:
enum.EnumConstants for identifying mode family. Can be LP, HE, EH, TE, or TM.
-
EH= 3¶
-
HE= 2¶
-
LP= 1¶
-
TE= 4¶
-
TM= 5¶
-
-
fibermodes.mode.HE11= Mode('HE',1,1)¶ Predefined HE(1,1) mode
-
fibermodes.mode.LP01= Mode('LP',0,1)¶ Predefined LP(0,1) mode
-
class
fibermodes.mode.Mode[source]¶ Bases:
fibermodes.mode.ModeFiber mode representation.
The fiber mode consists of a mode family, and two mode parameters (ν and m). If is derived from namedtuple. Therefore, it is unmutable, and it can be used as dictionary key.
-
nu¶ ν parameter of the mode. It often corresponds to the parameter of the radial Bessel functions.
-
m¶ (positive integer) Radial order of the mode. It corresponds to the number of concentric rings in the mode fields.
-
color(nn=5, nm=3, asint=True)[source]¶ Return color (r, g, b) as function of mode.
LP, HE modes are blue, EH modes are red, TE modes are green, TM modes are yellow. For TE and TM modes, m parameter varies hue and value. For LP, HE, and EH modes, nu parameter varies hue, and m parameter varies saturation.
Parameters: Returns: (r, g, b) tuple (0 .. 255)
-