fdtdx.compute_eps_spectrum_from_coefficients#
- fdtdx.compute_eps_spectrum_from_coefficients(c1, c2, c3, inv_eps_inf, omegas, dt, weights=None, c4=None)[source]#
Spatially-averaged complex permittivity spectrum for a block of cells.
For each angular frequency in
omegas, evaluates the per-cell complex permittivity \(\varepsilon(\omega) = \varepsilon_\infty + \chi(\omega)\) where \(\chi\) is reconstructed from the ADE recurrence coefficients, and averages over the spatial axes (uniformly or with supplied weights).This is the broadband generalization of the single-frequency
effective_inv_permittivity()used for carrier-frequency impedance matching — callers that need a frequency-dependent impedance (e.g. for a convolution-based broadband source correction) use this to build the \(\varepsilon(\omega)\) spectrum that feedscompute_impedance_corrected_temporal_profile().- Parameters:
c1 (
Array|ndarray) – ADE coefficient array of shape(num_poles, num_components, *spatial)as stored onArrayContainer, withnum_components in (1, 3)(the material-component axis; size 3 for per-axis anisotropic dispersion). Anisotropic components are averaged, mirroring theinv_eps_infreduction.c2 (
Array|ndarray) – ADE coefficient array, same shape asc1.c3 (
Array|ndarray) – ADE coefficient array, same shape asc1.inv_eps_inf (
Array|ndarray) – Per-cell inverse of the high-frequency permittivity, shape(num_components, *spatial)withnum_components in (1, 3, 9). For anisotropic tensors (9 components) only the diagonal entries are used.omegas (
ndarray) – 1D array of angular frequencies (rad/s) to evaluate at.dt (
float) – Simulation time step (seconds) used to derive the coefficients.weights (
ndarray|None) – Optional spatial weights with the same shape as the trailing axes ofc1. IfNone, uniform averaging.
- Return type:
ndarray- Returns:
Complex numpy array of shape
(len(omegas),)— the volume-averaged \(\varepsilon(\omega)\) at each requested frequency.