prysm.x.fibers#

Routines for working with optical fibers.

prysm.x.fibers.critical_angle(n_core, n_clad, deg=True)#

Angle at which TIR happens in a step index fiber.

Parameters:
  • n_core (float) – core index

  • n_clad (float) – cladding index

  • deg (bool, optional) – if True, return is in degrees else radians

Returns:

TIR angle

Return type:

float

prysm.x.fibers.numerical_aperture(n_core, n_clad)#

NA of a step-index fiber.

Parameters:
  • n_core (float) – core index

  • n_clad (float) – cladding index

Returns:

numerical aperture

Return type:

float

prysm.x.fibers.V(radius, NA, wavelength)#

Compute the V number of a fiber.

Parameters:
  • radius (float) – core radius, microns

  • NA (float) – numerical aperture

  • wavelength (float) – vacuum wavelength, microns

Returns:

V-number

Return type:

float

Notes

if V is less than ~2.4048, a fiber behaves as a single mode fiber. V is a “normalized frequency” For multi-mode fibers, the number of guided modes is M ~= V^2/2

prysm.x.fibers.find_all_modes(V, count_only=False)#

Identify the modes of a step-index fiber.

Parameters:
  • V (float) – V-number (see the V function)

  • count_only (bool, optional) – If True, return per-l mode counts from cutoff theory without solving the dispersion equation.

Returns:

keys of l, values of b for each m [0, 1, …], or integer counts when count_only is True for example:

{
    0: (0.9, 0.6, 0.3)
}

would be a three-mode fiber, with no azimuthally variant modes

Return type:

dict

prysm.x.fibers.compute_LP_modes(V, mode_dict, a, r, t)#

Numerically compute Linearly Polarized mode for a step-index cylindrical fiber.

Parameters:
  • V (float) – V-number (see the V function)

  • mode_dict (dict) – the dictionary returned by find_all_modes

  • a (float) – fiber’s core radius, microns

  • r (ndarray) – radial coordinates, microns

  • t (ndarray) – azimuthal coordinates, radians

Returns:

a dict of the same “structure” as the one returned by find_all_modes, but instead of values of b, the values are ndarrays containing the spatial modes

Return type:

dict

prysm.x.fibers.smf_mode_field(V, a, b, r)#

Mode field of a single mode fiber.

Parameters:
  • V (float) – V-number (see the V function)

  • a (float) – fiber’s core radius, microns

  • b (float) – propagation constant for the mode

  • r (ndarray) – radial coordinates, microns

Returns:

the single mode of the fiber

Return type:

float

prysm.x.fibers.marcuse_mfr_from_V(V)#

Marcuse’ estimate for the mode field radius based on the V-number.

Parameters:

V (float) – V-number (see the V function)

Returns:

w/a, the ratio of mode field radius to core radius

Return type:

float

prysm.x.fibers.petermann_mfr_from_V(V)#

Petermann’s estimate for the mode field radius based on the V-number.

More accurate than Marcuse

Parameters:

V (float) – V-number (see the V function)

Returns:

w/a, the ratio of mode field radius to core radius

Return type:

float

prysm.x.fibers.mode_overlap_integral(E1, E2, E2conj=None, I1sum=None, I2sum=None)#

Compute the mode overlap integral.

..math::

eta = frac{left| int{}E_1^* E_2 right|^2}{int I_1 int I_2}

When repeatedly computing coupling of varying fields into a consistent mode, consider precomputing E2conj and I2sum and passing them as arguments to accelerate computation.

Parameters:
  • E1 (array) – complex field of mode 1

  • E2 (array) – complex field of mode 2

  • E2conj (array) – E2.conj()

  • I1sum (array, optional) – sum of the intensity of mode 1; I1 = abs(E1)**2; I1sum = I1.sum()

  • I2sum (array, optional) – sum of the intensity of mode 2; I2 = abs(E2)**2; I2sum = I2.sum()

Returns:

eta, coupling efficiency into the mode; bounded between [0,1]

Return type:

float

prysm.x.fibers.multimode_coupling(E_in, mode_fields)#

Per-LP-mode coupling efficiency from an incident field.

Parameters:
  • E_in (ndarray) – complex incident field at the fiber face, same grid as the mode fields

  • mode_fields (dict) – dict returned by compute_LP_modes; keys are azimuthal indices l (with negative l for the sine-azimuthal partners), values are lists of 2D arrays for each radial index m

Returns:

same key structure as mode_fields, values are lists of float coupling efficiencies eta_(l,m), each in [0, 1]. Summing across all returned values approximates the total guided-mode coupling.

Return type:

dict

Notes

LP modes are approximately orthonormal on a grid spanning several core radii; the (l, -l) pairs share radial shape and only differ in their cos(l*t) / sin(l*t) azimuthal factor, so each captures part of the angular content of the input.