tidy3d.plugins.dispersion.FastDispersionFitter

tidy3d.plugins.dispersion.FastDispersionFitter#

class FastDispersionFitter[source]#

Bases: DispersionFitter

Tool for fitting refractive index data to get a dispersive medium described by PoleResidue model.

Parameters:
  • wvl_um (ArrayLike[dtype=float, ndim=1]) – [units = um]. Wavelength data in micrometers.

  • n_data (ArrayLike[dtype=float, ndim=1]) – Real part of the complex index of refraction.

  • k_data (Optional[ArrayLike[dtype=float, ndim=1]] = None) – Imaginary part of the complex index of refraction.

  • wvl_range (Tuple[float, float] = (None, None)) – [units = um]. Truncate the wavelength, n and k data to the wavelength range ‘[wvl_min, wvl_max]’ for fitting.

Attributes

Methods

fit([min_num_poles, max_num_poles, eps_inf, ...])

Fit data using a fast fitting algorithm.

Inherited Common Usage

fit(min_num_poles=1, max_num_poles=5, eps_inf=None, tolerance_rms=1e-05, advanced_param=None)[source]#

Fit data using a fast fitting algorithm.

Note

The algorithm is described in:

B. Gustavsen and A. Semlyen, "Rational approximation
of frequency domain responses by vector fitting,"
IEEE Trans. Power. Deliv. 14, 3 (1999).

B. Gustavsen, "Improving the pole relocation properties
of vector fitting," IEEE Trans. Power Deliv. 21, 3 (2006).

B. Gustavsen, "Enforcing Passivity for Admittance Matrices
Approximated by Rational Functions," IEEE Trans. Power
Syst. 16, 1 (2001).

Note

The fit is performed after weighting the real and imaginary parts, so the RMS error is also weighted accordingly. By default, the weights are chosen based on typical values of the data. To change this behavior, use ‘AdvancedFastFitterParam.weights’.

Parameters:
  • min_num_poles (PositiveInt, optional) – Minimum number of poles in the model.

  • max_num_poles (PositiveInt, optional) – Maximum number of poles in the model.

  • eps_inf (float, optional) – Value of eps_inf to use in fit. If None, then eps_inf is also fit. Note: fitting eps_inf is not guaranteed to yield a global optimum, so the result may occasionally be better with a fixed value of eps_inf.

  • tolerance_rms (float, optional) – Weighted RMS error below which the fit is successful and the result is returned.

  • advanced_param (AdvancedFastFitterParam, optional) – Advanced parameters for fitting.

Returns:

Best fitting result: (dispersive medium, weighted RMS error).

Return type:

Tuple[PoleResidue, float]

__hash__()#

Hash method.