solprop.translate.planar#
Translate the hybrid planar grid into the kernel schema 15 "slab" seam.
The hybrid planar transform expands the field in the slab modes of one gap in x and a raw DFT in y,
E(x, y, t) = sum_p V_p(x) A_p(y, t),
so the state’s columns are (p, k_y) with the mode index fastest. It is the
Cartesian "free" kind with its x FFT replaced by the slab rule’s modal synthesis
and projection, and k_x**2 replaced by each mode’s complex, frequency-dependent
transverse square kappa_p(omega)**2: the longitudinal wave number of a column is
k_z = sqrt(k**2 eps_co - kappa_p**2 - k_y**2),
exact (non-paraxial) in y, with the free-space evanescent model and prefactor
-i omega**2 / (2 eps0 c**2 Re k_z) per column. Constant media and a constant gap
only: both are refused by name upstream, and the operator here is frozen along z.
The kernel formula, the kappa_sq leaf and the geometry are
docs/dev/kernel-contract.md sections 3 and 4; the physics is
docs/guide/waveguides/planar.md, “Resolving y”.
Functions
|
Return each slab channel's transverse wave-number square |
|
Keep the planar operator in separable form, with each channel's wall term. |
|
Freeze the slab synthesis and projection in x and the y FFT layout. |
|
Return the exact residuals of an axis's rounded squares. |
- solprop.translate.planar.planar_kappa(space, dispersion)[source]#
Return each slab channel’s transverse wave-number square
kappa_p**2.kappa_p**2 = k**2 eps_co - beta_p**2is formed from the mode’s own complex index as(omega/c)**2 (n_co - n_p)(n_co + n_p), whose difference factor is exact for indices this close.- Parameters:
- spacesolprop.modes.slab.PlanarGrid
Slab channels and the y axis.
- dispersionsolprop.spatial.SpatialDispersion
The fill as a bulk medium and the temporal grid.
- Returns:
- numpy.ndarray
Complex squares in m^-2, shape
(n_p, n_omega), zero at inactive bins.
- solprop.translate.planar.planar_operators(space, dispersion, *, n_pol, z_max, absorber=None, margin=0.05)[source]#
Keep the planar operator in separable form, with each channel’s wall term.
The material square
k**2 eps_coandk_y**2are split into a rounded value and an exact residual as in the Cartesian operator; each channel’skappa_p**2 = k**2 eps_co - beta_p**2is formed from the mode’s own complex index as(omega/c)**2 (n_co - n_p)(n_co + n_p), whose difference factor is exact for indices this close, so the column square atk_y = 0reproducesbeta_p**2to a few rounding units ofkappa_p**2. The frame is the first channel’s atk_y = 0, as the modal route’s, so a field uniform in y propagates exactly as the slab set does throughprop_waveguide.- Parameters:
- spacesolprop.modes.slab.PlanarGrid
Slab channels and the y axis.
- dispersionsolprop.spatial.SpatialDispersion
The fill as a bulk medium, the temporal grid and the frame.
- n_polint
State polarisation count; must be 1.
- z_maxfloat
Positive propagation length in m.
- absorbersolprop.boundaries.Absorber or None, optional
Shared spectral absorption rate in m^-1.
- marginfloat, optional
Relative extension of the valid interval, nonnegative.
- Returns:
- tuple
Linear operator and the same separable record for the nonlinear prefactor.
- Raises:
- TranslationError
If the medium varies along z or is not the modes’ own fill, the state has two components or the interval is invalid.
- Warns:
- solprop.exceptions.GrazingIncidenceWarning
If an active column lies within the arithmetic uncertainty of its cutoff.
- solprop.translate.planar.planar_transform(space, time, *, n_pol, z_max, absorber=None, node_budget=1073741824, margin=0.05)[source]#
Freeze the slab synthesis and projection in x and the y FFT layout.
- Parameters:
- spacesolprop.modes.slab.PlanarGrid
Slab modes and rule in x, periodic y axis and its collar.
- timesolprop.grid.TimeGrid
Temporal grid: the pad scale folded into the synthesis, and the physical-node buffer size.
- n_polint
State polarisation count; must be 1.
- z_maxfloat
Positive run length in m.
- absorbersolprop.boundaries.Absorber or None, optional
Spatial absorption reference length; None disables the in-stage y collar.
- node_budgetint, optional
Shared node-buffer budget in bytes, positive.
- marginfloat, optional
Relative extension of diagnostic tables beyond z_max, nonnegative.
- Returns:
- solprop.translate.modal.Transform
The slab matrices in x, with the pad scale folded into the synthesis, the
"slab"geometry and a bounded physical-node chunk.
- Raises:
- TranslationError
If the state has two components, the span is invalid or one temporal column does not fit the budget.
Examples
>>> from solprop.grid import EnvelopeGrid >>> from solprop.modes import PlanarGrid, SlabMode >>> from solprop.translate.planar import planar_transform >>> grid = EnvelopeGrid.from_limits(0.1, 800e-9, (650e-9, 1000e-9), 400e-15) >>> space = PlanarGrid([SlabMode(63.5e-6, "Ar", 1.0)], 1e-3, 16) >>> transform = planar_transform(space, grid, n_pol=1, z_max=0.1) >>> transform.geometry.kind, transform.n_modes, transform.n_nodes ('slab', 16, 528)
- solprop.translate.planar.square_residuals(axis)[source]#
Return the exact residuals of an axis’s rounded squares.
- Parameters:
- axisnumpy.ndarray
Stored binary wave numbers in rad/m.
- Returns:
- numpy.ndarray
value**2in exact rational arithmetic minus its rounded float, in m^-2, one per entry, as the Cartesiankperp_sq_lowis formed.