Skip to content

Commit 5533c59

Browse files
Progress
1 parent f395827 commit 5533c59

File tree

6 files changed

+343
-255
lines changed

6 files changed

+343
-255
lines changed

tidy3d/plugins/smatrix/data/terminal.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class TerminalComponentModelerData(Tidy3dBaseModel):
7878
@cached_property
7979
def smatrix(self) -> MicrowaveSMatrixData:
8080
"Stores the computed S-matrix and reference impedances for the terminal ports"
81-
from tidy3d.plugins.smatrix.local_run import construct_smatrix
81+
from tidy3d.plugins.smatrix.run.local_run import construct_smatrix
8282

8383
terminal_port_data = construct_smatrix(simulation=self.simulation)
8484
smatrix_data = MicrowaveSMatrixData(data=terminal_port_data)
@@ -141,7 +141,7 @@ def get_antenna_metrics_data(
141141
Container with antenna parameters including directivity, gain, and radiation efficiency,
142142
computed from the superposition of fields from all excited ports.
143143
"""
144-
from tidy3d.plugins.smatrix.local_run import compute_power_wave_amplitudes_at_each_port
144+
from tidy3d.plugins.smatrix.run.local_run import compute_power_wave_amplitudes_at_each_port
145145

146146
# Use the first port as default if none specified
147147
if port_amplitudes is None:
@@ -210,18 +210,21 @@ def get_antenna_metrics_data(
210210
@cached_property
211211
def port_reference_impedances(self) -> PortDataArray:
212212
"""The reference impedance used at each port for definining power wave amplitudes."""
213-
from tidy3d.plugins.smatrix.local_run import port_reference_impedances
213+
from tidy3d.plugins.smatrix.run.local_run import port_reference_impedances
214214

215215
return port_reference_impedances(self.simulation)
216216

217217
def compute_power_wave_amplitudes_at_each_port(
218218
self, port_reference_impedances: PortDataArray, sim_data: SimulationData
219219
) -> tuple[PortDataArray, PortDataArray]:
220-
from tidy3d.plugins.smatrix.local_run import compute_power_wave_amplitudes_at_each_port
220+
from tidy3d.plugins.smatrix.run.local_run import compute_power_wave_amplitudes_at_each_port
221221

222222
data = compute_power_wave_amplitudes_at_each_port(
223223
simulation=self.simulation,
224224
port_reference_impedances=port_reference_impedances,
225225
sim_data=sim_data,
226226
)
227227
return data
228+
229+
# Mirror Utils
230+
# So they can be reused elsewhere without a class reimport

tidy3d/plugins/smatrix/local_run.py

Lines changed: 0 additions & 251 deletions
This file was deleted.

tidy3d/plugins/smatrix/run/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)