fdtdx.DrudePole#
- class fdtdx.DrudePole(*, orientation=None, plasma_frequency=null, damping=null)[source]#
Bases:
PoleDrude pole parameterised by its physical constants.
The contribution to the susceptibility is
\[\chi(\omega) = -\frac{\omega_p^2}{\omega^2 + i\gamma\omega},\]equivalent to a Lorentz pole with
omega_0 = 0.Each parameter is either a scalar (isotropic) or a per-axis 3-tuple
(x, y, z)for diagonally anisotropic dispersion — e.g.plasma_frequency=(wp, 0.0, 0.0)gives a metallic (hyperbolic) response only along x.
Quick Reference#
Attributes
Methods
Attributes#
- DrudePole.coupling_sq#
Effective squared coupling frequency
K(rad^2/s^2).Raises
ValueErrorfor per-axis poles; usecoupling_sq_axes.
- DrudePole.coupling_sq_axes#
-
DrudePole.damping:
float|tuple[float,float,float]# Damping rate (rad/s). Must be >= 0. Scalar or per-axis 3-tuple.
- DrudePole.gamma#
Damping rate (rad/s).
Raises
ValueErrorfor per-axis poles; usegamma_axes.
- DrudePole.gamma_axes#
- DrudePole.is_isotropic#
Whether the pole acts identically on the three axes (and is not oriented).
- DrudePole.is_oriented#
Whether the pole is a 1D oscillator along an
orientationvector.
- DrudePole.omega_0#
Resonance angular frequency (rad/s). Zero for pure Drude poles.
Raises
ValueErrorfor per-axis poles; useomega_0_axes.
- DrudePole.omega_0_axes#
-
DrudePole.orientation:
tuple[float,float,float] |None# Optional oscillator direction
u(normalized on construction).None(default) applies the pole isotropically or per-axis. When set, the pole is a single 1D oscillator alonguwith coupling tensorK * u u^T; all other pole parameters must be scalars.
-
DrudePole.plasma_frequency:
float|tuple[float,float,float]# Plasma angular frequency (rad/s). Must be > 0. Scalar or per-axis 3-tuple.
Methods#
- DrudePole.aset(attr_name, val, create_new_ok=False)#
Sets an attribute of this class. In contrast to the classical .at[].set(), this method updates the class attribute directly and does not only operate on jax pytree leaf nodes. Instead, replaces the full attribute with the new value.
The attribute can either be the attribute name of this class, or for nested classes it can also be the attribute name of a class, which itself is an attribute of this class. The syntax for this operation could look like this: “a->b->[0]->[‘name’]”. Here, the current class has an attribute a, which has an attribute b, which is a list, which we index at index 0, which is an element of type dictionary, which we index using the dictionary key ‘name’.
Note that dictionary keys cannot contain square brackets or single quotes (even if they are escaped).
- Parameters:
attr_name (str) – Name of attribute to set
val (Any) – Value to set the attribute to
create_new_ok (bool, optional) – If false (default), throw an error if the attribute does not exist. If true, creates a new attribute if the attribute name does not exist yet.
- Returns:
Updated instance with new attribute value
- Return type:
Self
- DrudePole.get_class_fields()#
- Return type:
list[TreeClassField]
- DrudePole.get_public_fields()#
- Return type:
list[TreeClassField]
If you find any errors in the documentation, please report them in the Github Issues!