tidy3d.GaussianPulse#
- class GaussianPulse[source]#
Bases:
Pulse
Source time dependence that describes a Gaussian pulse.
- 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()
.amplitude (NonNegativeFloat = 1.0) β Real-valued maximum amplitude of the time dependence.
phase (float = 0.0) β [units = rad]. Phase shift of the time dependence.
freq0 (PositiveFloat) β [units = Hz]. Central frequency of the pulse.
fwidth (PositiveFloat) β [units = Hz]. Standard deviation of the frequency content of the pulse.
offset (ConstrainedFloatValue = 5.0) β Time delay of the maximum value of the pulse in units of 1 / (
2pi * fwidth
).remove_dc_component (bool = True) β Whether to remove the DC component in the Gaussian pulse spectrum. If
True
, the Gaussian pulse is modified at low frequencies to zero out the DC component, which is usually desirable so that the fields will decay. However, for broadband simulations, it may be better to have non-vanishing source power near zero frequency. Setting this toFalse
results in an unmodified Gaussian pulse spectrum which can have a nonzero DC component.
Example
>>> pulse = GaussianPulse(freq0=200e12, fwidth=20e12)
Attributes
Grab the complex amplitude from a
GaussianPulse
.Methods
amp_time
(time)Complex-valued source amplitude as a function of time.
end_time
()Time after which the source is effectively turned off / close to zero amplitude.
from_amp_complex
(amp,Β **kwargs)Set the complex amplitude of a
GaussianPulse
.Inherited Common Usage
- remove_dc_component#
- end_time()[source]#
Time after which the source is effectively turned off / close to zero amplitude.
- property amp_complex#
Grab the complex amplitude from a
GaussianPulse
.
- classmethod from_amp_complex(amp, **kwargs)[source]#
Set the complex amplitude of a
GaussianPulse
.- Parameters:
amp (complex) β Complex-valued amplitude to set in the returned
GaussianPulse
.kwargs (dict) β Keyword arguments passed to
GaussianPulse()
, excludingamplitude
&phase
.
- __hash__()#
Hash method.