tidy3d.components.source.base.Source

tidy3d.components.source.base.Source#

class Source[source]#

Bases: Box, AbstractSource, ABC

Abstract base class for all sources.

Parameters:
  • name (Optional[str] = None) – Optional name for the source.

  • center (Optional[tuple[Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box]]] = None) – [units = um]. Center of object in x, y, and z.

  • size (tuple[Union[NonNegativeFloat, autograd.tracer.Box], Union[NonNegativeFloat, autograd.tracer.Box], Union[NonNegativeFloat, autograd.tracer.Box]]) – [units = um]. Size in x, y, and z directions.

  • source_time (Union[GaussianPulse, ContinuousWave, CustomSourceTime, BroadbandPulse, BasebandStep, BasebandGaussianPulse, BasebandRectangularPulse, BasebandCustomSourceTime]) – Specification of the source time-dependence.

Notes

Practical Advice

Choosing a Source Type

  • ModeSource — excite a specific waveguide mode. Normalized to inject 1W at the center frequency. Place in a waveguide section with uniform cross-section (or constant bend radius). Typical: waveguides, PICs, couplers.

  • PlaneWave — uniform illumination across the full simulation cross-section. Requires periodic or Bloch boundaries in the tangential dimensions. Typical: metasurfaces, thin films, gratings.

  • TFSF — localized plane wave that can be placed inside the simulation domain with PML on all sides. Separates total-field (inside) from scattered-field (outside). Typical: nanoparticle scattering, RCS calculations.

  • GaussianBeam — focused beam with a finite waist. Typical: fiber coupling, free-space optics.

  • PointDipole — single-point current source for emission or LDOS calculations. Typical: Purcell factor, spontaneous emission.

Attributes

geometry

Box representation of source.

plot_params

Default parameters for plotting a Source object.

source_time

size

center

name

Methods

plot([x, y, z, ax])

Plot this source.

source_time#
property plot_params#

Default parameters for plotting a Source object.

property geometry#

Box representation of source.

plot(x=None, y=None, z=None, ax=None, **patch_kwargs)[source]#

Plot this source.