tidy3d.components.source.SourceTime#

class SourceTime[source]#

Bases: AbstractTimeDependence

Base class describing the time dependence of a source.

Parameters:
  • amplitude (Attribute: amplitude) –

    Type

    NonNegativeFloat

    Default

    = 1.0

    Description

    Real-valued maximum amplitude of the time dependence.

  • phase (Attribute: phase) –

    Type

    float

    Default

    = 0.0

    Units

    rad

    Description

    Phase shift of the time dependence.

Attributes

Methods

frequency_range([num_fwidth])

Frequency range within plus/minus num_fwidth * fwidth of the central frequency.

plot_spectrum(times[,Β num_freqs,Β val,Β ax])

Plot the complex-valued amplitude of the source time-dependence.

plot_spectrum(times, num_freqs=101, val='real', ax=None)[source]#

Plot the complex-valued amplitude of the source time-dependence. Note: Only the real part of the time signal is used.

Parameters:
  • times (np.ndarray) – Array of evenly-spaced times (seconds) to evaluate source time-dependence at. The spectrum is computed from this value and the source time frequency content. To see source spectrum for a specific Simulation, pass simulation.tmesh.

  • num_freqs (int = 101) – Number of frequencies to plot within the SourceTime.frequency_range.

  • ax (matplotlib.axes._subplots.Axes = None) – Matplotlib axes to plot on, if not specified, one is created.

Returns:

The supplied or created matplotlib axes.

Return type:

matplotlib.axes._subplots.Axes

abstract frequency_range(num_fwidth=4.0)[source]#

Frequency range within plus/minus num_fwidth * fwidth of the central frequency.

__hash__()#

Hash method.