tidy3d.plugins.StableDispersionFitter
tidy3d.plugins.StableDispersionFitter#
- class tidy3d.plugins.StableDispersionFitter#
Stable fitter based on web service
Show JSON schema
{ "title": "StableDispersionFitter", "description": "Stable fitter based on web service", "type": "object", "properties": { "wvl_um": { "title": "Wavelength data", "description": "Wavelength data in micrometers.", "unit": "um", "anyOf": [ { "title": "NumpyArray", "description": "Wrapper around numpy arrays that has a well defined json schema.", "type": "object", "properties": { "data_list": { "title": "Data List", "type": "array", "items": {} } }, "required": [ "data_list" ] }, { "$ref": "#/definitions/NumpyArray" }, { "type": "array", "items": {} } ] }, "n_data": { "title": "Index of refraction data", "description": "Real part of the complex index of refraction.", "anyOf": [ { "title": "NumpyArray", "description": "Wrapper around numpy arrays that has a well defined json schema.", "type": "object", "properties": { "data_list": { "title": "Data List", "type": "array", "items": {} } }, "required": [ "data_list" ] }, { "$ref": "#/definitions/NumpyArray" }, { "type": "array", "items": {} } ] }, "k_data": { "title": "Extinction coefficient data", "description": "Imaginary part of the complex index of refraction.", "anyOf": [ { "title": "NumpyArray", "description": "Wrapper around numpy arrays that has a well defined json schema.", "type": "object", "properties": { "data_list": { "title": "Data List", "type": "array", "items": {} } }, "required": [ "data_list" ] }, { "$ref": "#/definitions/NumpyArray" }, { "type": "array", "items": {} } ] }, "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 ], "unit": "um", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number" }, { "type": "number" } ] } }, "required": [ "wvl_um", "n_data" ], "definitions": { "NumpyArray": { "title": "NumpyArray", "description": "Wrapper around numpy arrays that has a well defined json schema.", "type": "object", "properties": { "data_list": { "title": "Data List", "type": "array", "items": {} } }, "required": [ "data_list" ] } } }
- Fields
k_data (Union[tidy3d.components.types.tidynumpy, tidy3d.components.types.NumpyArray, List])
n_data (Union[tidy3d.components.types.tidynumpy, tidy3d.components.types.NumpyArray, List])
wvl_range (Tuple[float, float])
wvl_um (Union[tidy3d.components.types.tidynumpy, tidy3d.components.types.NumpyArray, List])
- attribute k_data: Union[tidy3d.components.types.tidynumpy, tidy3d.components.types.NumpyArray, List] = None#
Imaginary part of the complex index of refraction.
- Validated by
_kdata_setup_and_length_match
- attribute n_data: Union[tidy3d.components.types.tidynumpy, tidy3d.components.types.NumpyArray, List] [Required]#
Real part of the complex index of refraction.
- Validated by
_ndata_length_match_wvl
- attribute wvl_range: Tuple[float, float] = [None, None]#
Truncate the wavelength-nk data to wavelength range [wvl_min,wvl_max] for fitting
- attribute wvl_um: Union[tidy3d.components.types.tidynumpy, tidy3d.components.types.NumpyArray, List] [Required]#
Wavelength data in micrometers.
- Validated by
_setup_wvl
- 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_eps_inf=1.0, constraint='hard', nlopt_maxeval=5000)) 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[:class:
PoleResidue
, float]