You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sparameters (numpy.array(dtype=numpy.complex128)): Returns an array of S-parameters. The S-parameters are returned in the following order: s11, s12, s21, s22.
Returns the S-parameters used for de-embedding a measurement on the selected port.
6424
-
6425
-
This includes interpolation of the parameters based on the configured carrier frequency. This method returns an empty array if no de-embedding is done.
6426
-
6427
-
If you want to call this method just to get the required buffer size, you can pass 0 for **S-parameter Size** and VI_NULL for the **S-parameters** buffer.
Note: The port orientation for the returned S-parameters is normalized to SparameterOrientation.PORT1_TOWARDS_DUT.
6432
-
6433
-
Args:
6434
-
sparameters (numpy.array(dtype=numpy.complex128)): Returns an array of S-parameters. The S-parameters are returned in the following order: s11, s12, s21, s22.
6435
-
6436
-
sparameters_array_size (int): Specifies the size of the array that is returned by the SPARAMETERS output.
6437
-
6438
-
Note:
6439
-
One or more of the referenced properties are not in the Python API for this driver.
6440
-
6441
-
6442
-
Returns:
6443
-
number_of_sparameters (int): Returns the number of S-parameters.
6444
-
6445
-
number_of_ports (int): Returns the number of S-parameter ports. The **sparameter** array is always *n* x *n*, where span *n* is the number of ports.
6446
-
6447
-
'''
6448
-
import numpy
6449
-
6450
-
if type(sparameters) is not numpy.ndarray:
6451
-
raise TypeError('sparameters must be {0}, is {1}'.format(numpy.ndarray, type(sparameters)))
6452
-
if numpy.isfortran(sparameters) is True:
6453
-
raise TypeError('sparameters must be in C-order')
6454
-
if sparameters.dtype is not numpy.dtype('complex128'):
6455
-
raise TypeError('sparameters must be numpy.ndarray of dtype=complex128, is ' + str(sparameters.dtype))
vi_ctype = _visatype.ViSession(self._vi) # case S110
13
+
sparameters_ctype = _get_ctypes_pointer_for_buffer(value=sparameters, library_type=_complextype.NIComplexNumber) # case B510
14
+
sparameters_array_size_ctype = _visatype.ViInt32(sparameters_array_size) # case S150
15
+
number_of_sparameters_ctype = _visatype.ViInt32() # case S220
16
+
number_of_ports_ctype = _visatype.ViInt32() # case S220
17
+
error_code = self._library.niRFSG_GetDeembeddingSparameters(vi_ctype, sparameters_ctype, sparameters_array_size_ctype, None if number_of_sparameters_ctype is None else (ctypes.pointer(number_of_sparameters_ctype)), None if number_of_ports_ctype is None else (ctypes.pointer(number_of_ports_ctype)))
0 commit comments