tidy3d.LinearChargePerturbation#
- class LinearChargePerturbation[source]#
- Bases: - ChargePerturbation- Specifies parameter’s perturbation due to free carrier effects as a linear function of electron and hole densities: - 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, - attrsare mutable. For example, the following is allowed for setting an- attr- obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a- TypeErrorif- attrscontain objects that can not be serialized. One can check if- attrsare serializable by calling- obj.json().
- electron_range (Tuple[NonNegativeFloat, NonNegativeFloat] = (0, inf)) – Range of electrons densities in which perturbation model is valid. 
- hole_range (Tuple[NonNegativeFloat, NonNegativeFloat] = (0, inf)) – Range of holes densities in which perturbation model is valid. 
- electron_ref (NonNegativeFloat) – [units = 1/cm^3]. Electron density value at which there is no perturbation due to electrons’s presence. 
- hole_ref (NonNegativeFloat) – [units = 1/cm^3]. Hole density value at which there is no perturbation due to holes’ presence. 
- electron_coeff (float) – [units = cm^3]. Sensitivity (derivative) of perturbation with respect to electron density. 
- hole_coeff (float) – [units = cm^3]. Sensitivity (derivative) of perturbation with respect to hole density. 
 
 - Notes \[\Delta X (T) = \text{electron\_coeff} \times (N_e - \text{electron\_ref}) + \text{hole\_coeff} \times (N_h - \text{hole\_ref}),\]- where - electron_coeffand- hole_coeffare the parameter’s sensitivities to electron and hole densities, while- electron_refand- hole_refare reference electron and hole density values. Ranges of electron and hole densities in which such a model is deemed accurate may be provided as fields- electron_rangeand- hole_range(default:- [0, inf]each). Wherever is applied, Tidy3D will check that the parameter’s value does not go out of its physical bounds within- electron_rangex- hole_rangedue to perturbations and raise a warning if this check fails. A warning is also issued if the perturbation model is evaluated outside of- electron_rangex- hole_range.- Example - >>> 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], ... ) - Attributes - Whether perturbation is complex valued. - Range of possible perturbation values within provided - electron_rangeand- hole_range.- Methods - sample(electron_density, hole_density)- Sample perturbation at electron and hole density points. - Inherited Common Usage - electron_ref#
 - hole_ref#
 - electron_coeff#
 - hole_coeff#
 - property perturbation_range#
- Range of possible perturbation values within provided - electron_rangeand- hole_range.
 - sample(electron_density, hole_density)[source]#
- Sample perturbation at electron and hole density points. - Parameters:
- electron_density (Union[) – - ArrayLike[float],
- SpatialDataArray,- TriangularGridDataset,- TetrahedralGridDataset,
 - ] Electron density sample point(s). 
- hole_density (Union[) – - ArrayLike[float],
- SpatialDataArray,- TriangularGridDataset,- TetrahedralGridDataset,
 - ] Hole density sample point(s). 
 
 - Note - Provided - electron_densityand- hole_densitymust be of the same type and match shapes/coordinates, unless one of them is a scalar or both are 1d arrays, in which case values are broadcasted.- Returns:
- Union[ – ArrayLike[float], ArrayLike[complex], - SpatialDataArray,- TriangularGridDataset,- TetrahedralGridDataset,
- ] – Sampled perturbation value(s). 
 
 
 - property is_complex#
- Whether perturbation is complex valued. 
 - __hash__()#
- Hash method.