SParameters.get
Description
Retrieves the complex scattering parameter (S-parameter) for a specified pair of output and input ports.
The returned values represent the frequency-dependent reflection or transmission coefficient from the selected input port to the selected output port. Each value contains both magnitude and phase information.
For example, S11 represents the reflection coefficient at port 1, while S21 represents transmission from port 1 to port 2.
Syntax
obj
obj An
SParameters
object containing the computed S-parameters.
values = obj.get(port_out, port_in)
values = obj.get(port_out, port_in) Returns the complex S-parameter
values for the specified output and input ports across all simulated
frequencies.
Input Arguments
port_out
int
One-based output port number identifying the port at which the reflected or transmitted signal is observed.
port_in
int
One-based input port number identifying the port at which the incident signal is applied.
Output Arguments
values- Type
numpy.ndarrayOne-dimensional array of complex S-parameter values, with one value for each simulated frequency. The values follow the order of frequency.
Examples
# Reflection coefficient at port 1 (S11)
s11 = sparams.get(1, 1)
# Transmission from port 1 to port 2 (S21)
s21 = sparams.get(2, 1)
# Corresponding frequency values in Hz
frequencies = sparams.frequency
Notes
Port numbers start at 1 and must be within the number of ports contained in the SParameters object.
The returned array contains one complex value per frequency point. Use
obj.frequency to obtain the corresponding frequency values.
Errors / Exceptions
Error / Exceptions List
hado:solutionmessage: InvalidPortSParametersType - Condition
A Boolean value is specified for either port number.
ResolutionSpecify integer port numbers instead of Boolean values.
hado:solutionmessage: InvalidPortIndexSParameters - Condition
An output or input port number is outside the available port range.
ResolutionSpecify a port number between 1 and the number of ports in the SParameters object.