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 |
None
|
eps_clad
|
float or callable
|
Cladding relative permittivity |
None
|
n_core
|
float or callable
|
Core refractive index |
None
|
n_clad
|
float or callable
|
Cladding refractive index |
None
|
mu_core
|
float or callable
|
Core relative permeability |
1.0
|
mu_clad
|
float or callable
|
Cladding relative permeability |
1.0
|
exp_type
|
str
|
Passed to |
"exp_minus_i_omega_t"
|
real_eps_from_material
|
if True, use n^2 (real). If False and k is available in
|
|
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 ( |
required |
n
|
int
|
Radial index in HE/EH notation (mapped to internal odd |
required |
wl
|
float
|
Wavelength in meters. |
required |
**kwargs
|
Forwarded to :class: |
{}
|
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 ( |
required |
n
|
int
|
Radial index in HE/EH notation (mapped to internal even |
required |
wl
|
float
|
Wavelength in meters. |
required |
**kwargs
|
Forwarded to :class: |
{}
|
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: |
{}
|
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: |
{}
|
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 |
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 |
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 |
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 |
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
|
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. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the bracket is invalid or no wavelength in the bracket reaches a target |
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 |
None
|
wl
|
float | array - like
|
Wavelength in meters. Used when |
None
|
alpha
|
sequence
|
Length-2 sequence |
None
|
Returns:
| Type | Description |
|---|---|
float | complex | ndarray
|
Value(s) of :math: |
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 |
"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) |
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 |
"TE"
|
**kwargs
|
Forwarded to :meth: |
{}
|
Returns:
| Type | Description |
|---|---|
float | complex | ndarray
|
Effective index |
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 |
"TE"
|
**kwargs
|
Forwarded to :meth: |
{}
|
Returns:
| Type | Description |
|---|---|
float | complex | ndarray
|
Propagation constant |
Notes
Uses \(k_z=n_\mathrm{eff}k_0\) with \(k_0=2\pi/\lambda\).
Modal Diagnostics¶
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 |
"TE"
|
N_b
|
Root-finding controls passed to :meth: |
2000
|
|
tol
|
Root-finding controls passed to :meth: |
2000
|
|
complex_tol
|
Root-finding controls passed to :meth: |
2000
|
|
maxiter
|
Root-finding controls passed to :meth: |
2000
|
Returns:
| Type | Description |
|---|---|
int
|
Largest guided radial index, or |
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 |
1
|
mode_type
|
(TE, TM, None)
|
Mode family selector for |
"TE"
|
N_b
|
Root-finding controls passed to :meth: |
2000
|
|
tol
|
Root-finding controls passed to :meth: |
2000
|
|
complex_tol
|
Root-finding controls passed to :meth: |
2000
|
|
maxiter
|
Root-finding controls passed to :meth: |
2000
|
|
ell_max_search
|
int
|
Maximum |
100
|
Returns:
| Type | Description |
|---|---|
int
|
Largest guided azimuthal index found, or |
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 |
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: |
{}
|
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 |
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 |
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:
| Type | Description |
|---|---|
float | complex | ndarray
|
Relative permittivity. |