tidy3d.components.source.Source#
- class Source[source]#
Bases:
Box
,AbstractSource
,ABC
Abstract base class for all sources.
- Parameters:
attrs (dict = {}) โ Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields,
attrs
are mutable. For example, the following is allowed for setting anattr
obj.attrs['foo'] = bar
. Also note that Tidy3D` will raise aTypeError
ifattrs
contain objects that can not be serialized. One can check ifattrs
are serializable by callingobj.json()
.name (Optional[str] = None) โ Optional name for the source.
center (Tuple[float, float, float] = (0.0, 0.0, 0.0)) โ [units = um]. Center of object in x, y, and z.
size (Tuple[NonNegativeFloat, NonNegativeFloat, NonNegativeFloat]) โ [units = um]. Size in x, y, and z directions.
source_time (Union[GaussianPulse, ContinuousWave, CustomSourceTime]) โ Specification of the source time-dependence.
Attributes
Box
representation of source.Default parameters for plotting a Source object.
Methods
plot
([x,ย y,ย z,ย ax])Plot this source.
Inherited Common Usage
- source_time#
- property plot_params#
Default parameters for plotting a Source object.
- property geometry#
Box
representation of source.
- __hash__()#
Hash method.