Fields and coordinates#
Unit-aware mode fields and integrated modal observables.
Analytical fields have an arbitrary overall amplitude. Attaching V/m and A/m expresses the solver’s electric/magnetic convention; absolute optical power requires choosing an amplitude normalization.
- radial_quantities(vectors)[source]#
Attach field units to cylindrical component containers (not positions).
- class Field(fiber, mode, limit, n_point=101)[source]#
Bases:
objectSample an optical mode over a grid with a length-valued half-width.
- Parameters:
limit (Length)
n_point (int)
- property limit#
Grid half-width in meters.
- property n_point#
Number of grid points along each axis.
- property cartesian_coordinates#
Sample positions as length-valued Cartesian coordinates.
- property cylindrical_coordinates#
Sample positions in cylindrical coordinates.
- get_components(components=('Ex', 'Ey', 'Ez', 'Hx', 'Hy', 'Hz'), phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)[source]#
Return electric and magnetic component arrays with physical units.
- Parameters:
phi (Angle)
theta (Angle)
- get_azimuthal_dependency(phi, dependency_type)[source]#
Evaluate dimensionless sine/cosine angular dependencies.
- Parameters:
phi (Angle)
dependency_type (str)
- get_integrale_square(array)[source]#
Integrate a quantity-valued squared field over the sample area.
- get_poynting_vector(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)[source]#
Return Cartesian power flux components in watts per square meter.
- Parameters:
phi (Angle)
theta (Angle)
- get_power(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)[source]#
Return integrated longitudinal power in watts.
- Parameters:
phi (Angle)
theta (Angle)
- get_confinement_factor(radius)[source]#
Return the dimensionless fraction of electric energy within radius.
- Parameters:
radius (Length)
- plot(plot_type=(), show=True, save_filename=None)[source]#
Plot selected numerical field components using the optional backend.
- Emod(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)#
Evaluate a field component at quantity-valued phase/rotation angles.
- Parameters:
phi (Angle)
theta (Angle)
- Ephi(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)#
Evaluate a field component at quantity-valued phase/rotation angles.
- Parameters:
phi (Angle)
theta (Angle)
- Epol(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)#
Evaluate a field component at quantity-valued phase/rotation angles.
- Parameters:
phi (Angle)
theta (Angle)
- Er(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)#
Evaluate a field component at quantity-valued phase/rotation angles.
- Parameters:
phi (Angle)
theta (Angle)
- Et(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)#
Evaluate a field component at quantity-valued phase/rotation angles.
- Parameters:
phi (Angle)
theta (Angle)
- Ex(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)#
Evaluate a field component at quantity-valued phase/rotation angles.
- Parameters:
phi (Angle)
theta (Angle)
- Ey(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)#
Evaluate a field component at quantity-valued phase/rotation angles.
- Parameters:
phi (Angle)
theta (Angle)
- Ez(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)#
Evaluate a field component at quantity-valued phase/rotation angles.
- Parameters:
phi (Angle)
theta (Angle)
- Hmod(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)#
Evaluate a field component at quantity-valued phase/rotation angles.
- Parameters:
phi (Angle)
theta (Angle)
- Hphi(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)#
Evaluate a field component at quantity-valued phase/rotation angles.
- Parameters:
phi (Angle)
theta (Angle)
- Hpol(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)#
Evaluate a field component at quantity-valued phase/rotation angles.
- Parameters:
phi (Angle)
theta (Angle)
- Hr(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)#
Evaluate a field component at quantity-valued phase/rotation angles.
- Parameters:
phi (Angle)
theta (Angle)
- Ht(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)#
Evaluate a field component at quantity-valued phase/rotation angles.
- Parameters:
phi (Angle)
theta (Angle)
- Hx(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)#
Evaluate a field component at quantity-valued phase/rotation angles.
- Parameters:
phi (Angle)
theta (Angle)
- Hy(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)#
Evaluate a field component at quantity-valued phase/rotation angles.
- Parameters:
phi (Angle)
theta (Angle)
- Hz(phi=<Quantity(0, 'radian')>, theta=<Quantity(0, 'radian')>)#
Evaluate a field component at quantity-valued phase/rotation angles.
- Parameters:
phi (Angle)
theta (Angle)
Length-valued Cartesian and cylindrical coordinate grids.
- class CylindricalCoordinates(rho, phi, z)[source]#
Bases:
objectCylindrical positions with length-valued rho/z and angle-valued phi.
- Parameters:
rho (Length)
phi (Angle)
z (Length)
- rho: Length#
- phi: Angle#
- z: Length#
- class CartesianCoordinates(x, y, z, is_structured=False, is_3D=False)[source]#
Bases:
objectCartesian positions with explicit length units on every axis.
- Parameters:
x (Length)
y (Length)
z (Length)
is_structured (bool)
is_3D (bool)
- x: Length#
- y: Length#
- z: Length#
- is_structured: bool = False#
- is_3D: bool = False#
- property x_boundaries#
Minimum and maximum x positions.
- property y_boundaries#
Minimum and maximum y positions.
- property dx#
Structured grid spacing along x.
- property dy#
Structured grid spacing along y.
- classmethod generate_from_square(length, center=None, n_points=100)[source]#
Generate a square grid with a length-valued side and center.
- Parameters:
length (Length)
n_points (int)