Skip to content

SPECTRA-RCWA 1.3.0

Choose a tag to compare

@hyoseokp hyoseokp released this 23 Nov 14:11
· 11 commits to main since this release

Changed

  • 1D gratings (one of fourier_orders 0) build the in-plane permittivity matrices by Li's inverse rule. TM efficiencies of a lamellar grating now converge like the TE ones: within 1e-4 at 20 orders, where the Laurent rule still moved by 3e-4 between 80 and 160 orders.
  • Crossed gratings keep the Laurent rule by default, so their results do not change. SolverConfig(factorization=...) picks "auto" (default), "li" (Li's rules also for crossed gratings) or "laurent" (the 1.2.0 behaviour).
  • The adjoint gradient handles E_xx != E_yy (checked against autograd to 5e-15 and finite differences to 3e-10; complex64 on CUDA within 2e-6 of complex128).

Fixed

  • ColorRouterForward(device=None) picked CUDA in complex64 with torch older than 2.8, which cannot compile the kernels; it now falls back to the CPU there.

pip install -U spectra-rcwa