tidy3d.ApodizationSpec#

class ApodizationSpec[source]#

Bases: Tidy3dBaseModel

Stores specifications for the apodizaton of frequency-domain monitors.

Parameters:
  • start (Attribute: start) โ€“

    Type

    Optional[NonNegativeFloat]

    Default

    = None

    Units

    sec

    Description

    Defines the time at which the start apodization ends.

  • end (Attribute: end) โ€“

    Type

    Optional[NonNegativeFloat]

    Default

    = None

    Units

    sec

    Description

    Defines the time at which the end apodization begins.

  • width (Attribute: width) โ€“

    Type

    Optional[PositiveFloat]

    Default

    = None

    Units

    sec

    Description

    Characteristic decay length of the apodization function.

Example

>>> apod_spec = ApodizationSpec(start=1, end=2, width=0.5)

Attributes

Methods

end_greater_than_start(val,ย values)

Ensure end is greater than or equal to start.

plot(times[,ย ax])

Plot the apodization function.

width_provided(val,ย values)

Check that width is provided if either start or end apodization is requested.

start#
end#
width#
classmethod end_greater_than_start(val, values)[source]#

Ensure end is greater than or equal to start.

classmethod width_provided(val, values)[source]#

Check that width is provided if either start or end apodization is requested.

plot(times, ax=None)[source]#

Plot the apodization function.

Parameters:
  • times (np.ndarray) โ€“ Array of times (seconds) to plot source at. To see source time amplitude for a specific Simulation, pass simulation.tmesh.

  • 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

__hash__()#

Hash method.