Skip to content

Commit 1b2606f

Browse files
First attempt at refactor
1 parent bc3751e commit 1b2606f

15 files changed

+16
-17
lines changed

tests/test_plugins/test_microwave.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,20 +398,26 @@ def test_microstrip_models():
398398
eps_r = 4.4
399399

400400
# Check zero thickness parameters
401-
Z0, eps_eff = mw.models.microstrip.compute_line_params(eps_r, width, height, thickness)
401+
Z0, eps_eff = td.components.microwave.models.microstrip.compute_line_params(
402+
eps_r, width, height, thickness
403+
)
402404
freqs = Frequency(start=1, stop=1, npoints=1, unit="ghz")
403405
mline = MLine(frequency=freqs, w=width, h=height, t=thickness, ep_r=eps_r, disp="none")
404406

405407
assert np.isclose(Z0, mline.Z0[0])
406408
assert np.isclose(eps_eff, mline.ep_reff[0])
407409

408410
# Check end effect length computation
409-
dL = mw.models.microstrip.compute_end_effect_length(eps_r, eps_eff, width, height)
411+
dL = td.components.microwave.models.microstrip.compute_end_effect_length(
412+
eps_r, eps_eff, width, height
413+
)
410414
assert np.isclose(dL, 0.54, rtol=0.01)
411415

412416
# Check finite thickness parameters
413417
thickness = 0.1
414-
Z0, eps_eff = mw.models.microstrip.compute_line_params(eps_r, width, height, thickness)
418+
Z0, eps_eff = td.components.microwave.models.microstrip.compute_line_params(
419+
eps_r, width, height, thickness
420+
)
415421
mline = MLine(frequency=freqs, w=width, h=height, t=thickness, ep_r=eps_r, disp="none")
416422

417423
assert np.isclose(Z0, mline.Z0[0])
File renamed without changes.

tidy3d/plugins/microwave/__init__.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,17 @@
22

33
from __future__ import annotations
44

5-
from . import models
5+
from tidy3d.components.microwave.path_integrals import (
6+
AxisAlignedPathIntegral,
7+
CurrentIntegralAxisAligned,
8+
VoltageIntegralAxisAligned,
9+
)
10+
611
from .array_factor import (
712
RectangularAntennaArrayCalculator,
813
)
9-
from .auto_path_integrals import path_integrals_from_lumped_element
10-
from .custom_path_integrals import (
11-
CustomCurrentIntegral2D,
12-
CustomPathIntegral2D,
13-
CustomVoltageIntegral2D,
14-
)
1514
from .impedance_calculator import CurrentIntegralTypes, ImpedanceCalculator, VoltageIntegralTypes
1615
from .lobe_measurer import LobeMeasurer
17-
from .path_integrals import (
18-
AxisAlignedPathIntegral,
19-
CurrentIntegralAxisAligned,
20-
VoltageIntegralAxisAligned,
21-
)
22-
from .rf_material_library import rf_material_library
2316

2417
__all__ = [
2518
"AxisAlignedPathIntegral",

tidy3d/plugins/smatrix/ports/coaxial_lumped.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
from tidy3d.components.geometry.utils_2d import increment_float
1616
from tidy3d.components.grid.grid import Grid, YeeGrid
1717
from tidy3d.components.lumped_element import CoaxialLumpedResistor
18+
from tidy3d.components.microwave.path_integrals import AbstractAxesRH
1819
from tidy3d.components.monitor import FieldMonitor
1920
from tidy3d.components.source.current import CustomCurrentSource
2021
from tidy3d.components.source.time import GaussianPulse
2122
from tidy3d.components.types import Axis, Coordinate, Direction, FreqArray, Size
2223
from tidy3d.constants import MICROMETER
2324
from tidy3d.exceptions import SetupError, ValidationError
2425
from tidy3d.plugins.microwave import CustomCurrentIntegral2D, VoltageIntegralAxisAligned
25-
from tidy3d.plugins.microwave.path_integrals import AbstractAxesRH
2626

2727
from .base_lumped import AbstractLumpedPort
2828

0 commit comments

Comments
 (0)