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:
  • attrs (dict = {}) – Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, attrs are mutable. For example, the following is allowed for setting an attr obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a TypeError if attrs contain objects that can not be serialized. One can check if attrs are serializable by calling obj.json().

  • 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

constant_loss_tangent_model(eps_real, ...[, ...])

Fit a constant loss tangent material model.

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]

classmethod constant_loss_tangent_model(eps_real, loss_tangent, frequency_range, max_num_poles=5, number_sampling_frequency=10, tolerance_rms=1e-05)[source]#

Fit a constant loss tangent material model.

Parameters:
  • eps_real (float) – Real part of permittivity

  • loss_tangent (float) – Loss tangent.

  • frequency_range (Tuple[float, float]) – Freqquency range for the material to exhibit constant loss tangent response.

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

  • number_sampling_frequency (PositiveInt, optional) – Number of sampling frequencies to compute RMS error for fitting.

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

Returns:

Best results of multiple fits.

Return type:

class:`.PoleResidue

__hash__()#

Hash method.