tidy3d.ParameterPerturbation#

class ParameterPerturbation[source]#

Bases: Tidy3dBaseModel

Stores information about parameter perturbations due to different physical effect. If both heat and charge perturbation models are included their effects are superimposed.

Parameters:

Example

>>> from tidy3d import LinearChargePerturbation, CustomHeatPerturbation, HeatDataArray
>>>
>>> perturbation_data = HeatDataArray([0.001, 0.002, 0.004], coords=dict(T=[250, 300, 350]))
>>> heat_perturb = CustomHeatPerturbation(
...     perturbation_values=perturbation_data
... )
>>> charge_perturb = LinearChargePerturbation(
...     electron_ref=0,
...     electron_coeff=0.0001,
...     electron_range=[0, 1e19],
...     hole_ref=0,
...     hole_coeff=0.0002,
...     hole_range=[0, 2e19],
... )
>>> param_perturb = ParameterPerturbation(heat=heat_perturb, charge=charge_perturb)

Attributes

is_complex

Whether perturbation is complex valued.

perturbation_list

Provided perturbations as a list.

perturbation_range

Range of possible parameter perturbation values due to both heat and charge effects.

heat

charge

Methods

apply_data([temperature, electron_density, ...])

Sample perturbations on provided heat and/or charge data.

heat#
charge#
property perturbation_list#

Provided perturbations as a list.

property perturbation_range#

Range of possible parameter perturbation values due to both heat and charge effects.

apply_data(temperature=None, electron_density=None, hole_density=None)[source]#

Sample perturbations on provided heat and/or charge data. At least one of temperature, electron_density, and hole_density must be not None. All provided fields must have identical coords.

Parameters:
Returns:

property is_complex#

Whether perturbation is complex valued.