tidy3d.GaussianPulse#

class GaussianPulse[source]#

Bases: Pulse

Source time dependence that describes a Gaussian pulse.

Parameters:
  • 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 (float = 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 to False results in an unmodified Gaussian pulse spectrum which can have a nonzero DC component.

Example

>>> pulse = GaussianPulse(freq0=200e12, fwidth=20e12)

Attributes

amp_complex

Grab the complex amplitude from a GaussianPulse.

offset_time

Offset time in seconds.

peak_frequency

Frequency at which the source time dependence has its peak amplitude in the frequency domain.

peak_time

Peak time in seconds, defined by offset.

remove_dc_component

freq0

fwidth

offset

amplitude

phase

Methods

amp_freq(freq)

Complex-valued source spectrum in frequency domain.

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.

frequency_range_sigma([sigma])

Frequency range where the source amplitude is within exp(-sigma**2/2) of the peak amplitude.

from_amp_complex(amp, **kwargs)

Set the complex amplitude of a GaussianPulse.

from_frequency_range(fmin, fmax[, ...])

Create a GaussianPulse that maximizes its amplitude in the frequency range [fmin, fmax].

remove_dc_component#
property peak_time#

Peak time in seconds, defined by offset.

property offset_time#

Offset time in seconds. Note that in the case of DC removal, the maximal value of pulse can be shifted.

amp_time(time)[source]#

Complex-valued source amplitude as a function of time.

end_time()[source]#

Time after which the source is effectively turned off / close to zero amplitude.

amp_freq(freq)[source]#

Complex-valued source spectrum in frequency domain.

property peak_frequency#

Frequency at which the source time dependence has its peak amplitude in the frequency domain.

frequency_range_sigma(sigma=4.0)[source]#

Frequency range where the source amplitude is within exp(-sigma**2/2) of the peak 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(), excluding amplitude & phase.

classmethod from_frequency_range(fmin, fmax, minimum_source_bandwidth=None, **kwargs)[source]#

Create a GaussianPulse that maximizes its amplitude in the frequency range [fmin, fmax].

Parameters:
  • fmin (float) – Lower bound of frequency of interest.

  • fmax (float) – Upper bound of frequency of interest.

  • kwargs (dict) – Keyword arguments passed to GaussianPulse(), excluding freq0 & fwidth.

Returns:

A GaussianPulse that maximizes its amplitude in the frequency range [fmin, fmax].

Return type:

GaussianPulse