Skip to content

Commit e1de4c7

Browse files
First attempt at refactor
1 parent bc3751e commit e1de4c7

29 files changed

+80
-29
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
"""Imports from microwave plugin."""
2+
3+
from __future__ import annotations
4+
5+
from tidy3d.components.microwave import models
6+
from tidy3d.components.microwave.array_factor import (
7+
RectangularAntennaArrayCalculator,
8+
)
9+
from tidy3d.components.microwave.auto_path_integrals import path_integrals_from_lumped_element
10+
from tidy3d.components.microwave.custom_path_integrals import (
11+
CustomCurrentIntegral2D,
12+
CustomPathIntegral2D,
13+
CustomVoltageIntegral2D,
14+
)
15+
from tidy3d.components.microwave.impedance_calculator import (
16+
CurrentIntegralTypes,
17+
ImpedanceCalculator,
18+
VoltageIntegralTypes,
19+
)
20+
from tidy3d.components.microwave.lobe_measurer import LobeMeasurer
21+
from tidy3d.components.microwave.path_integrals import (
22+
AxisAlignedPathIntegral,
23+
CurrentIntegralAxisAligned,
24+
VoltageIntegralAxisAligned,
25+
)
26+
from tidy3d.components.microwave.rf_material_library import rf_material_library
27+
28+
__all__ = [
29+
"AxisAlignedPathIntegral",
30+
"CurrentIntegralAxisAligned",
31+
"CurrentIntegralTypes",
32+
"CustomCurrentIntegral2D",
33+
"CustomPathIntegral2D",
34+
"CustomVoltageIntegral2D",
35+
"ImpedanceCalculator",
36+
"LobeMeasurer",
37+
"RectangularAntennaArrayCalculator",
38+
"VoltageIntegralAxisAligned",
39+
"VoltageIntegralTypes",
40+
"models",
41+
"path_integrals_from_lumped_element",
42+
"rf_material_library",
43+
]

tidy3d/plugins/smatrix/component_modelers/base.py renamed to tidy3d/components/microwave/component_modelers/base.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@
1212
from tidy3d.components.base import Tidy3dBaseModel, cached_property
1313
from tidy3d.components.data.data_array import DataArray
1414
from tidy3d.components.data.sim_data import SimulationData
15+
from tidy3d.components.microwave.ports.coaxial_lumped import CoaxialLumpedPort
16+
from tidy3d.components.microwave.ports.modal import Port
17+
from tidy3d.components.microwave.ports.rectangular_lumped import LumpedPort
18+
from tidy3d.components.microwave.ports.wave import WavePort
1519
from tidy3d.components.simulation import Simulation
1620
from tidy3d.components.types import FreqArray
1721
from tidy3d.config import config
1822
from tidy3d.constants import HERTZ
1923
from tidy3d.exceptions import SetupError, Tidy3dKeyError
2024
from tidy3d.log import log
21-
from tidy3d.plugins.smatrix.ports.coaxial_lumped import CoaxialLumpedPort
22-
from tidy3d.plugins.smatrix.ports.modal import Port
23-
from tidy3d.plugins.smatrix.ports.rectangular_lumped import LumpedPort
24-
from tidy3d.plugins.smatrix.ports.wave import WavePort
2525
from tidy3d.web.api.container import Batch, BatchData
2626

2727
# fwidth of gaussian pulse in units of central frequency
2828
FWIDTH_FRAC = 1.0 / 10
29-
DEFAULT_DATA_DIR = "."
29+
DEFAULT_DATA_DIR = ""
3030

3131
LumpedPortType = Union[LumpedPort, CoaxialLumpedPort]
3232
TerminalPortType = Union[LumpedPortType, WavePort]

tidy3d/plugins/smatrix/component_modelers/modal.py renamed to tidy3d/components/microwave/component_modelers/modal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111

1212
from tidy3d.components.base import cached_property
1313
from tidy3d.components.data.sim_data import SimulationData
14+
from tidy3d.components.microwave.ports.modal import ModalPortDataArray, Port
1415
from tidy3d.components.monitor import ModeMonitor
1516
from tidy3d.components.simulation import Simulation
1617
from tidy3d.components.source.field import ModeSource
1718
from tidy3d.components.source.time import GaussianPulse
1819
from tidy3d.components.types import Ax, Complex
1920
from tidy3d.components.viz import add_ax_if_none, equal_aspect
2021
from tidy3d.exceptions import SetupError
21-
from tidy3d.plugins.smatrix.ports.modal import ModalPortDataArray, Port
2222
from tidy3d.web.api.container import BatchData
2323

2424
from .base import FWIDTH_FRAC, AbstractComponentModeler

tidy3d/plugins/smatrix/component_modelers/terminal.py renamed to tidy3d/components/microwave/component_modelers/terminal.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
from tidy3d.components.data.sim_data import SimulationData
1414
from tidy3d.components.geometry.utils_2d import snap_coordinate_to_grid
1515
from tidy3d.components.microwave.data.monitor_data import AntennaMetricsData
16+
from tidy3d.components.microwave.data.terminal import PortDataArray, TerminalPortDataArray
17+
from tidy3d.components.microwave.ports.base_lumped import AbstractLumpedPort
18+
from tidy3d.components.microwave.ports.coaxial_lumped import CoaxialLumpedPort
19+
from tidy3d.components.microwave.ports.rectangular_lumped import LumpedPort
20+
from tidy3d.components.microwave.ports.wave import WavePort
1621
from tidy3d.components.monitor import DirectivityMonitor
1722
from tidy3d.components.simulation import Simulation
1823
from tidy3d.components.source.time import GaussianPulse
@@ -21,11 +26,6 @@
2126
from tidy3d.constants import C_0, OHM
2227
from tidy3d.exceptions import Tidy3dError, Tidy3dKeyError, ValidationError
2328
from tidy3d.log import log
24-
from tidy3d.plugins.smatrix.data.terminal import PortDataArray, TerminalPortDataArray
25-
from tidy3d.plugins.smatrix.ports.base_lumped import AbstractLumpedPort
26-
from tidy3d.plugins.smatrix.ports.coaxial_lumped import CoaxialLumpedPort
27-
from tidy3d.plugins.smatrix.ports.rectangular_lumped import LumpedPort
28-
from tidy3d.plugins.smatrix.ports.wave import WavePort
2929
from tidy3d.web.api.container import BatchData
3030

3131
from .base import AbstractComponentModeler, TerminalPortType

0 commit comments

Comments
 (0)