@@ -63,13 +63,7 @@ class TerminalComponentModelerData(Tidy3dBaseModel):
63
63
"and from which this data was generated." ,
64
64
)
65
65
66
- smatrix_data : MicrowaveSMatrixData = pd .Field (
67
- ...,
68
- title = "S-Matrix Data" ,
69
- description = "Stores the computed S-matrix and reference impedances for the terminal ports" ,
70
- )
71
-
72
- port_simulation_data : MicrowavePortSimulationData = pd .Field (
66
+ data : MicrowavePortSimulationData = pd .Field (
73
67
...,
74
68
title = "Port-Simulation Data" ,
75
69
description = "Stores raw simulation data from each microwave port-specific simulation." ,
@@ -81,6 +75,15 @@ class TerminalComponentModelerData(Tidy3dBaseModel):
81
75
description = "A string containing the log information from the simulation run." ,
82
76
)
83
77
78
+ @cached_property
79
+ def smatrix (self ) -> MicrowaveSMatrixData :
80
+ "Stores the computed S-matrix and reference impedances for the terminal ports"
81
+ from tidy3d .plugins .smatrix .local_run import construct_smatrix
82
+
83
+ terminal_port_data = construct_smatrix (simulation = self .simulation )
84
+ smatrix_data = MicrowaveSMatrixData (data = terminal_port_data )
85
+ return smatrix_data
86
+
84
87
@pd .root_validator (pre = False )
85
88
def _warn_rf_license (cls , values ):
86
89
log .warning (
@@ -164,7 +167,7 @@ def get_antenna_metrics_data(
164
167
# Retrieve associated simulation data
165
168
combined_directivity_data = None
166
169
for port , amplitude in port_dict .items ():
167
- sim_data_port = self .port_simulation_data .data [port ]
170
+ sim_data_port = self .data .data [port ]
168
171
radiation_data = sim_data_port [rad_mon .name ]
169
172
170
173
a , b = compute_power_wave_amplitudes_at_each_port (
0 commit comments