@@ -92,45 +92,6 @@ def _warn_rf_license(cls, values):
92
92
)
93
93
return values
94
94
95
- @pd .validator ("s_param_def" , always = True )
96
- def _validate_s_param_def (cls , s_param_def , values ):
97
- """
98
- Check that the scattering parameter computation is set up correctly for the power wave definition.
99
- """
100
-
101
- if s_param_def == "pseudo" :
102
- return s_param_def
103
-
104
- assume_ideal_excitation = values .get ("assume_ideal_excitation" )
105
- if assume_ideal_excitation is True :
106
- raise SetupError (
107
- "Setting `assume_ideal_excitation` to ``True`` is incompatible with "
108
- "using the power wave definition of scattering parameters. "
109
- "Either use the pseudo wave definition by setting 's_param_def' to 'pseudo', "
110
- "or set 'assume_ideal_excitation' to ``False``. "
111
- )
112
-
113
- run_only = values .get ("run_only" )
114
- if run_only is not None :
115
- raise SetupError (
116
- "Computing scattering parameters using the power wave definition "
117
- "requires running a number of simulations equal to the number of ports. "
118
- "Either use the pseudo wave definition by setting 's_param_def' to 'pseudo', "
119
- "or ensure all simulations are run by setting 'run_only' to 'None'. "
120
- )
121
-
122
- element_mappings = values .get ("element_mappings" )
123
- if len (element_mappings ) != 0 :
124
- raise SetupError (
125
- "Computing scattering parameters using the power wave definition "
126
- "requires running a number of simulations equal to the number of ports. "
127
- "Either use the pseudo wave definition by setting 's_param_def' to 'pseudo', "
128
- "or ensure all simulations are run by keeping 'element_mappings' as its "
129
- "default value of an empty 'tuple'. "
130
- )
131
-
132
- return s_param_def
133
-
134
95
@equal_aspect
135
96
@add_ax_if_none
136
97
def plot_sim (
@@ -835,7 +796,7 @@ def get_antenna_metrics_data(
835
796
) -> AntennaMetricsData :
836
797
"""Calculate antenna parameters using superposition of fields from multiple port excitations.
837
798
838
- The method computes the radiated far fields and port excitation wave amplitudes
799
+ The method computes the radiated far fields and port excitation power wave amplitudes
839
800
for a superposition of port excitations, which can be used to analyze antenna radiation
840
801
characteristics.
841
802
@@ -845,6 +806,8 @@ def get_antenna_metrics_data(
845
806
Dictionary mapping port names to their desired excitation amplitudes. For each port,
846
807
:math:`\\ frac{1}{2}|a|^2` represents the incident power from that port into the system.
847
808
If None, uses only the first port without any scaling of the raw simulation data.
809
+ Note that in this method ``a`` represents the incident wave amplitude
810
+ using the power wave definition in [2].
848
811
monitor_name : str = None
849
812
Name of the :class:`.DirectivityMonitor` to use for calculating far fields.
850
813
If None, uses the first monitor in `radiation_monitors`.
@@ -871,7 +834,7 @@ def get_antenna_metrics_data(
871
834
else :
872
835
rad_mon = self .get_radiation_monitor_by_name (monitor_name )
873
836
874
- # Create data arrays for holding the superposition of all port wave amplitudes
837
+ # Create data arrays for holding the superposition of all port power wave amplitudes
875
838
f = list (rad_mon .freqs )
876
839
coords = {"f" : f , "port" : list (self .matrix_indices_monitor )}
877
840
a_sum = PortDataArray (
@@ -885,7 +848,7 @@ def get_antenna_metrics_data(
885
848
radiation_data = sim_data_port [rad_mon .name ]
886
849
887
850
a , b = self .compute_wave_amplitudes_at_each_port (
888
- self .port_reference_impedances , sim_data_port , s_param_def = "pseudo "
851
+ self .port_reference_impedances , sim_data_port , s_param_def = "power "
889
852
)
890
853
# Select a possible subset of frequencies
891
854
a = a .sel (f = f )
@@ -904,7 +867,7 @@ def get_antenna_metrics_data(
904
867
a = scale_factor * a
905
868
b = scale_factor * b
906
869
907
- # Combine the possibly scaled directivity data and the wave amplitudes
870
+ # Combine the possibly scaled directivity data and the power wave amplitudes
908
871
if combined_directivity_data is None :
909
872
combined_directivity_data = scaled_directivity_data
910
873
else :
0 commit comments