API for ofiber package

ofiber.basics Module

Calculate simple optical fibers parameters.

See <https://ofiber.readthedocs.io> for usage examples.

Basic parameters that can be found are:

acceptance_angle(NA, n_outside=1)
critical_angle(n_core, n_clad)
cutoff_wavelength(a, NA, ell=0, q=np.inf)
numerical_aperture(n_core, n_clad)
numerical_aperture_from_Delta(n_core, Delta)
relative_refractive_index(n_core, n_clad)

If you want Δ (Delta), then use relative_refractive_index

Some are just generic Fresnel equations:

critical_angle(n_core, n_clad)
R_par(m, theta)
R_per(m, theta)
R_unpolarized(m, theta)

And finally, some apply to graded index fibers where ‘esi’ is short for ‘equivalent step index’:

esi_Delta(Delta, q):
esi_radius(a, q)
esi_V_parameter(V, q):
numerical_aperture_graded_index(n_core, n_clad, q, r_over_a)

Functions

acceptance_angle(NA[, n_outside])

Find the acceptance angle for a cone of light in/out of an optical fiber.

critical_angle(n_core, n_clad)

Calculate the angle (from the normal) for total internal reflection.

cutoff_wavelength(a, NA[, ell, q])

Calculate the cutoff wavelength for an optical fiber.

esi_Delta(Delta, q)

Calculate equivalent step index (esi) Delta for a graded-index fiber.

esi_radius(a, q)

Calculate equivalent step index (esi) radius for a graded-index fiber.

esi_V_parameter(V, q)

Calculate equivalent step index (esi) V for a graded-index fiber.

numerical_aperture(n_core, n_clad)

Calculate the numerical aperture of an optical fiber.

numerical_aperture_graded_index(n_core, ...)

Calculate the numerical aperture of a graded-index optical fiber.

relative_refractive_index(n_core, n_clad)

Calculate the relative refractive index (Delta) for an optical fiber.

numerical_aperture_from_Delta(n_core, Delta)

Calculate the numerical aperture of an optical fiber.

R_par(m, theta)

Calculate the Fresnel reflection for parallel polarized light.

R_per(m, theta)

Calculate the Fresnel reflection for perpendicular polarized light.

R_unpolarized(m, theta)

Calculate the Fresnel reflection for unpolarized incident light.

V_parameter(a, NA, lambda0)

Calculate the V-parameter for an optical fiber.

ofiber.cylinder_step Module

Useful routines for step-index cylindrical waveguides.

See <https://ofiber.readthedocs.io> for usage examples.

Based on chapter 8 of A. Ghatak, K. Thyagarajan, An Introduction to Fiber Optics, Cambridge University Press, 1998

Functions to calculate and plot modes for step index fibers. Specifically:

LP_mode_value(V, ell, em)
LP_mode_values(V, ell)
LP_core_irradiance(V, b, ell)
LP_clad_irradiance(V, b, ell)
LP_total_irradiance(V, b, ell)
LP_radial_field(V, b, ell, r_over_a)
LP_radial_irradiance(V, b, ell, r_over_a)
gaussian_envelope_Omega(V)
gaussian_radial_irradiance(V, r_over_a)
plot_LP_modes(V, ell)

Functions to estimate losses:

angular_misalignment_loss_db(n, w, theta, lambda0)
bending_loss_db(n1, Delta, a, Rc, lambda0)
longitudinal_misalignment_loss_db(n1, w, D, lambda0)
transverse_misalignment_loss_db(w1, w2, u)

Functions to find equivalent core diameters:

MFR(V)
MFD(V)
PetermannW(V)
PetermannW_Approx(V)

And finally, a couple of routines to help with waveguide dispersion calculations:

V_d2bV_by_V(V, ell)
V_d2bV_by_V_Approx(V, ell)

Functions

LP_mode_value(V, ell, em)

Calculate guided b for mode (ell,em) in a circular step-index fiber.

LP_mode_values(V, ell)

Calculate all guided b for mode ell in a circular step-index fiber.

plot_LP_modes(V, ell)

Produce a plot show possible eigenvalue solutions for step index fiber.

LP_core_irradiance(V, b, ell)

Calculate the core irradiance for a step-index fiber.

LP_clad_irradiance(V, b, ell)

Calculate the cladding irradiance for a step-index fiber.

LP_total_irradiance(V, b, ell)

Calculate the total irradiance for a step-index fiber.

LP_radial_field(V, b, ell, r_over_a)

Calculate the normalized field in a step-index fiber.

LP_radial_irradiance(V, b, ell, r_over_a)

Calculate the normalized irradiance in a step-index fiber.

gaussian_envelope_Omega(V)

Calculate the normalized irradiance in a step-index fiber.

gaussian_radial_irradiance(V, r_over_a)

Calculate the normalized irradiance in a step-index fiber.

transverse_misalignment_loss_db(w1, w2, u)

Calculate the loss due to transverse fiber misalignment.

angular_misalignment_loss_db(n, w, theta, ...)

Calculate the loss due to angular fiber misalignment.

longitudinal_misalignment_loss_db(n1, w, D, ...)

Calculate the loss due to longitudinal fiber misalignment.

bending_loss_db(n1, Delta, a, Rc, lambda0)

Calculate the bending loss in dB/m.

MFR(V)

Approximate the mode field radius for a step-index single mode fiber.

MFD(V)

Approximate the mode field diameter for a step-index single mode fiber.

PetermannW(V)

Calculate the Petermann-2 radius for a step-index fiber.

PetermannW_Approx(V)

Approximate the Petermann-2 radius for a step-index fiber.

V_d2bV_by_V(V, ell)

Calculate V*d^2(bV)/dV^2 for mode ell of a step-index fiber.

V_d2bV_by_V_Approx(V)

Approximate V*d^2(bV)/dV^2 for single mode fiber.

ofiber.dispersion Module

Useful routines for dispersion in cylindrical waveguides.

See <https://ofiber.readthedocs.io> for usage examples.

Based on chapter 10 of A. Ghatak, K. Thyagarajan, An Introduction to Fiber Optics, Cambridge University Press, 1998

Functions

Material_Dispersion(core, λ)

Calculate the material dispersion using Sellmeier coefficients.

Waveguide_Dispersion(n_core, n_clad, r_core, λ)

Calculate the waveguide dispersion of a fiber.

Dispersion(core, n_clad, r_core, λ[, q, approx])

Calculate the material and waveguide dispersion.

ofiber.graded_index Module

Useful basic routines for graded-index optical fibers.

See <https://ofiber.readthedocs.io> for usage examples.

This needs more testing.

Functions

power_law_profile(n_core, nclad, q, a, x)

Calculate the index of refraction at a particular radius.

first_derivative(x, f)

Return the first derivative of the array f w.r.t.

curvature(n_core, nclad, q, a, x, theta)

Return the curvature at a position x on the fiber profile.

transverse_location(n1, theta1, Delta, a, z)

Equation 4.13 from Ghatak.

ofiber.noise Module

Useful routines for noise in optical communications.

See <https://ofiber.readthedocs.io> for usage examples.

Based on chapter 13 of A. Ghatak, K. Thyagarajan, An Introduction to Fiber Optics, Cambridge University Press, 1998

Functions

shot_noise(I0, Idark, bandwidth[, M, x])

Return the noise current associated with shot/poisson noise.

thermal_noise(T, Rload, bandwidth)

Return the noise current associated with thermal processes.

NEP(Responsivity, Rload, Idark, T)

Return noise equivalent power.

best_APD_gain(I0, Rload, Idark, x, T)

Return best gain for an avalanche photodiode.

BER_at_SNR(snr)

Return the bit error rate for a particular signal-to-noise ratio.

SNR_at_BER(ber)

Return the necessary signal-to-noise ratio to achieve specified BER.

thermal_min_power(bitrate, responsivity, ...)

Return the minimum optical power needed to achieve a signal-to-noise of 1.

quantum_min_power(bitrate, ber, lambda0)

Return the minimum optical power needed to achieve a bit error rate.

ofiber.planar_parabolic Module

Planar parabolic graded-index optical waveguides.

See <https://ofiber.readthedocs.io> for usage examples.

A graded-index planar waveguide is an infinite waveguide in which confinement takes place in the x-direction because of a parabolic index of refraction gradient.

Let z be the direction of light propagation through the waveguide. Let x be the direction in which the index of refraction varies, and then the y-direction is perpendicular to both x and z. The index of refraction n(x) is given by:

n(x)**2 = n_1**2 * ( 1 - 2*Δ*(x/a)**2 )

where n_1 is the index of refraction in the center of the waveguide (x=0) and Δ is the usual relative refractive index. In this case there are not cladding layers, and instead, the light is guided by the refractive index variation.

Based on section 7.9 of Ghatak and Thyagarajan, An Introduction to Fiber Optics, Cambridge University Press, 1998.

Functions

parabolic_propagation_constant(m, lambda0, ...)

Calculate the waveguide propagation constant beta.

parabolic_propagation_constants(lambda0, n1, ...)

Return all the betas for a parabolic planar waveguide.

TE_planar_parabolic_field(m, lambda0, n1, ...)

Calculate the transverse electric field E_y(x) for mode m.

ofiber.planar_step Module

Useful routines for step-index planar waveguides.

See <https://ofiber.readthedocs.io> for usage examples.

A step-index planar waveguide is a flat waveguide that consists of three layers. Let z be the direction of light propagation through the waveguide. Let x be the direction normal to the surface, and then the y-direction is parallel to the planes of the waveguide.

The top and bottom layers are semi-infinite with constant index of refraction. The middle layer has a fixed thickness and a fixed index of refraction. This waveguide is slightly simpler mathematically to solve than the cylindrical waveguide and serves as a useful preliminary model that exhibits general behaviors found in most waveguides.

The functions fall into two classes, those for transverse electric fields (TE) and those for transverse magnetic fields (TM). A transverse electric field only has an electric field in the y-direction. Similarly the TM field only has a magnetic field in the y-direction.

The transverse electric field routines are:

TE_crossing(V, mode)
TE_crossings(V)
TE_field(V, d, x, mode)
TE_mode_plot(V)
TE_propagation_constant(V, mode)

The transverse electric routines are:

TM_crossing(V, mode)
TM_crossings(V)
TM_field(V, n1, n2, d, x, mode)
TM_mode_plot(V)
TM_propagation_constant(V, mode, n1, n2)

Based on chapter 7 of Ghatak and Thyagarajan, An Introduction to Fiber Optics, Cambridge University Press, 1998.

Functions

TE_crossing(V, mode)

Return the TE eigenvalue for a planar waveguide mode.

TE_crossings(V)

Return all the TE eigenvalues for a planar waveguide.

TE_field(V, d, x, mode)

Calculate the TE field in a planar waveguide.

TE_mode_plot(V)

Plot the symmetric and asymmetric TE modes in a planar waveguide.

TE_propagation_constant(V, mode)

Calculate the propagation constants for TE modes in a planar waveguide.

TM_crossing(V, n1, n2, mode)

Return the TM eigenvalue for a planar waveguide mode.

TM_crossings(V, n1, n2)

Return all the TM eigenvalues for a planar waveguide.

TM_field(V, n1, n2, d, x, mode)

Calculate the TM field in a planar waveguide.

TM_mode_plot(V, n1, n2)

Plot the symmetric and asymmetric TM modes in a planar waveguide.

TM_propagation_constant(V, n1, n2, mode)

Calculate the propagation constants for TM modes in a planar waveguide.

ofiber.refraction Module

Useful routines for index of refraction based on Sellmeier coefficients.

See <https://ofiber.readthedocs.io> for usage examples.

Included are Sellmeier coefficients for a bunch of common glasses used in optical fibers. Functions are provided to generate the index of refraction, as well as its first and second derivatives.

Use like this::

import ofiber as of lambdas = np.linspace(1000,1700,50)*1e-9 # [m] i = of.find_glass(“SiO2”) glass = of.glass(i) n = of.n(glass,lambdas) plt.plot(lambdas*1e9, n)

Functions

d2n(glass_coef, lambda0)

Calculate the second derivative of the refractive index w.r.t.

dn(glass_coef, lambda0)

Calculate the first derivative of the refractive index w.r.t.

doped_glass(x)

Calculate Sellmeier coefficients for SiO_2 doped with GeO_2.

doped_glass_name(x)

Create a string the name describing the GeO_2 doped glass.

glass(number)

Return an array of Sellmeier coefficients for glass.

glass_name(number)

Look up the name for a specific glass number.

find_glass(name)

Look up the index of the glass with a particular name.

n(glass_coef, lambda0)

Calculate index of refraction for a glass at a wavelength.

n_group(glass_coef, lambda0)

Calculate group index of refraction at a wavelength.

n_air(lambda0[, temperature])

Calculate refractive index of air at atmospheric pressure.

ofiber Package

Calculate light propagation through optical fibers.

For full documentation see <https://ofiber.readthedocs.io>

Info about calculating simple optical fibers parameters:

help(ofiber.basics)

Info about modes and other characteristics of cylindrical fibers:

help(ofiber.cylinder_step)

Info about material and waveguide dispersion:

help(ofiber.dispersion)

Info about noise calculations relevant to optical communications:

help(ofiber.dispersion)

Info about modes in planar waveguides with step index profiles:

help(ofiber.planar_step)

Info about modes in planar waveguides with parabolic index profiles:

help(ofiber.planar_parabolic)

Info about refractive index of glasses:

help(ofiber.refraction)

Functions

BER_at_SNR(snr)

Return the bit error rate for a particular signal-to-noise ratio.

Dispersion(core, n_clad, r_core, λ[, q, approx])

Calculate the material and waveguide dispersion.

LP_clad_irradiance(V, b, ell)

Calculate the cladding irradiance for a step-index fiber.

LP_core_irradiance(V, b, ell)

Calculate the core irradiance for a step-index fiber.

LP_mode_value(V, ell, em)

Calculate guided b for mode (ell,em) in a circular step-index fiber.

LP_mode_values(V, ell)

Calculate all guided b for mode ell in a circular step-index fiber.

LP_radial_field(V, b, ell, r_over_a)

Calculate the normalized field in a step-index fiber.

LP_radial_irradiance(V, b, ell, r_over_a)

Calculate the normalized irradiance in a step-index fiber.

LP_total_irradiance(V, b, ell)

Calculate the total irradiance for a step-index fiber.

MFD(V)

Approximate the mode field diameter for a step-index single mode fiber.

MFR(V)

Approximate the mode field radius for a step-index single mode fiber.

Material_Dispersion(core, λ)

Calculate the material dispersion using Sellmeier coefficients.

NEP(Responsivity, Rload, Idark, T)

Return noise equivalent power.

PetermannW(V)

Calculate the Petermann-2 radius for a step-index fiber.

PetermannW_Approx(V)

Approximate the Petermann-2 radius for a step-index fiber.

R_par(m, theta)

Calculate the Fresnel reflection for parallel polarized light.

R_per(m, theta)

Calculate the Fresnel reflection for perpendicular polarized light.

R_unpolarized(m, theta)

Calculate the Fresnel reflection for unpolarized incident light.

SNR_at_BER(ber)

Return the necessary signal-to-noise ratio to achieve specified BER.

TE_crossing(V, mode)

Return the TE eigenvalue for a planar waveguide mode.

TE_crossings(V)

Return all the TE eigenvalues for a planar waveguide.

TE_field(V, d, x, mode)

Calculate the TE field in a planar waveguide.

TE_mode_plot(V)

Plot the symmetric and asymmetric TE modes in a planar waveguide.

TE_planar_parabolic_field(m, lambda0, n1, ...)

Calculate the transverse electric field E_y(x) for mode m.

TE_propagation_constant(V, mode)

Calculate the propagation constants for TE modes in a planar waveguide.

TM_crossing(V, n1, n2, mode)

Return the TM eigenvalue for a planar waveguide mode.

TM_crossings(V, n1, n2)

Return all the TM eigenvalues for a planar waveguide.

TM_field(V, n1, n2, d, x, mode)

Calculate the TM field in a planar waveguide.

TM_mode_plot(V, n1, n2)

Plot the symmetric and asymmetric TM modes in a planar waveguide.

TM_propagation_constant(V, n1, n2, mode)

Calculate the propagation constants for TM modes in a planar waveguide.

V_d2bV_by_V(V, ell)

Calculate V*d^2(bV)/dV^2 for mode ell of a step-index fiber.

V_d2bV_by_V_Approx(V)

Approximate V*d^2(bV)/dV^2 for single mode fiber.

V_parameter(a, NA, lambda0)

Calculate the V-parameter for an optical fiber.

Waveguide_Dispersion(n_core, n_clad, r_core, λ)

Calculate the waveguide dispersion of a fiber.

acceptance_angle(NA[, n_outside])

Find the acceptance angle for a cone of light in/out of an optical fiber.

angular_misalignment_loss_db(n, w, theta, ...)

Calculate the loss due to angular fiber misalignment.

bending_loss_db(n1, Delta, a, Rc, lambda0)

Calculate the bending loss in dB/m.

best_APD_gain(I0, Rload, Idark, x, T)

Return best gain for an avalanche photodiode.

critical_angle(n_core, n_clad)

Calculate the angle (from the normal) for total internal reflection.

curvature(n_core, nclad, q, a, x, theta)

Return the curvature at a position x on the fiber profile.

cutoff_wavelength(a, NA[, ell, q])

Calculate the cutoff wavelength for an optical fiber.

d2n(glass_coef, lambda0)

Calculate the second derivative of the refractive index w.r.t.

dn(glass_coef, lambda0)

Calculate the first derivative of the refractive index w.r.t.

doped_glass(x)

Calculate Sellmeier coefficients for SiO_2 doped with GeO_2.

doped_glass_name(x)

Create a string the name describing the GeO_2 doped glass.

esi_Delta(Delta, q)

Calculate equivalent step index (esi) Delta for a graded-index fiber.

esi_V_parameter(V, q)

Calculate equivalent step index (esi) V for a graded-index fiber.

esi_radius(a, q)

Calculate equivalent step index (esi) radius for a graded-index fiber.

find_glass(name)

Look up the index of the glass with a particular name.

first_derivative(x, f)

Return the first derivative of the array f w.r.t.

gaussian_envelope_Omega(V)

Calculate the normalized irradiance in a step-index fiber.

gaussian_radial_irradiance(V, r_over_a)

Calculate the normalized irradiance in a step-index fiber.

glass(number)

Return an array of Sellmeier coefficients for glass.

glass_name(number)

Look up the name for a specific glass number.

longitudinal_misalignment_loss_db(n1, w, D, ...)

Calculate the loss due to longitudinal fiber misalignment.

n(glass_coef, lambda0)

Calculate index of refraction for a glass at a wavelength.

n_air(lambda0[, temperature])

Calculate refractive index of air at atmospheric pressure.

n_group(glass_coef, lambda0)

Calculate group index of refraction at a wavelength.

numerical_aperture(n_core, n_clad)

Calculate the numerical aperture of an optical fiber.

numerical_aperture_from_Delta(n_core, Delta)

Calculate the numerical aperture of an optical fiber.

numerical_aperture_graded_index(n_core, ...)

Calculate the numerical aperture of a graded-index optical fiber.

parabolic_propagation_constant(m, lambda0, ...)

Calculate the waveguide propagation constant beta.

parabolic_propagation_constants(lambda0, n1, ...)

Return all the betas for a parabolic planar waveguide.

plot_LP_modes(V, ell)

Produce a plot show possible eigenvalue solutions for step index fiber.

power_law_profile(n_core, nclad, q, a, x)

Calculate the index of refraction at a particular radius.

quantum_min_power(bitrate, ber, lambda0)

Return the minimum optical power needed to achieve a bit error rate.

relative_refractive_index(n_core, n_clad)

Calculate the relative refractive index (Delta) for an optical fiber.

shot_noise(I0, Idark, bandwidth[, M, x])

Return the noise current associated with shot/poisson noise.

thermal_min_power(bitrate, responsivity, ...)

Return the minimum optical power needed to achieve a signal-to-noise of 1.

thermal_noise(T, Rload, bandwidth)

Return the noise current associated with thermal processes.

transverse_location(n1, theta1, Delta, a, z)

Equation 4.13 from Ghatak.

transverse_misalignment_loss_db(w1, w2, u)

Calculate the loss due to transverse fiber misalignment.