|
11 | 11 | from tidy3d.components.base import Tidy3dBaseModel, skip_if_fields_missing |
12 | 12 | from tidy3d.components.geometry.base import Box |
13 | 13 | from tidy3d.components.grid.grid import Coords1D |
14 | | -from tidy3d.components.mode_spec import ModeSpec |
| 14 | +from tidy3d.components.mode_spec import ModeInterpSpec, ModeSpec |
15 | 15 | from tidy3d.components.structure import Structure |
16 | | -from tidy3d.components.types import ArrayFloat1D, Axis, Coordinate, Size, TrackFreq |
| 16 | +from tidy3d.components.types import ArrayFloat1D, Axis, Coordinate, Size |
17 | 17 | from tidy3d.constants import RADIAN, fp_eps, inf |
18 | 18 | from tidy3d.exceptions import SetupError, ValidationError |
19 | 19 |
|
|
26 | 26 | class EMEModeSpec(ModeSpec): |
27 | 27 | """Mode spec for EME cells. Overrides some of the defaults and allowed values.""" |
28 | 28 |
|
29 | | - track_freq: Union[TrackFreq, None] = pd.Field( |
30 | | - None, |
31 | | - title="Mode Tracking Frequency", |
32 | | - description="Parameter that turns on/off mode tracking based on their similarity. " |
33 | | - "Can take values ``'lowest'``, ``'central'``, or ``'highest'``, which correspond to " |
34 | | - "mode tracking based on the lowest, central, or highest frequency. " |
35 | | - "If ``None`` no mode tracking is performed, which is the default for best performance.", |
| 29 | + interp_spec: Optional[ModeInterpSpec] = pd.Field( |
| 30 | + ModeInterpSpec(method="cheb", num_points=3), |
| 31 | + title="Mode frequency interpolation specification", |
| 32 | + description="Specification for computing modes at a reduced set of frequencies and " |
| 33 | + "interpolating to obtain results at all requested frequencies. This can significantly " |
| 34 | + "reduce computational cost for broadband simulations where modes vary smoothly with " |
| 35 | + "frequency. Requires frequency tracking to be enabled (``sort_spec.track_freq`` must " |
| 36 | + "not be ``None``) to ensure consistent mode ordering across frequencies.", |
36 | 37 | ) |
37 | 38 |
|
38 | 39 | angle_theta: Literal[0.0] = pd.Field( |
|
0 commit comments