tidy3d.plugins.StableDispersionFitter
tidy3d.plugins.StableDispersionFitter#
- class tidy3d.plugins.StableDispersionFitter#
Stable fitter based on web service
- Parameters
wvl_um (Union[Tuple[float, ...], Array]) – [units = um]. Wavelength data in micrometers.
n_data (Union[Tuple[float, ...], Array]) – Real part of the complex index of refraction.
k_data (Union[Tuple[float, ...], Array] = None) – Imaginary part of the complex index of refraction.
wvl_range (Tuple[float, float] = (None, None)) – [units = um]. Truncate the wavelength-nk data to wavelength range [wvl_min,wvl_max] for fitting
Show JSON schema
{ "title": "StableDispersionFitter", "description": "Stable fitter based on web service\n\nParameters\n----------\nwvl_um : Union[Tuple[float, ...], Array]\n [units = um]. Wavelength data in micrometers.\nn_data : Union[Tuple[float, ...], Array]\n Real part of the complex index of refraction.\nk_data : Union[Tuple[float, ...], Array] = None\n Imaginary part of the complex index of refraction.\nwvl_range : Tuple[float, float] = (None, None)\n [units = um]. Truncate the wavelength-nk data to wavelength range [wvl_min,wvl_max] for fitting", "type": "object", "properties": { "wvl_um": { "title": "Wavelength data", "description": "Wavelength data in micrometers.", "units": "um", "anyOf": [ { "type": "array", "items": { "type": "number" } }, { "title": "Array Like", "description": "Accepts sequence (tuple, list, numpy array) and converts to tuple.", "type": "tuple", "properties": {}, "required": [] } ] }, "n_data": { "title": "Index of refraction data", "description": "Real part of the complex index of refraction.", "anyOf": [ { "type": "array", "items": { "type": "number" } }, { "title": "Array Like", "description": "Accepts sequence (tuple, list, numpy array) and converts to tuple.", "type": "tuple", "properties": {}, "required": [] } ] }, "k_data": { "title": "Extinction coefficient data", "description": "Imaginary part of the complex index of refraction.", "anyOf": [ { "type": "array", "items": { "type": "number" } }, { "title": "Array Like", "description": "Accepts sequence (tuple, list, numpy array) and converts to tuple.", "type": "tuple", "properties": {}, "required": [] } ] }, "wvl_range": { "title": "Wavelength range [wvl_min,wvl_max] for fitting", "description": "Truncate the wavelength-nk data to wavelength range [wvl_min,wvl_max] for fitting", "default": [ null, null ], "units": "um", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number" }, { "type": "number" } ] }, "type": { "title": "Type", "default": "StableDispersionFitter", "enum": [ "StableDispersionFitter" ], "type": "string" } }, "required": [ "wvl_um", "n_data" ], "additionalProperties": false }
- fit(num_poles: pydantic.types.PositiveInt = 1, num_tries: pydantic.types.PositiveInt = 50, tolerance_rms: pydantic.types.NonNegativeFloat = 0.01, advanced_param: tidy3d.plugins.dispersion.fit_web.AdvancedFitterParam = AdvancedFitterParam(bound_amp=None, bound_f=None, bound_f_lower=0.0, bound_eps_inf=10.0, constraint='hard', nlopt_maxeval=5000, random_seed=0, type='AdvancedFitterParam')) Tuple[tidy3d.components.medium.PoleResidue, float] #
Fits data a number of times and returns best results.
- Parameters
num_poles (PositiveInt, optional) – Number of poles in the model.
num_tries (PositiveInt, optional) – Number of optimizations to run with random initial guess.
tolerance_rms (NonNegativeFloat, optional) – RMS error below which the fit is successful and the result is returned.
advanced_param (
AdvancedFitterParam
, optional) – Other advanced parameters.
- Returns
Best results of multiple fits: (dispersive medium, RMS error).
- Return type
Tuple[
PoleResidue
, float]