Skip to content

anafibre.fibre

StepIndexFibre

Parameters:

Name Type Description Default
core_radius float or Quantity[m]
required
core RefractiveIndexMaterial

Core material object (highest precedence for the core side).

None
clad RefractiveIndexMaterial

Cladding material object (highest precedence for the cladding side).

None
eps_core float or callable

Core relative permittivity eps(lambda) if core is not provided.

None
eps_clad float or callable

Cladding relative permittivity eps(lambda) if clad is not provided.

None
n_core float or callable

Core refractive index n(lambda) used if neither core nor eps_core is provided.

None
n_clad float or callable

Cladding refractive index n(lambda) used if neither clad nor eps_clad is provided.

None
mu_core float or callable

Core relative permeability mu(lambda).

1.0
mu_clad float or callable

Cladding relative permeability mu(lambda).

1.0
exp_type str

Passed to RefractiveIndexMaterial.get_eps when core/clad are provided.

"exp_minus_i_omega_t"
real_eps_from_material if True, use n^2 (real). If False and k is available in
                 the database, use (n ± i k)^2 depending on exp_type.
True

Mode Constructors

Cylindrical step-index fibre model with analytical mode utilities.

The class stores core/cladding constitutive parameters and provides methods to compute dispersion roots, propagation constants, and mode objects.

HE

Construct an HE_{ell,n} mode.

Parameters:

Name Type Description Default
ell int

Azimuthal mode index (ell > 0).

required
n int

Radial index in HE/EH notation (mapped to internal odd m).

required
wl float

Wavelength in meters.

required
**kwargs

Forwarded to :class:anafibre.fields.GuidedMode.

{}

Returns:

Type Description
GuidedMode

Guided HE mode object.

EH

Construct an EH_{ell,n} mode.

Parameters:

Name Type Description Default
ell int

Azimuthal mode index (ell > 0).

required
n int

Radial index in HE/EH notation (mapped to internal even m).

required
wl float

Wavelength in meters.

required
**kwargs

Forwarded to :class:anafibre.fields.GuidedMode.

{}

Returns:

Type Description
GuidedMode

Guided EH mode object.

TE

Construct a TE_{0,n} mode.

Parameters:

Name Type Description Default
n int

Radial mode index.

required
wl float

Wavelength in meters.

required
**kwargs

Forwarded to :class:anafibre.fields.GuidedMode.

{}

Returns:

Type Description
GuidedMode

Guided TE mode object.

TM

Construct a TM_{0,n} mode.

Parameters:

Name Type Description Default
n int

Radial mode index.

required
wl float

Wavelength in meters.

required
**kwargs

Forwarded to :class:anafibre.fields.GuidedMode.

{}

Returns:

Type Description
GuidedMode

Guided TM mode object.

Material And Profile

Cylindrical step-index fibre model with analytical mode utilities.

The class stores core/cladding constitutive parameters and provides methods to compute dispersion roots, propagation constants, and mode objects.

n_core

Return core refractive index at a wavelength.

Parameters:

Name Type Description Default
wl float | array - like

Wavelength in meters.

required

Returns:

Type Description
float | complex | ndarray

Core refractive index.

n_clad

Return cladding refractive index at a wavelength.

Parameters:

Name Type Description Default
wl float | array - like

Wavelength in meters.

required

Returns:

Type Description
float | complex | ndarray

Cladding refractive index.

eps

Return radial relative permittivity profile.

Parameters:

Name Type Description Default
r float | array - like

Radial coordinate in meters.

required
wl float | array - like

Wavelength in meters.

required

Returns:

Type Description
float | complex | ndarray

Piecewise eps_core inside the core and eps_clad outside.

mu

Return radial relative permeability profile.

Parameters:

Name Type Description Default
r float | array - like

Radial coordinate in meters.

required
wl float | array - like

Wavelength in meters.

required

Returns:

Type Description
float | complex | ndarray

Piecewise mu_core inside the core and mu_clad outside.

n

Return radial refractive index profile.

Parameters:

Name Type Description Default
r float | array - like

Radial coordinate in meters.

required
wl float | array - like

Wavelength in meters.

required

Returns:

Type Description
float | complex | ndarray

Refractive index profile sqrt(eps * mu).

Dispersion And Propagation

Cylindrical step-index fibre model with analytical mode utilities.

The class stores core/cladding constitutive parameters and provides methods to compute dispersion roots, propagation constants, and mode objects.

V

Compute normalised frequency parameter V.

Parameters:

Name Type Description Default
wl float | array - like

Wavelength in meters.

required

Returns:

Type Description
float | ndarray

normalised frequency V = k0 a sqrt(n_core^2 - n_clad^2).

Notes

This corresponds to the paper definition \(V=k_0\rho_0\sqrt{n_1^2-n_2^2}\), where \(\rho_0\) is the core radius.

wl_of_V

Invert V(lambda) to obtain wavelength. This function does not work well for V<~0.5 when the indices are wavelength-dependent, so use with caution in that regime.

Parameters:

Name Type Description Default
V float | array - like

Target normalised frequency value(s).

required
wl_bracket tuple[float, float] | None

Search interval in meters used when material properties are wavelength-dependent. If None, attempts to use the overlap of core/clad material validity ranges and falls back to (2e-7, 5e-6).

None
rtol float

Relative tolerance for scalar root solving.

1e-12
maxiter int

Maximum iterations for scalar root solving.

100
_grid_pts int

Number of logarithmic sampling points used to bracket roots.

64

Returns:

Type Description
float | ndarray

Wavelength in meters. V == 0 maps to np.inf.

Raises:

Type Description
ValueError

If the bracket is invalid or no wavelength in the bracket reaches a target V.

Notes

Solves the implicit equation \(V(\lambda)=\frac{2\pi a}{\lambda}\sqrt{n_\mathrm{core}(\lambda)^2-n_\mathrm{clad}(\lambda)^2}\). For constant material parameters, the closed-form inverse is used.

Phi

Return :math:\Phi_\ell^\alpha for the fibre dispersion model.

Parameters:

Name Type Description Default
ell int

Azimuthal mode index.

required
b float | complex | array - like

normalised propagation constant candidate(s).

required
V float | array - like

normalised frequency. Provide either V or wl.

None
wl float | array - like

Wavelength in meters. Used when V is not provided.

None
alpha sequence

Length-2 sequence [alpha1, alpha2] for core/cladding parameters. Each entry may be a scalar, array, or callable f(wl).

None

Returns:

Type Description
float | complex | ndarray

Value(s) of :math:\Phi_\ell^\alpha.

F

Return the dispersion function F(b, V) or F(b, wavelength) for given mode.

Parameters:

Name Type Description Default
ell int

Azimuthal mode number.

required
b float or array - like

normalised propagation constant.

required
V float

normalised frequency.

None
wl float

Wavelength (used if V not given).

None
mode_type str

For ell=0, specify 'TE' or 'TM'.

None

Returns:

Type Description
float or ndarray

Value of the dispersion equation F(b, V).

Notes

This is the API-level wrapper of :func:anafibre.dispersion.F_dispersion, corresponding to the regularized scalar dispersion function used for robust root-finding in the paper.

b

Return normalised propagation constant b for a guided mode.

Parameters:

Name Type Description Default
ell int

Azimuthal mode index.

required
m int

Radial mode index (1-based).

required
V float | array - like

normalised frequency values.

None
wl float | array - like

Wavelength values in meters.

None
mode_type (TE, TM, None)

Mode family selector for ell == 0.

"TE"
N_b int

Number of samples used for root bracketing.

2000
tol float

Real root-finder tolerance.

1e-15
complex_tol float

Complex root acceptance tolerance.

1e-8
maxiter int

Maximum iterations for complex root refinement.

100

Returns:

Type Description
float | complex | ndarray

Guided root(s) b.

Notes

\(b\) is the normalised propagation constant used in the paper: \(b=\frac{n_\mathrm{eff}^2-n_2^2}{n_1^2-n_2^2}\), constrained to \([0,1]\) for guided modes in lossless conditions.

neff

Return effective index for a selected guided mode.

Parameters:

Name Type Description Default
ell int

Azimuthal and radial mode indices.

required
m int

Azimuthal and radial mode indices.

required
V float | array - like

normalised frequency values.

None
wl float | array - like

Wavelength values in meters.

None
mode_type (TE, TM, None)

Mode family selector for ell == 0.

"TE"
**kwargs

Forwarded to :meth:b (for example N_b, tol).

{}

Returns:

Type Description
float | complex | ndarray

Effective index n_eff.

Notes

Equivalent to composing :meth:b with \(n_\mathrm{eff}(b)=\sqrt{b\,n_1^2+(1-b)\,n_2^2}\).

kz

Return longitudinal propagation constant for a guided mode.

Parameters:

Name Type Description Default
ell int

Azimuthal and radial mode indices.

required
m int

Azimuthal and radial mode indices.

required
V float | array - like

normalised frequency values.

None
wl float | array - like

Wavelength values in meters.

None
mode_type (TE, TM, None)

Mode family selector for ell == 0.

"TE"
**kwargs

Forwarded to :meth:b (for example N_b, tol).

{}

Returns:

Type Description
float | complex | ndarray

Propagation constant k_z in rad/m.

Notes

Uses \(k_z=n_\mathrm{eff}k_0\) with \(k_0=2\pi/\lambda\).

Cylindrical step-index fibre model with analytical mode utilities.

The class stores core/cladding constitutive parameters and provides methods to compute dispersion roots, propagation constants, and mode objects.

m_max

Find the highest guided radial index m for fixed ell and wavelength.

Parameters:

Name Type Description Default
ell int

Azimuthal mode index.

required
wl float

Wavelength in meters.

required
mode_type (TE, TM, None)

Mode family selector for ell == 0.

"TE"
N_b

Root-finding controls passed to :meth:b.

2000
tol

Root-finding controls passed to :meth:b.

2000
complex_tol

Root-finding controls passed to :meth:b.

2000
maxiter

Root-finding controls passed to :meth:b.

2000

Returns:

Type Description
int

Largest guided radial index, or 0 if no guided solution exists.

ell_max

Find the highest guided azimuthal index ell for fixed radial order.

Parameters:

Name Type Description Default
wl float

Wavelength in meters.

required
m int

Radial mode index to track while increasing ell.

1
mode_type (TE, TM, None)

Mode family selector for ell == 0.

"TE"
N_b

Root-finding controls passed to :meth:b.

2000
tol

Root-finding controls passed to :meth:b.

2000
complex_tol

Root-finding controls passed to :meth:b.

2000
maxiter

Root-finding controls passed to :meth:b.

2000
ell_max_search int

Maximum ell value checked before stopping.

100

Returns:

Type Description
int

Largest guided azimuthal index found, or -1 if none exists.

list_modes_at

Enumerate all guided modes at a given wavelength.

Parameters:

Name Type Description Default
wl float

Wavelength in meters.

required

Returns:

Type Description
GuidedModeList

Guided modes sorted by decreasing n_eff.

RefractiveIndexMaterial

Wrapper around the refractiveindex database material interface.

Parameters:

Name Type Description Default
shelf str

Refractiveindex.info shelf name.

required
book str

Refractiveindex.info book name.

required
page str

Refractiveindex.info page name.

required
**ri_kwargs

Additional keyword arguments forwarded to :class:refractiveindex.refractiveindex.RefractiveIndex.

{}

from_upstream classmethod

Build wrapper from an upstream refractiveindex material instance.

get_refractive_index

Return refractive index values from the database.

Parameters:

Name Type Description Default
wl float | array - like

Wavelength in meters (or astropy quantity convertible to meters).

required

Returns:

Type Description
float | ndarray

Refractive index n.

get_extinction_coefficient

Return extinction coefficient values from the database.

Parameters:

Name Type Description Default
wl float | array - like

Wavelength in meters (or astropy quantity convertible to meters).

required

Returns:

Type Description
float | ndarray

Extinction coefficient k.

get_eps

Evaluate permittivity from database material data.

Parameters:

Name Type Description Default
wl float | array - like

Wavelength in meters (or astropy quantity convertible to meters).

required
exp_type (exp_minus_i_omega_t, exp_plus_i_omega_t)

Time-harmonic convention used for complex permittivity sign.

"exp_minus_i_omega_t"
real bool

If True, returns n^2. If False, returns (n ± i k)^2.

True

Returns:

Type Description
float | complex | ndarray

Relative permittivity.