@@ -39,13 +39,21 @@ class EMESimulationData(AbstractYeeGridSimulationData):
3939 None , title = "S Matrix" , description = "Scattering matrix of the EME simulation."
4040 )
4141
42- port_modes : Optional [EMEModeSolverData ] = pd .Field (
42+ port_modes_raw : Optional [EMEModeSolverData ] = pd .Field (
4343 None ,
4444 title = "Port Modes" ,
4545 description = "Modes associated with the two ports of the EME device. "
46- "The scattering matrix is expressed in this basis." ,
46+ "The scattering matrix is expressed in this basis. "
47+ "Note: these modes are not symmetry expanded; use 'port_modes' instead." ,
4748 )
4849
50+ @property
51+ def port_modes (self ):
52+ """Modes associated with the two ports of the EME device.
53+ The scattering matrix is expressed in this basis.
54+ Note: these modes are symmetry expanded."""
55+ return self .port_modes_raw .symmetry_expanded_copy
56+
4957 def _extract_mode_solver_data (
5058 self , data : EMEModeSolverData , eme_cell_index : int , sweep_index : Optional [int ] = None
5159 ) -> ModeSolverData :
@@ -89,7 +97,13 @@ def _extract_mode_solver_data(
8997 "certain derived quantities, like the flux."
9098 )
9199 grid_expanded = self .simulation .discretize_monitor (monitor = monitor )
92- return ModeSolverData (** update_dict , monitor = monitor , grid_expanded = grid_expanded )
100+ return ModeSolverData (
101+ ** update_dict ,
102+ monitor = monitor ,
103+ grid_expanded = grid_expanded ,
104+ symmetry = data .symmetry ,
105+ symmetry_center = data .symmetry_center ,
106+ )
93107
94108 @cached_property
95109 def port_modes_tuple (self ) -> tuple [ModeSolverData , ModeSolverData ]:
0 commit comments