File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
tidy3d/plugins/smatrix/component_modelers Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -383,6 +383,13 @@ def _check_port_impedance_sign(Z_numpy: np.ndarray):
383
383
384
384
return _check_port_impedance_sign (Z_numpy )
385
385
386
+ def _compute_F (Z_numpy : np .array ):
387
+ """Helper to convert port impedance matrix to F, which is used for
388
+ computing generalized scattering parameters."""
389
+ from tidy3d .plugins .smatrix .utils import _compute_F
390
+
391
+ return _compute_F (Z_numpy )
392
+
386
393
@cached_property
387
394
def port_reference_impedances (self ) -> PortDataArray :
388
395
from tidy3d .plugins .smatrix .data .data import SMatrixData , TerminalComponentModelerData
@@ -391,6 +398,15 @@ def port_reference_impedances(self) -> PortDataArray:
391
398
data = TerminalComponentModelerData (simulation = self , data = a ).port_reference_impedances
392
399
return data
393
400
401
+ def _port_reference_impedances (self , batch_data ) -> PortDataArray :
402
+ from tidy3d .plugins .smatrix .data .data import SMatrixData , TerminalComponentModelerData
403
+
404
+ a = SMatrixData (a = self .batch_data )
405
+ data = TerminalComponentModelerData (simulation = self , data = a )._port_reference_impedances (
406
+ batch_data = batch_data
407
+ )
408
+ return data
409
+
394
410
@staticmethod
395
411
def s_to_z (
396
412
s_matrix : TerminalPortDataArray , reference : Union [complex , PortDataArray ]
You can’t perform that action at this time.
0 commit comments