Skip to content

Commit 122bab6

Browse files
refactor(rf): Reorganise project structure
1 parent 108f807 commit 122bab6

37 files changed

+1221
-829
lines changed

poetry.lock

Lines changed: 1147 additions & 799 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,16 @@ dev = [
178178
'cma',
179179
'diff-cover'
180180
]
181+
tests-only = [
182+
'pytest',
183+
'pytest-timeout',
184+
'pytest-xdist',
185+
'pytest-env',
186+
'pytest-cov',
187+
'psutil',
188+
'ruff',
189+
'diff-cover'
190+
]
181191
docs = [
182192
"jupyter",
183193
"jinja2",

tests/test_plugins/smatrix/test_terminal_component_modeler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import tidy3d as td
1010
from tidy3d.components.data.data_array import FreqDataArray
11+
from tidy3d.components.microwave.ports.base_lumped import AbstractLumpedPort
1112
from tidy3d.exceptions import SetupError, Tidy3dError, Tidy3dKeyError
1213
from tidy3d.plugins.microwave import (
1314
CurrentIntegralAxisAligned,
@@ -23,7 +24,6 @@
2324
TerminalPortDataArray,
2425
WavePort,
2526
)
26-
from tidy3d.plugins.smatrix.ports.base_lumped import AbstractLumpedPort
2727

2828
from ...utils import run_emulated
2929
from .terminal_component_modeler_def import make_coaxial_component_modeler, make_component_modeler

tidy3d/microwave/__init__.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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.microwave.lobe_measurer import LobeMeasurer
10+
11+
__all__ = [
12+
"AxisAlignedPathIntegral",
13+
"CurrentIntegralAxisAligned",
14+
"CurrentIntegralTypes",
15+
"CustomCurrentIntegral2D",
16+
"CustomPathIntegral2D",
17+
"CustomVoltageIntegral2D",
18+
"ImpedanceCalculator",
19+
"LobeMeasurer",
20+
"RectangularAntennaArrayCalculator",
21+
"VoltageIntegralAxisAligned",
22+
"VoltageIntegralTypes",
23+
"models",
24+
"path_integrals_from_lumped_element",
25+
"rf_material_library",
26+
]

tidy3d/plugins/smatrix/component_modelers/base.py renamed to tidy3d/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/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/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 SetupError, 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)