gds_fdtd.plotting

gds_fdtd simulation toolbox.

Plotting helpers for the canonical SMatrix. matplotlib is imported lazily so headless / minimal installs never pay for it.

Functions

component_outlines(component[, axis, buffer])

Device-geometry outlines for overlay on a field plot (see plot_field).

plot_component(component[, spec, ax, savefig])

Standard geometry view: device polygons, ports, bounds, simulation region.

plot_field(mag2[, x, y, ax, scale, ...])

Plot a 2-D field-intensity map (|E|²) in linear or dB scale.

plot_mode(mode[, field, ax, savefig])

Plot a waveguide mode's transverse field on its cross-section.

plot_monitor_planes(solver[, savefig])

Show where a solver's field-monitor planes sit in the simulation domain.

plot_permittivity(component[, dx, ...])

Cross-section of the rasterized refractive-index (√ε) the solver sees.

plot_smatrix(sm[, kind, ax, paths])

Plot S-matrix paths versus wavelength.

plot_tech_stack(tech[, wavelength_um, ax, ...])

Vertical cross-section of the technology's layer stack.

port_plane_outlines(component, spec[, axis])

Port mode-plane cross-sections for field-map overlays.

rdbu_colors(n)

n distinguishable colors sampled from RdBu, skipping the pale center.

smatrix_summary(sm[, wavelength_um, atol])

Human-readable figures of merit for an SMatrix at one wavelength.