Skip to content

Commit dd990bb

Browse files
committed
getsparameter cleanup
1 parent 88f4325 commit dd990bb

File tree

6 files changed

+120
-87
lines changed

6 files changed

+120
-87
lines changed

docs/nirfsg/class.rst

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,7 +1679,7 @@ get_deembedding_sparameters
16791679

16801680
.. py:currentmodule:: nirfsg.Session
16811681

1682-
.. py:method:: get_deembedding_sparameters(sparameters_array_size)
1682+
.. py:method:: get_deembedding_sparameters()
16831683

16841684
Returns the S-parameters used for de-embedding a measurement on the selected port.
16851685

@@ -1695,38 +1695,15 @@ get_deembedding_sparameters
16951695

16961696

16971697

1698-
:param sparameters_array_size:
1699-
1700-
1701-
Specifies the size of the array that is returned by the :py:attr:`nirfsg.Session.SPARAMETERS` output.
1702-
1703-
1704-
1705-
.. note:: One or more of the referenced properties are not in the Python API for this driver.
1706-
1707-
1708-
:type sparameters_array_size: int
1709-
1710-
:rtype: tuple (sparameters, number_of_ports)
1711-
1712-
WHERE
1713-
1714-
sparameters (list of NIComplexNumber):
1698+
:rtype: numpy.array(dtype=numpy.complex128)
1699+
:return:
17151700

17161701

17171702
Returns an array of S-parameters. The S-parameters are returned in the following order: s11, s12, s21, s22.
17181703

17191704

17201705

17211706

1722-
number_of_ports (int):
1723-
1724-
1725-
Returns the number of S-parameter ports. The **sparameter** array is always *n* x *n*, where span *n* is the number of ports.
1726-
1727-
1728-
1729-
17301707

17311708
get_error
17321709
---------
@@ -3108,7 +3085,7 @@ write_arb_waveform
31083085

31093086
Writes an arbitrary waveform to the NI-RFSG device starting at the position of the last data written in onboard memory.
31103087

3111-
This method accepts the complex baseband data in the form of numpy array of numpy.complex64 or numpy.complex128 or interleaved numpy array of numpy.int16. If the waveform to write is already allocated using the :py:meth:`nirfsg.Session.allocate_arb_waveform`, the **:py:attr:`nirfsg.Session.MORE_DATA_PENDING`** parameter is ignored. The PXI-5670/5671 must be in the Configuration state before you call this method. When streaming is enabled, you can call this method when the PXIe-5672/5673/5673E or PXIe-5820/5830/5831/5832/5840/5841/5842/5860 is in the Generation state.
3088+
This method accepts the complex baseband data in the form of numpy array of numpy.complex64 or numpy.complex128 or interleaved numpy array of numpy.int16. If the waveform to write is already allocated using the :py:meth:`nirfsg.Session.allocate_arb_waveform`, the more_data_pending parameter is ignored. The PXI-5670/5671 must be in the Configuration state before you call this method. When streaming is enabled, you can call this method when the PXIe-5672/5673/5673E or PXIe-5820/5830/5831/5832/5840/5841/5842/5860 is in the Generation state.
31123089

31133090
**Supported Devices** : PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860
31143091

@@ -3120,11 +3097,9 @@ write_arb_waveform
31203097

31213098

31223099

3123-
.. note:: On the PXIe-5644/5645/5646, PXIe-5672/5673/5673E, and PXIe-5820/5830/5831/5832/5840/5841/5842/5860, the **:py:attr:`nirfsg.Session.MORE_DATA_PENDING`** parameter is always ignored. To write data in blocks on these devices, you must allocate the waveform before writing it.
3100+
.. note:: On the PXIe-5644/5645/5646, PXIe-5672/5673/5673E, and PXIe-5820/5830/5831/5832/5840/5841/5842/5860, the more_data_pending parameter is always ignored. To write data in blocks on these devices, you must allocate the waveform before writing it.
31243101
If you are writing interleaved numpy array of numpy.int16, then this method only supports :py:data:`~nirfsg.PowerLevelType.PEAK` mode as specified in the :py:attr:`nirfsg.Session.power_level_type` property. If you download a waveform as interleaved numpy array of numpy.int16 when using this method, you cannot set the :py:attr:`nirfsg.Session.power_level_type` to :py:data:`~nirfsg.PowerLevelType.AVERAGE` without causing error in the output.
31253102

3126-
.. note:: One or more of the referenced properties are not in the Python API for this driver.
3127-
31283103

31293104

31303105
:param waveform_name:
@@ -3148,12 +3123,10 @@ write_arb_waveform
31483123
:param more_data_pending:
31493124

31503125

3151-
Specifies whether or not the data block contains the end of the waveform. Set this parameter to True to allow data to be appended later to the waveform. Splitting the waveform into multiple data blocks can reduce the memory requirements of the write operation. Append data to a previously written waveform by using the same waveform in the **name** parameter. Set **:py:attr:`nirfsg.Session.MORE_DATA_PENDING`** to False to indicate that this data block contains the end of the waveform. If the waveform is already allocated, this parameter is ignored.
3126+
Specifies whether or not the data block contains the end of the waveform. Set this parameter to True to allow data to be appended later to the waveform. Splitting the waveform into multiple data blocks can reduce the memory requirements of the write operation. Append data to a previously written waveform by using the same waveform in the **name** parameter. Set more_data_pending to False to indicate that this data block contains the end of the waveform. If the waveform is already allocated, this parameter is ignored.
31523127

31533128

31543129

3155-
.. note:: One or more of the referenced properties are not in the Python API for this driver.
3156-
31573130

31583131
:type more_data_pending: bool
31593132

generated/nirfsg/nirfsg/_library_interpreter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ def get_deembedding_sparameters(self, sparameters, sparameters_array_size): # n
494494
number_of_ports_ctype = _visatype.ViInt32() # case S220
495495
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)))
496496
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
497-
return int(number_of_ports_ctype.value)
497+
return int(number_of_sparameters_ctype.value), int(number_of_ports_ctype.value)
498498

499499
def get_deembedding_table_number_of_ports(self): # noqa: N802
500500
vi_ctype = _visatype.ViSession(self._vi) # case S110

0 commit comments

Comments
 (0)