tidy3d.components.source.base.Source#
- class Source[source]#
Bases:
Box,AbstractSource,ABCAbstract 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
Boxrepresentation of source.Default parameters for plotting a Source object.
sizecenternameMethods
plot([x, y, z, ax])Plot this source.
- source_time#
- property plot_params#
Default parameters for plotting a Source object.