tidy3d.plugins.dispersion.AdvancedFastFitterParam#

class AdvancedFastFitterParam[source]#

Bases: Tidy3dBaseModel

Advanced fast fitter parameters.

Parameters:
  • loss_bounds (Attribute: loss_bounds) –

    Type

    Tuple[float, float]

    Default

    = (0, inf)

    Description

    Bounds (lower, upper) on Im[eps]. Default corresponds to only passivity. A lower bound of 0 or greater ensures passivity. To fit a gain medium without additional constraints, use loss_bounds=(-np.inf, np.inf). Increasing the lower bound could help with simulation stability. A finite upper bound may be helpful when fitting lossless materials. In this case, consider also increasing the weight for fitting the imaginary part.

  • weights (Attribute: weights) –

    Type

    Optional[Tuple[NonNegativeFloat, NonNegativeFloat]]

    Default

    = None

    Description

    Weights (real, imag) in objective function for fitting. The weights are applied to the real and imaginary parts of the permittivity epsilon. The weights will be rescaled together so they average to 1. If None, the weights are calculated according to the typical value of the real and imaginary part, so that the relative error in the real and imaginary part of the fit should be comparable. More precisely, the RMS value rms of the real and imaginary parts are calculated, and the default weights are 1 / max(rms, RMS_MIN). Changing this can be helpful if fitting either the real or imaginary part is more important than the other.

  • show_progress (Attribute: show_progress) –

    Type

    bool

    Default

    = True

    Description

    Whether to show progress bar during fitter run.

  • show_unweighted_rms (Attribute: show_unweighted_rms) –

    Type

    bool

    Default

    = False

    Description

    Whether to show unweighted RMS error in addition to the default weighted RMS error. Requires td.config.logging_level = "INFO".

  • relaxed (Attribute: relaxed) –

    Type

    Optional[bool]

    Default

    = None

    Description

    Whether to use relaxed fitting algorithm, which has better pole relocation properties. If None, will try both original and relaxed algorithms.

  • smooth (Attribute: smooth) –

    Type

    Optional[bool]

    Default

    = None

    Description

    Whether to use real starting poles, which can help when fitting smooth data. If None, will try both real and complex starting poles.

  • logspacing (Attribute: logspacing) –

    Type

    Optional[bool]

    Default

    = None

    Description

    Whether to space the poles logarithmically. If None, will try both log and linear spacing.

  • num_iters (Attribute: num_iters) –

    Type

    PositiveInt

    Default

    = 20

    Description

    Number of iterations of the fitting algorithm. Make this smaller to speed up fitter, or make it larger to try to improve fit.

  • passivity_num_iters (Attribute: passivity_num_iters) –

    Type

    PositiveInt

    Default

    = 50

    Description

    Number of loss bounds enforcement iterations of the fitting algorithm. Make this smaller to speed up fitter. There will be a warning if this value is too small. To fit a gain medium, use the loss_bounds parameter instead.

  • slsqp_constraint_scale (Attribute: slsqp_constraint_scale) –

    Type

    PositiveFloat

    Default

    = 1e+35

    Description

    Passivity constraint is weighted relative to fit quality by this factor, before running passivity optimization using the SLSQP algorithm. There will be a warning if this value is too small.

Attributes

Methods

loss_bounds#
weights#
show_progress#
show_unweighted_rms#
relaxed#
smooth#
logspacing#
num_iters#
passivity_num_iters#
slsqp_constraint_scale#
__hash__()#

Hash method.