nirfmxvna 26.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. nirfmxvna/__init__.py +106 -0
  2. nirfmxvna/attributes.py +2234 -0
  3. nirfmxvna/enums.py +1048 -0
  4. nirfmxvna/errors.py +96 -0
  5. nirfmxvna/examples/nirfmxvna_calibration_with_calset_save_two_port.py +186 -0
  6. nirfmxvna/examples/nirfmxvna_pulsed_s_params.py +174 -0
  7. nirfmxvna/examples/nirfmxvna_s_params_corrected_with_calset_load_two_port_grpc.py +234 -0
  8. nirfmxvna/examples/nirfmxvna_waves.py +174 -0
  9. nirfmxvna/grpc_session_options.py +64 -0
  10. nirfmxvna/internal/_custom_types.py +13 -0
  11. nirfmxvna/internal/_grpc_stub_interpreter.py +1757 -0
  12. nirfmxvna/internal/_helper.py +387 -0
  13. nirfmxvna/internal/_library.py +3790 -0
  14. nirfmxvna/internal/_library_interpreter.py +3011 -0
  15. nirfmxvna/internal/_library_singleton.py +53 -0
  16. nirfmxvna/internal/nidevice_pb2.py +37 -0
  17. nirfmxvna/internal/nidevice_pb2_grpc.py +3 -0
  18. nirfmxvna/internal/nirfmxvna_pb2.py +1094 -0
  19. nirfmxvna/internal/nirfmxvna_pb2_grpc.py +9990 -0
  20. nirfmxvna/internal/session_pb2.py +33 -0
  21. nirfmxvna/internal/session_pb2_grpc.py +3 -0
  22. nirfmxvna/iq.py +31 -0
  23. nirfmxvna/iq_configuration.py +290 -0
  24. nirfmxvna/iq_results.py +108 -0
  25. nirfmxvna/marker.py +31 -0
  26. nirfmxvna/marker_configuration.py +429 -0
  27. nirfmxvna/marker_results.py +168 -0
  28. nirfmxvna/s_params.py +31 -0
  29. nirfmxvna/s_params_configuration.py +1656 -0
  30. nirfmxvna/s_params_results.py +244 -0
  31. nirfmxvna/vna.py +12920 -0
  32. nirfmxvna/waves.py +31 -0
  33. nirfmxvna/waves_configuration.py +1255 -0
  34. nirfmxvna/waves_results.py +235 -0
  35. nirfmxvna-26.3.0.dist-info/METADATA +228 -0
  36. nirfmxvna-26.3.0.dist-info/RECORD +38 -0
  37. nirfmxvna-26.3.0.dist-info/WHEEL +4 -0
  38. nirfmxvna-26.3.0.dist-info/licenses/LICENSE +30 -0
@@ -0,0 +1,1255 @@
1
+ """Provides methods to configure the Waves measurement."""
2
+
3
+ import functools
4
+
5
+ import nirfmxvna.attributes as attributes
6
+ import nirfmxvna.enums as enums
7
+ import nirfmxvna.errors as errors
8
+ import nirfmxvna.internal._helper as _helper
9
+
10
+
11
+ def _raise_if_disposed(f):
12
+ """From https://stackoverflow.com/questions/5929107/decorators-with-parameters."""
13
+
14
+ @functools.wraps(f)
15
+ def aux(*xs, **kws):
16
+ meas_obj = xs[0] # parameter 0 is 'self' which is the measurement object
17
+ if meas_obj._signal_obj.is_disposed:
18
+ raise Exception("Cannot access a disposed Vna signal configuration")
19
+ return f(*xs, **kws)
20
+
21
+ return aux
22
+
23
+
24
+ class WavesConfiguration(object):
25
+ """Provides methods to configure the Waves measurement."""
26
+
27
+ def __init__(self, signal_obj):
28
+ """Provides methods to configure the Waves measurement."""
29
+ self._signal_obj = signal_obj
30
+ self._session_function_lock = signal_obj._session_function_lock
31
+ self._interpreter = signal_obj._interpreter
32
+
33
+ @_raise_if_disposed
34
+ def get_measurement_enabled(self, selector_string):
35
+ r"""Gets whether to enable the Waves measurement.
36
+
37
+ You do not need to use a selector string to configure or read this attribute for the default signal instance.
38
+ Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
39
+ information about the string syntax for named signals.
40
+
41
+ The default value is **False**.
42
+
43
+ Args:
44
+ selector_string (string):
45
+ Pass an empty string.
46
+
47
+ Returns:
48
+ Tuple (attr_val, error_code):
49
+
50
+ attr_val (bool):
51
+ Specifies whether to enable the Waves measurement.
52
+
53
+ error_code (int):
54
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
55
+ """
56
+ try:
57
+ self._session_function_lock.enter_read_lock()
58
+ updated_selector_string = _helper.validate_and_update_selector_string(
59
+ selector_string, self._signal_obj
60
+ )
61
+ attr_val, error_code = self._interpreter.get_attribute_i32(
62
+ updated_selector_string, attributes.AttributeID.WAVES_MEASUREMENT_ENABLED.value
63
+ )
64
+ attr_val = bool(attr_val)
65
+ finally:
66
+ self._session_function_lock.exit_read_lock()
67
+
68
+ return attr_val, error_code
69
+
70
+ @_raise_if_disposed
71
+ def set_measurement_enabled(self, selector_string, value):
72
+ r"""Sets whether to enable the Waves measurement.
73
+
74
+ You do not need to use a selector string to configure or read this attribute for the default signal instance.
75
+ Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
76
+ information about the string syntax for named signals.
77
+
78
+ The default value is **False**.
79
+
80
+ Args:
81
+ selector_string (string):
82
+ Pass an empty string.
83
+
84
+ value (bool):
85
+ Specifies whether to enable the Waves measurement.
86
+
87
+ Returns:
88
+ int:
89
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
90
+ """
91
+ try:
92
+ self._session_function_lock.enter_read_lock()
93
+ updated_selector_string = _helper.validate_and_update_selector_string(
94
+ selector_string, self._signal_obj
95
+ )
96
+ error_code = self._interpreter.set_attribute_i32(
97
+ updated_selector_string,
98
+ attributes.AttributeID.WAVES_MEASUREMENT_ENABLED.value,
99
+ int(value),
100
+ )
101
+ finally:
102
+ self._session_function_lock.exit_read_lock()
103
+
104
+ return error_code
105
+
106
+ @_raise_if_disposed
107
+ def get_number_of_waves(self, selector_string):
108
+ r"""Gets the number of waves to be measured.
109
+
110
+ If you increase this attribute value from N to N+K, then existing N Waves are not affected but K new Waves are
111
+ added. If you reduce number of Waves from N to N-K, then last K Waves are deleted without affecting the remaining N-K
112
+ Waves.
113
+ You do not need to use a selector string to configure or read this attribute for the default signal instance.
114
+ Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
115
+ information about the string syntax for named signals.
116
+
117
+ The default value is 1.
118
+
119
+ Args:
120
+ selector_string (string):
121
+ Pass an empty string.
122
+
123
+ Returns:
124
+ Tuple (attr_val, error_code):
125
+
126
+ attr_val (int):
127
+ Specifies the number of waves to be measured.
128
+
129
+ error_code (int):
130
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
131
+ """
132
+ try:
133
+ self._session_function_lock.enter_read_lock()
134
+ updated_selector_string = _helper.validate_and_update_selector_string(
135
+ selector_string, self._signal_obj
136
+ )
137
+ attr_val, error_code = self._interpreter.get_attribute_i32(
138
+ updated_selector_string, attributes.AttributeID.WAVES_NUMBER_OF_WAVES.value
139
+ )
140
+ finally:
141
+ self._session_function_lock.exit_read_lock()
142
+
143
+ return attr_val, error_code
144
+
145
+ @_raise_if_disposed
146
+ def set_number_of_waves(self, selector_string, value):
147
+ r"""Sets the number of waves to be measured.
148
+
149
+ If you increase this attribute value from N to N+K, then existing N Waves are not affected but K new Waves are
150
+ added. If you reduce number of Waves from N to N-K, then last K Waves are deleted without affecting the remaining N-K
151
+ Waves.
152
+ You do not need to use a selector string to configure or read this attribute for the default signal instance.
153
+ Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
154
+ information about the string syntax for named signals.
155
+
156
+ The default value is 1.
157
+
158
+ Args:
159
+ selector_string (string):
160
+ Pass an empty string.
161
+
162
+ value (int):
163
+ Specifies the number of waves to be measured.
164
+
165
+ Returns:
166
+ int:
167
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
168
+ """
169
+ try:
170
+ self._session_function_lock.enter_read_lock()
171
+ updated_selector_string = _helper.validate_and_update_selector_string(
172
+ selector_string, self._signal_obj
173
+ )
174
+ error_code = self._interpreter.set_attribute_i32(
175
+ updated_selector_string, attributes.AttributeID.WAVES_NUMBER_OF_WAVES.value, value
176
+ )
177
+ finally:
178
+ self._session_function_lock.exit_read_lock()
179
+
180
+ return error_code
181
+
182
+ @_raise_if_disposed
183
+ def get_receiver(self, selector_string):
184
+ r"""Gets whether to measure the wave on the reference receiver or the test receiver of the Wave Receiver Port.
185
+
186
+ Incident and scattered waves are denoted by "a_<*receiver port name*>_<*source port name*>" and "b_<*receiver
187
+ port name*>_<*source port name*>" respectively. On a receiver port, the a and b waves are measured using Reference
188
+ receiver and Test receiver respectively.
189
+
190
+ For example, to measure "b21", set this attribute to **Test (0)**,
191
+ :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_RECEIVER_PORT` to "port2" and
192
+ :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_SOURCE_PORT` to "port1".
193
+
194
+ Use "wave<*n*>" as the selector string to configure or read this attribute.
195
+
196
+ The default value is **Test**.
197
+
198
+ +---------------+----------------------------------------------+
199
+ | Name (Value) | Description |
200
+ +===============+==============================================+
201
+ | Test (0) | Measures the wave on the test receiver. |
202
+ +---------------+----------------------------------------------+
203
+ | Reference (1) | Measures the wave on the reference receiver. |
204
+ +---------------+----------------------------------------------+
205
+
206
+ Args:
207
+ selector_string (string):
208
+ Pass an empty string.
209
+
210
+ Returns:
211
+ Tuple (attr_val, error_code):
212
+
213
+ attr_val (enums.WavesReceiver):
214
+ Specifies whether to measure the wave on the reference receiver or the test receiver of the Wave Receiver Port.
215
+
216
+ error_code (int):
217
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
218
+ """
219
+ try:
220
+ self._session_function_lock.enter_read_lock()
221
+ updated_selector_string = _helper.validate_and_update_selector_string(
222
+ selector_string, self._signal_obj
223
+ )
224
+ attr_val, error_code = self._interpreter.get_attribute_i32(
225
+ updated_selector_string, attributes.AttributeID.WAVES_RECEIVER.value
226
+ )
227
+ attr_val = enums.WavesReceiver(attr_val)
228
+ except (KeyError, ValueError):
229
+ raise errors.DriverTooNewError() # type: ignore
230
+ finally:
231
+ self._session_function_lock.exit_read_lock()
232
+
233
+ return attr_val, error_code
234
+
235
+ @_raise_if_disposed
236
+ def set_receiver(self, selector_string, value):
237
+ r"""Sets whether to measure the wave on the reference receiver or the test receiver of the Wave Receiver Port.
238
+
239
+ Incident and scattered waves are denoted by "a_<*receiver port name*>_<*source port name*>" and "b_<*receiver
240
+ port name*>_<*source port name*>" respectively. On a receiver port, the a and b waves are measured using Reference
241
+ receiver and Test receiver respectively.
242
+
243
+ For example, to measure "b21", set this attribute to **Test (0)**,
244
+ :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_RECEIVER_PORT` to "port2" and
245
+ :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_SOURCE_PORT` to "port1".
246
+
247
+ Use "wave<*n*>" as the selector string to configure or read this attribute.
248
+
249
+ The default value is **Test**.
250
+
251
+ +---------------+----------------------------------------------+
252
+ | Name (Value) | Description |
253
+ +===============+==============================================+
254
+ | Test (0) | Measures the wave on the test receiver. |
255
+ +---------------+----------------------------------------------+
256
+ | Reference (1) | Measures the wave on the reference receiver. |
257
+ +---------------+----------------------------------------------+
258
+
259
+ Args:
260
+ selector_string (string):
261
+ Pass an empty string.
262
+
263
+ value (enums.WavesReceiver, int):
264
+ Specifies whether to measure the wave on the reference receiver or the test receiver of the Wave Receiver Port.
265
+
266
+ Returns:
267
+ int:
268
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
269
+ """
270
+ try:
271
+ self._session_function_lock.enter_read_lock()
272
+ updated_selector_string = _helper.validate_and_update_selector_string(
273
+ selector_string, self._signal_obj
274
+ )
275
+ value = value.value if type(value) is enums.WavesReceiver else value
276
+ error_code = self._interpreter.set_attribute_i32(
277
+ updated_selector_string, attributes.AttributeID.WAVES_RECEIVER.value, value
278
+ )
279
+ finally:
280
+ self._session_function_lock.exit_read_lock()
281
+
282
+ return error_code
283
+
284
+ @_raise_if_disposed
285
+ def get_receiver_port(self, selector_string):
286
+ r"""Gets the receiver port name for wave measurement.
287
+
288
+ Incident and scattered waves are denoted by "a_<*receiver port name*>_<*source port name*>" and "b_<*receiver
289
+ port name*>_<*source port name*>" respectively. On a receiver port, the a and b waves are measured using Reference
290
+ receiver and Test receiver respectively.
291
+
292
+ For example, to measure "b21", set :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_RECEIVER` to **Test (0)**,
293
+ set this attribute to "port2" and :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_SOURCE_PORT` to "port1".
294
+
295
+ Use "wave<*n*>" as the selector string to configure or read this attribute.
296
+
297
+ The default value is "port1".
298
+
299
+ Args:
300
+ selector_string (string):
301
+ Pass an empty string.
302
+
303
+ Returns:
304
+ Tuple (attr_val, error_code):
305
+
306
+ attr_val (string):
307
+ Specifies the receiver port name for wave measurement.
308
+
309
+ error_code (int):
310
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
311
+ """
312
+ try:
313
+ self._session_function_lock.enter_read_lock()
314
+ updated_selector_string = _helper.validate_and_update_selector_string(
315
+ selector_string, self._signal_obj
316
+ )
317
+ attr_val, error_code = self._interpreter.get_attribute_string(
318
+ updated_selector_string, attributes.AttributeID.WAVES_RECEIVER_PORT.value
319
+ )
320
+ finally:
321
+ self._session_function_lock.exit_read_lock()
322
+
323
+ return attr_val, error_code
324
+
325
+ @_raise_if_disposed
326
+ def set_receiver_port(self, selector_string, value):
327
+ r"""Sets the receiver port name for wave measurement.
328
+
329
+ Incident and scattered waves are denoted by "a_<*receiver port name*>_<*source port name*>" and "b_<*receiver
330
+ port name*>_<*source port name*>" respectively. On a receiver port, the a and b waves are measured using Reference
331
+ receiver and Test receiver respectively.
332
+
333
+ For example, to measure "b21", set :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_RECEIVER` to **Test (0)**,
334
+ set this attribute to "port2" and :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_SOURCE_PORT` to "port1".
335
+
336
+ Use "wave<*n*>" as the selector string to configure or read this attribute.
337
+
338
+ The default value is "port1".
339
+
340
+ Args:
341
+ selector_string (string):
342
+ Pass an empty string.
343
+
344
+ value (string):
345
+ Specifies the receiver port name for wave measurement.
346
+
347
+ Returns:
348
+ int:
349
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
350
+ """
351
+ try:
352
+ self._session_function_lock.enter_read_lock()
353
+ updated_selector_string = _helper.validate_and_update_selector_string(
354
+ selector_string, self._signal_obj
355
+ )
356
+ _helper.validate_not_none(value, "value")
357
+ error_code = self._interpreter.set_attribute_string(
358
+ updated_selector_string, attributes.AttributeID.WAVES_RECEIVER_PORT.value, value
359
+ )
360
+ finally:
361
+ self._session_function_lock.exit_read_lock()
362
+
363
+ return error_code
364
+
365
+ @_raise_if_disposed
366
+ def get_source_port(self, selector_string):
367
+ r"""Gets the source port name for wave measurement.
368
+
369
+ Incident and scattered waves are denoted by "a_<*receiver port name*>_<*source port name*>" and "b_<*receiver
370
+ port name*>_<*source port name*>" respectively. On a receiver port, the a and b waves are measured using Reference
371
+ receiver and Test receiver respectively.
372
+
373
+ For example, to measure "b21", set :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_RECEIVER` to **Test (0)**,
374
+ :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_RECEIVER_PORT` to "port2" and set this attribute to "port1".
375
+
376
+ Use "wave<*n*>" as the selector string to configure or read this attribute.
377
+
378
+ The default value is "port1".
379
+
380
+ Args:
381
+ selector_string (string):
382
+ Pass an empty string.
383
+
384
+ Returns:
385
+ Tuple (attr_val, error_code):
386
+
387
+ attr_val (string):
388
+ Specifies the source port name for wave measurement.
389
+
390
+ error_code (int):
391
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
392
+ """
393
+ try:
394
+ self._session_function_lock.enter_read_lock()
395
+ updated_selector_string = _helper.validate_and_update_selector_string(
396
+ selector_string, self._signal_obj
397
+ )
398
+ attr_val, error_code = self._interpreter.get_attribute_string(
399
+ updated_selector_string, attributes.AttributeID.WAVES_SOURCE_PORT.value
400
+ )
401
+ finally:
402
+ self._session_function_lock.exit_read_lock()
403
+
404
+ return attr_val, error_code
405
+
406
+ @_raise_if_disposed
407
+ def set_source_port(self, selector_string, value):
408
+ r"""Sets the source port name for wave measurement.
409
+
410
+ Incident and scattered waves are denoted by "a_<*receiver port name*>_<*source port name*>" and "b_<*receiver
411
+ port name*>_<*source port name*>" respectively. On a receiver port, the a and b waves are measured using Reference
412
+ receiver and Test receiver respectively.
413
+
414
+ For example, to measure "b21", set :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_RECEIVER` to **Test (0)**,
415
+ :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_RECEIVER_PORT` to "port2" and set this attribute to "port1".
416
+
417
+ Use "wave<*n*>" as the selector string to configure or read this attribute.
418
+
419
+ The default value is "port1".
420
+
421
+ Args:
422
+ selector_string (string):
423
+ Pass an empty string.
424
+
425
+ value (string):
426
+ Specifies the source port name for wave measurement.
427
+
428
+ Returns:
429
+ int:
430
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
431
+ """
432
+ try:
433
+ self._session_function_lock.enter_read_lock()
434
+ updated_selector_string = _helper.validate_and_update_selector_string(
435
+ selector_string, self._signal_obj
436
+ )
437
+ _helper.validate_not_none(value, "value")
438
+ error_code = self._interpreter.set_attribute_string(
439
+ updated_selector_string, attributes.AttributeID.WAVES_SOURCE_PORT.value, value
440
+ )
441
+ finally:
442
+ self._session_function_lock.exit_read_lock()
443
+
444
+ return error_code
445
+
446
+ @_raise_if_disposed
447
+ def get_format(self, selector_string):
448
+ r"""Gets the format for wave measurement.
449
+
450
+ Use "wave<*n*>" as the selector string to configure or read this attribute.
451
+
452
+ Use RFmxVNA Waves Fetch Y Data to fetch the waves.
453
+
454
+ The default value is **Magnitude**.
455
+
456
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
457
+ | Name (Value) | Description |
458
+ +======================+==========================================================================================================================+
459
+ | Magnitude (0) | Sets the format for the selected wave to Magnitude. You can specify Wave Magnitude Units. |
460
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
461
+ | Phase (1) | Sets the format of the selected wave to Phase. Phase values are expressed in degrees. Phase can be represented in |
462
+ | | various, mathematically equivalent ways such as phase wrapped between the range [-180, 180) degrees, or phase can be |
463
+ | | represented in an unwrapped manner. You can specify the phase representation by configuring Wave Phase Trace Type. |
464
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
465
+ | Complex (2) | Sets the format for the selected wave as complex numbers in cartesian co-ordinates. |
466
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
467
+ | SWR (3) | Sets the format for the selected wave to Standing Wave Ratio (SWR). SWR is a unitless quantity. |
468
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
469
+ | Smith Impedance (4) | Sets the format for the selected wave to Smith Impedance. The measured values of the wave are transformed into |
470
+ | | impedence values. Impedence values are expressed in ohms. You can use these values to plot on a Smith Chart. |
471
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
472
+ | Smith Admittance (5) | Sets the format for the selected wave to Smith Admittance. The measured values of the wave are transformed into |
473
+ | | admittance values. Admittance values are expressed in siemens. You can use these values to plot on an Inverted Smith |
474
+ | | Chart. |
475
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
476
+ | Polar (6) | Sets the format for the selected wave as complex numbers in polar co-ordinates, where the radial axis (i.e., magnitude |
477
+ | | of the complex numbers) is always in linear scale and angular axis (phase) is represented in degrees and always wrapped |
478
+ | | between ±180 deg. |
479
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
480
+ | Group Delay (7) | Sets the format of the selected wave to Group Delay. Group delay represents the time it takes for the signal to pass |
481
+ | | through a device under test. The delay is expressed in seconds. |
482
+ | | Group delay vs. frequency is derived from phase vs. frequency response. At a given frequency point, group delay is |
483
+ | | computed by selecting two nearby frequency points and taking the ratio of the phase difference to the frequency |
484
+ | | separation between them. The frequency separation between the two selected points is called the group delay aperture. |
485
+ | | You can control the aperture by first configuring Waves Group Delay Aperture Mode and once the mode is selected, you |
486
+ | | can set the aperture by configuring |
487
+ | | Waves Group Delay Aperture Points, Waves Group Delay Aperture Percentage or Waves Group Delay Aperture Frequency Span. |
488
+ | | For example, if the number of aperture points is equal to 3, then group delay at a nth frequency point is computed by |
489
+ | | selecting the (n-1)th frequency point and (n+1)th frequency point. |
490
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
491
+
492
+ Args:
493
+ selector_string (string):
494
+ Pass an empty string.
495
+
496
+ Returns:
497
+ Tuple (attr_val, error_code):
498
+
499
+ attr_val (enums.WavesFormat):
500
+ Specifies the format for wave measurement.
501
+
502
+ error_code (int):
503
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
504
+ """
505
+ try:
506
+ self._session_function_lock.enter_read_lock()
507
+ updated_selector_string = _helper.validate_and_update_selector_string(
508
+ selector_string, self._signal_obj
509
+ )
510
+ attr_val, error_code = self._interpreter.get_attribute_i32(
511
+ updated_selector_string, attributes.AttributeID.WAVES_FORMAT.value
512
+ )
513
+ attr_val = enums.WavesFormat(attr_val)
514
+ except (KeyError, ValueError):
515
+ raise errors.DriverTooNewError() # type: ignore
516
+ finally:
517
+ self._session_function_lock.exit_read_lock()
518
+
519
+ return attr_val, error_code
520
+
521
+ @_raise_if_disposed
522
+ def set_format(self, selector_string, value):
523
+ r"""Sets the format for wave measurement.
524
+
525
+ Use "wave<*n*>" as the selector string to configure or read this attribute.
526
+
527
+ Use RFmxVNA Waves Fetch Y Data to fetch the waves.
528
+
529
+ The default value is **Magnitude**.
530
+
531
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
532
+ | Name (Value) | Description |
533
+ +======================+==========================================================================================================================+
534
+ | Magnitude (0) | Sets the format for the selected wave to Magnitude. You can specify Wave Magnitude Units. |
535
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
536
+ | Phase (1) | Sets the format of the selected wave to Phase. Phase values are expressed in degrees. Phase can be represented in |
537
+ | | various, mathematically equivalent ways such as phase wrapped between the range [-180, 180) degrees, or phase can be |
538
+ | | represented in an unwrapped manner. You can specify the phase representation by configuring Wave Phase Trace Type. |
539
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
540
+ | Complex (2) | Sets the format for the selected wave as complex numbers in cartesian co-ordinates. |
541
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
542
+ | SWR (3) | Sets the format for the selected wave to Standing Wave Ratio (SWR). SWR is a unitless quantity. |
543
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
544
+ | Smith Impedance (4) | Sets the format for the selected wave to Smith Impedance. The measured values of the wave are transformed into |
545
+ | | impedence values. Impedence values are expressed in ohms. You can use these values to plot on a Smith Chart. |
546
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
547
+ | Smith Admittance (5) | Sets the format for the selected wave to Smith Admittance. The measured values of the wave are transformed into |
548
+ | | admittance values. Admittance values are expressed in siemens. You can use these values to plot on an Inverted Smith |
549
+ | | Chart. |
550
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
551
+ | Polar (6) | Sets the format for the selected wave as complex numbers in polar co-ordinates, where the radial axis (i.e., magnitude |
552
+ | | of the complex numbers) is always in linear scale and angular axis (phase) is represented in degrees and always wrapped |
553
+ | | between ±180 deg. |
554
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
555
+ | Group Delay (7) | Sets the format of the selected wave to Group Delay. Group delay represents the time it takes for the signal to pass |
556
+ | | through a device under test. The delay is expressed in seconds. |
557
+ | | Group delay vs. frequency is derived from phase vs. frequency response. At a given frequency point, group delay is |
558
+ | | computed by selecting two nearby frequency points and taking the ratio of the phase difference to the frequency |
559
+ | | separation between them. The frequency separation between the two selected points is called the group delay aperture. |
560
+ | | You can control the aperture by first configuring Waves Group Delay Aperture Mode and once the mode is selected, you |
561
+ | | can set the aperture by configuring |
562
+ | | Waves Group Delay Aperture Points, Waves Group Delay Aperture Percentage or Waves Group Delay Aperture Frequency Span. |
563
+ | | For example, if the number of aperture points is equal to 3, then group delay at a nth frequency point is computed by |
564
+ | | selecting the (n-1)th frequency point and (n+1)th frequency point. |
565
+ +----------------------+--------------------------------------------------------------------------------------------------------------------------+
566
+
567
+ Args:
568
+ selector_string (string):
569
+ Pass an empty string.
570
+
571
+ value (enums.WavesFormat, int):
572
+ Specifies the format for wave measurement.
573
+
574
+ Returns:
575
+ int:
576
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
577
+ """
578
+ try:
579
+ self._session_function_lock.enter_read_lock()
580
+ updated_selector_string = _helper.validate_and_update_selector_string(
581
+ selector_string, self._signal_obj
582
+ )
583
+ value = value.value if type(value) is enums.WavesFormat else value
584
+ error_code = self._interpreter.set_attribute_i32(
585
+ updated_selector_string, attributes.AttributeID.WAVES_FORMAT.value, value
586
+ )
587
+ finally:
588
+ self._session_function_lock.exit_read_lock()
589
+
590
+ return error_code
591
+
592
+ @_raise_if_disposed
593
+ def get_magnitude_units(self, selector_string):
594
+ r"""Gets the magnitude units for all waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT`
595
+ attribute is set to **Magnitude**.
596
+
597
+ You do not need to use a selector string to configure or read this attribute for the default signal instance.
598
+ Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
599
+ information about the string syntax for named signals.
600
+
601
+ The default value is **dBm**.
602
+
603
+ +--------------+--------------------------------------+
604
+ | Name (Value) | Description |
605
+ +==============+======================================+
606
+ | dBm (0) | Sets wave magnitude units to dBm. |
607
+ +--------------+--------------------------------------+
608
+ | dBmV (1) | Sets wave magnitude units to dBmV. |
609
+ +--------------+--------------------------------------+
610
+ | dBuV (2) | Sets wave magnitude units to dBuV. |
611
+ +--------------+--------------------------------------+
612
+ | dBmA (3) | Sets wave magnitude units to dBmA. |
613
+ +--------------+--------------------------------------+
614
+ | W (4) | Sets wave magnitude units to watts. |
615
+ +--------------+--------------------------------------+
616
+ | V (5) | Sets wave magnitude units to volts. |
617
+ +--------------+--------------------------------------+
618
+ | A (6) | Sets wave magnitude units to ampere. |
619
+ +--------------+--------------------------------------+
620
+
621
+ Args:
622
+ selector_string (string):
623
+ Pass an empty string.
624
+
625
+ Returns:
626
+ Tuple (attr_val, error_code):
627
+
628
+ attr_val (enums.WavesMagnitudeUnits):
629
+ Specifies the magnitude units for all waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT`
630
+ attribute is set to **Magnitude**.
631
+
632
+ error_code (int):
633
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
634
+ """
635
+ try:
636
+ self._session_function_lock.enter_read_lock()
637
+ updated_selector_string = _helper.validate_and_update_selector_string(
638
+ selector_string, self._signal_obj
639
+ )
640
+ attr_val, error_code = self._interpreter.get_attribute_i32(
641
+ updated_selector_string, attributes.AttributeID.WAVES_MAGNITUDE_UNITS.value
642
+ )
643
+ attr_val = enums.WavesMagnitudeUnits(attr_val)
644
+ except (KeyError, ValueError):
645
+ raise errors.DriverTooNewError() # type: ignore
646
+ finally:
647
+ self._session_function_lock.exit_read_lock()
648
+
649
+ return attr_val, error_code
650
+
651
+ @_raise_if_disposed
652
+ def set_magnitude_units(self, selector_string, value):
653
+ r"""Sets the magnitude units for all waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT`
654
+ attribute is set to **Magnitude**.
655
+
656
+ You do not need to use a selector string to configure or read this attribute for the default signal instance.
657
+ Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
658
+ information about the string syntax for named signals.
659
+
660
+ The default value is **dBm**.
661
+
662
+ +--------------+--------------------------------------+
663
+ | Name (Value) | Description |
664
+ +==============+======================================+
665
+ | dBm (0) | Sets wave magnitude units to dBm. |
666
+ +--------------+--------------------------------------+
667
+ | dBmV (1) | Sets wave magnitude units to dBmV. |
668
+ +--------------+--------------------------------------+
669
+ | dBuV (2) | Sets wave magnitude units to dBuV. |
670
+ +--------------+--------------------------------------+
671
+ | dBmA (3) | Sets wave magnitude units to dBmA. |
672
+ +--------------+--------------------------------------+
673
+ | W (4) | Sets wave magnitude units to watts. |
674
+ +--------------+--------------------------------------+
675
+ | V (5) | Sets wave magnitude units to volts. |
676
+ +--------------+--------------------------------------+
677
+ | A (6) | Sets wave magnitude units to ampere. |
678
+ +--------------+--------------------------------------+
679
+
680
+ Args:
681
+ selector_string (string):
682
+ Pass an empty string.
683
+
684
+ value (enums.WavesMagnitudeUnits, int):
685
+ Specifies the magnitude units for all waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT`
686
+ attribute is set to **Magnitude**.
687
+
688
+ Returns:
689
+ int:
690
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
691
+ """
692
+ try:
693
+ self._session_function_lock.enter_read_lock()
694
+ updated_selector_string = _helper.validate_and_update_selector_string(
695
+ selector_string, self._signal_obj
696
+ )
697
+ value = value.value if type(value) is enums.WavesMagnitudeUnits else value
698
+ error_code = self._interpreter.set_attribute_i32(
699
+ updated_selector_string, attributes.AttributeID.WAVES_MAGNITUDE_UNITS.value, value
700
+ )
701
+ finally:
702
+ self._session_function_lock.exit_read_lock()
703
+
704
+ return error_code
705
+
706
+ @_raise_if_disposed
707
+ def get_phase_trace_type(self, selector_string):
708
+ r"""Gets the phase type for all waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is
709
+ set to **Phase**. Phase can be represented in two mathematically equivalent ways viz. phase wrapped between the range
710
+ [-180, 180) degrees, and phase can be represented in an unwrapped manner.
711
+
712
+ You do not need to use a selector string to configure or read this attribute for the default signal instance.
713
+ Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
714
+ information about the string syntax for named signals.
715
+
716
+ The default value is **Wrapped**.
717
+
718
+ +---------------+--------------------------------------------------------------------------+
719
+ | Name (Value) | Description |
720
+ +===============+==========================================================================+
721
+ | Wrapped (0) | The reported wave phase is wrapped between -180 degress to +180 degrees. |
722
+ +---------------+--------------------------------------------------------------------------+
723
+ | Unwrapped (1) | The reported wave phase is unwrapped. |
724
+ +---------------+--------------------------------------------------------------------------+
725
+
726
+ Args:
727
+ selector_string (string):
728
+ Pass an empty string.
729
+
730
+ Returns:
731
+ Tuple (attr_val, error_code):
732
+
733
+ attr_val (enums.WavesPhaseTraceType):
734
+ Specifies the phase type for all waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is
735
+ set to **Phase**. Phase can be represented in two mathematically equivalent ways viz. phase wrapped between the range
736
+ [-180, 180) degrees, and phase can be represented in an unwrapped manner.
737
+
738
+ error_code (int):
739
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
740
+ """
741
+ try:
742
+ self._session_function_lock.enter_read_lock()
743
+ updated_selector_string = _helper.validate_and_update_selector_string(
744
+ selector_string, self._signal_obj
745
+ )
746
+ attr_val, error_code = self._interpreter.get_attribute_i32(
747
+ updated_selector_string, attributes.AttributeID.WAVES_PHASE_TRACE_TYPE.value
748
+ )
749
+ attr_val = enums.WavesPhaseTraceType(attr_val)
750
+ except (KeyError, ValueError):
751
+ raise errors.DriverTooNewError() # type: ignore
752
+ finally:
753
+ self._session_function_lock.exit_read_lock()
754
+
755
+ return attr_val, error_code
756
+
757
+ @_raise_if_disposed
758
+ def set_phase_trace_type(self, selector_string, value):
759
+ r"""Sets the phase type for all waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is
760
+ set to **Phase**. Phase can be represented in two mathematically equivalent ways viz. phase wrapped between the range
761
+ [-180, 180) degrees, and phase can be represented in an unwrapped manner.
762
+
763
+ You do not need to use a selector string to configure or read this attribute for the default signal instance.
764
+ Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
765
+ information about the string syntax for named signals.
766
+
767
+ The default value is **Wrapped**.
768
+
769
+ +---------------+--------------------------------------------------------------------------+
770
+ | Name (Value) | Description |
771
+ +===============+==========================================================================+
772
+ | Wrapped (0) | The reported wave phase is wrapped between -180 degress to +180 degrees. |
773
+ +---------------+--------------------------------------------------------------------------+
774
+ | Unwrapped (1) | The reported wave phase is unwrapped. |
775
+ +---------------+--------------------------------------------------------------------------+
776
+
777
+ Args:
778
+ selector_string (string):
779
+ Pass an empty string.
780
+
781
+ value (enums.WavesPhaseTraceType, int):
782
+ Specifies the phase type for all waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is
783
+ set to **Phase**. Phase can be represented in two mathematically equivalent ways viz. phase wrapped between the range
784
+ [-180, 180) degrees, and phase can be represented in an unwrapped manner.
785
+
786
+ Returns:
787
+ int:
788
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
789
+ """
790
+ try:
791
+ self._session_function_lock.enter_read_lock()
792
+ updated_selector_string = _helper.validate_and_update_selector_string(
793
+ selector_string, self._signal_obj
794
+ )
795
+ value = value.value if type(value) is enums.WavesPhaseTraceType else value
796
+ error_code = self._interpreter.set_attribute_i32(
797
+ updated_selector_string, attributes.AttributeID.WAVES_PHASE_TRACE_TYPE.value, value
798
+ )
799
+ finally:
800
+ self._session_function_lock.exit_read_lock()
801
+
802
+ return error_code
803
+
804
+ @_raise_if_disposed
805
+ def get_group_delay_aperture_mode(self, selector_string):
806
+ r"""Gets the aperture mode to be used for the computation of group delay for all waves for which
807
+ :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is set to **Group Delay**.
808
+
809
+ You do not need to use a selector string to configure or read this attribute for the default signal instance.
810
+ Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
811
+ information about the string syntax for named signals.
812
+
813
+ The default value is **Points**.
814
+
815
+ +--------------------+--------------------------------------------------------------------------------------------------------------------------+
816
+ | Name (Value) | Description |
817
+ +====================+==========================================================================================================================+
818
+ | Points (0) | Sets group delay aperture mode to Points. You can specify the aperture in terms of the number of frequency points by |
819
+ | | configuring Waves Group Delay Aperture Points. |
820
+ +--------------------+--------------------------------------------------------------------------------------------------------------------------+
821
+ | Percentage (1) | Sets group delay aperture mode to Percentage. You can specify the aperture in terms of the frequency separation |
822
+ | | expressed in percentage by configuring Waves Group Delay Aperture Percentage. |
823
+ +--------------------+--------------------------------------------------------------------------------------------------------------------------+
824
+ | Frequency Span (2) | Sets group delay aperture to Frequency Span. You can specify the aperture in terms of the frequency separation by |
825
+ | | configuring Waves Group Delay Aperture Frequency Span. |
826
+ +--------------------+--------------------------------------------------------------------------------------------------------------------------+
827
+
828
+ Args:
829
+ selector_string (string):
830
+ Pass an empty string.
831
+
832
+ Returns:
833
+ Tuple (attr_val, error_code):
834
+
835
+ attr_val (enums.WavesGroupDelayApertureMode):
836
+ Specifies the aperture mode to be used for the computation of group delay for all waves for which
837
+ :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is set to **Group Delay**.
838
+
839
+ error_code (int):
840
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
841
+ """
842
+ try:
843
+ self._session_function_lock.enter_read_lock()
844
+ updated_selector_string = _helper.validate_and_update_selector_string(
845
+ selector_string, self._signal_obj
846
+ )
847
+ attr_val, error_code = self._interpreter.get_attribute_i32(
848
+ updated_selector_string,
849
+ attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_MODE.value,
850
+ )
851
+ attr_val = enums.WavesGroupDelayApertureMode(attr_val)
852
+ except (KeyError, ValueError):
853
+ raise errors.DriverTooNewError() # type: ignore
854
+ finally:
855
+ self._session_function_lock.exit_read_lock()
856
+
857
+ return attr_val, error_code
858
+
859
+ @_raise_if_disposed
860
+ def set_group_delay_aperture_mode(self, selector_string, value):
861
+ r"""Sets the aperture mode to be used for the computation of group delay for all waves for which
862
+ :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is set to **Group Delay**.
863
+
864
+ You do not need to use a selector string to configure or read this attribute for the default signal instance.
865
+ Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
866
+ information about the string syntax for named signals.
867
+
868
+ The default value is **Points**.
869
+
870
+ +--------------------+--------------------------------------------------------------------------------------------------------------------------+
871
+ | Name (Value) | Description |
872
+ +====================+==========================================================================================================================+
873
+ | Points (0) | Sets group delay aperture mode to Points. You can specify the aperture in terms of the number of frequency points by |
874
+ | | configuring Waves Group Delay Aperture Points. |
875
+ +--------------------+--------------------------------------------------------------------------------------------------------------------------+
876
+ | Percentage (1) | Sets group delay aperture mode to Percentage. You can specify the aperture in terms of the frequency separation |
877
+ | | expressed in percentage by configuring Waves Group Delay Aperture Percentage. |
878
+ +--------------------+--------------------------------------------------------------------------------------------------------------------------+
879
+ | Frequency Span (2) | Sets group delay aperture to Frequency Span. You can specify the aperture in terms of the frequency separation by |
880
+ | | configuring Waves Group Delay Aperture Frequency Span. |
881
+ +--------------------+--------------------------------------------------------------------------------------------------------------------------+
882
+
883
+ Args:
884
+ selector_string (string):
885
+ Pass an empty string.
886
+
887
+ value (enums.WavesGroupDelayApertureMode, int):
888
+ Specifies the aperture mode to be used for the computation of group delay for all waves for which
889
+ :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is set to **Group Delay**.
890
+
891
+ Returns:
892
+ int:
893
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
894
+ """
895
+ try:
896
+ self._session_function_lock.enter_read_lock()
897
+ updated_selector_string = _helper.validate_and_update_selector_string(
898
+ selector_string, self._signal_obj
899
+ )
900
+ value = value.value if type(value) is enums.WavesGroupDelayApertureMode else value
901
+ error_code = self._interpreter.set_attribute_i32(
902
+ updated_selector_string,
903
+ attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_MODE.value,
904
+ value,
905
+ )
906
+ finally:
907
+ self._session_function_lock.exit_read_lock()
908
+
909
+ return error_code
910
+
911
+ @_raise_if_disposed
912
+ def get_group_delay_aperture_points(self, selector_string):
913
+ r"""Gets the group delay aperture in terms of the number of frequency points that separates the two frequency points
914
+ for all waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is set to **Group Delay**
915
+ and :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_MODE` attribute is set to **Points**. You
916
+ must set the value of this attribute between 2 and the total number of frequency points in the measurement frequency
917
+ range.
918
+
919
+ You do not need to use a selector string to configure or read this attribute for the default signal instance.
920
+ Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
921
+ information about the string syntax for named signals.
922
+
923
+ The default value is 11.
924
+
925
+ Args:
926
+ selector_string (string):
927
+ Pass an empty string.
928
+
929
+ Returns:
930
+ Tuple (attr_val, error_code):
931
+
932
+ attr_val (float):
933
+ Specifies the group delay aperture in terms of the number of frequency points that separates the two frequency points
934
+ for all waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is set to **Group Delay**
935
+ and :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_MODE` attribute is set to **Points**. You
936
+ must set the value of this attribute between 2 and the total number of frequency points in the measurement frequency
937
+ range.
938
+
939
+ error_code (int):
940
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
941
+ """
942
+ try:
943
+ self._session_function_lock.enter_read_lock()
944
+ updated_selector_string = _helper.validate_and_update_selector_string(
945
+ selector_string, self._signal_obj
946
+ )
947
+ attr_val, error_code = self._interpreter.get_attribute_f64(
948
+ updated_selector_string,
949
+ attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_POINTS.value,
950
+ )
951
+ finally:
952
+ self._session_function_lock.exit_read_lock()
953
+
954
+ return attr_val, error_code
955
+
956
+ @_raise_if_disposed
957
+ def set_group_delay_aperture_points(self, selector_string, value):
958
+ r"""Sets the group delay aperture in terms of the number of frequency points that separates the two frequency points
959
+ for all waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is set to **Group Delay**
960
+ and :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_MODE` attribute is set to **Points**. You
961
+ must set the value of this attribute between 2 and the total number of frequency points in the measurement frequency
962
+ range.
963
+
964
+ You do not need to use a selector string to configure or read this attribute for the default signal instance.
965
+ Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
966
+ information about the string syntax for named signals.
967
+
968
+ The default value is 11.
969
+
970
+ Args:
971
+ selector_string (string):
972
+ Pass an empty string.
973
+
974
+ value (float):
975
+ Specifies the group delay aperture in terms of the number of frequency points that separates the two frequency points
976
+ for all waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is set to **Group Delay**
977
+ and :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_MODE` attribute is set to **Points**. You
978
+ must set the value of this attribute between 2 and the total number of frequency points in the measurement frequency
979
+ range.
980
+
981
+ Returns:
982
+ int:
983
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
984
+ """
985
+ try:
986
+ self._session_function_lock.enter_read_lock()
987
+ updated_selector_string = _helper.validate_and_update_selector_string(
988
+ selector_string, self._signal_obj
989
+ )
990
+ error_code = self._interpreter.set_attribute_f64(
991
+ updated_selector_string,
992
+ attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_POINTS.value,
993
+ value,
994
+ )
995
+ finally:
996
+ self._session_function_lock.exit_read_lock()
997
+
998
+ return error_code
999
+
1000
+ @_raise_if_disposed
1001
+ def get_group_delay_aperture_percentage(self, selector_string):
1002
+ r"""Gets the group delay aperture in terms of the frequency separation between the two frequency points selected for
1003
+ group delay computation, where separation is expressed as a percentage of the total measurement frequency range for all
1004
+ waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is set to **Group Delay** and
1005
+ :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_MODE` attribute is set to **Percentage**.
1006
+
1007
+ You do not need to use a selector string to configure or read this attribute for the default signal instance.
1008
+ Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
1009
+ information about the string syntax for named signals.
1010
+
1011
+ The default value is 5 %.
1012
+
1013
+ Args:
1014
+ selector_string (string):
1015
+ Pass an empty string.
1016
+
1017
+ Returns:
1018
+ Tuple (attr_val, error_code):
1019
+
1020
+ attr_val (float):
1021
+ Specifies the group delay aperture in terms of the frequency separation between the two frequency points selected for
1022
+ group delay computation, where separation is expressed as a percentage of the total measurement frequency range for all
1023
+ waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is set to **Group Delay** and
1024
+ :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_MODE` attribute is set to **Percentage**.
1025
+
1026
+ error_code (int):
1027
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
1028
+ """
1029
+ try:
1030
+ self._session_function_lock.enter_read_lock()
1031
+ updated_selector_string = _helper.validate_and_update_selector_string(
1032
+ selector_string, self._signal_obj
1033
+ )
1034
+ attr_val, error_code = self._interpreter.get_attribute_f64(
1035
+ updated_selector_string,
1036
+ attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_PERCENTAGE.value,
1037
+ )
1038
+ finally:
1039
+ self._session_function_lock.exit_read_lock()
1040
+
1041
+ return attr_val, error_code
1042
+
1043
+ @_raise_if_disposed
1044
+ def set_group_delay_aperture_percentage(self, selector_string, value):
1045
+ r"""Sets the group delay aperture in terms of the frequency separation between the two frequency points selected for
1046
+ group delay computation, where separation is expressed as a percentage of the total measurement frequency range for all
1047
+ waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is set to **Group Delay** and
1048
+ :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_MODE` attribute is set to **Percentage**.
1049
+
1050
+ You do not need to use a selector string to configure or read this attribute for the default signal instance.
1051
+ Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
1052
+ information about the string syntax for named signals.
1053
+
1054
+ The default value is 5 %.
1055
+
1056
+ Args:
1057
+ selector_string (string):
1058
+ Pass an empty string.
1059
+
1060
+ value (float):
1061
+ Specifies the group delay aperture in terms of the frequency separation between the two frequency points selected for
1062
+ group delay computation, where separation is expressed as a percentage of the total measurement frequency range for all
1063
+ waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is set to **Group Delay** and
1064
+ :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_MODE` attribute is set to **Percentage**.
1065
+
1066
+ Returns:
1067
+ int:
1068
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
1069
+ """
1070
+ try:
1071
+ self._session_function_lock.enter_read_lock()
1072
+ updated_selector_string = _helper.validate_and_update_selector_string(
1073
+ selector_string, self._signal_obj
1074
+ )
1075
+ error_code = self._interpreter.set_attribute_f64(
1076
+ updated_selector_string,
1077
+ attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_PERCENTAGE.value,
1078
+ value,
1079
+ )
1080
+ finally:
1081
+ self._session_function_lock.exit_read_lock()
1082
+
1083
+ return error_code
1084
+
1085
+ @_raise_if_disposed
1086
+ def get_group_delay_aperture_frequency_span(self, selector_string):
1087
+ r"""Gets the group delay aperture in terms of the frequency separation between the two frequency points selected for
1088
+ group delay computation for all waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is
1089
+ set to **Group Delay** and :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_MODE` attribute is
1090
+ set to **Frequency Span**.
1091
+
1092
+ You do not need to use a selector string to configure or read this attribute for the default signal instance.
1093
+ Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
1094
+ information about the string syntax for named signals.
1095
+
1096
+ The default value is 50 MHz.
1097
+
1098
+ Args:
1099
+ selector_string (string):
1100
+ Pass an empty string.
1101
+
1102
+ Returns:
1103
+ Tuple (attr_val, error_code):
1104
+
1105
+ attr_val (float):
1106
+ Specifies the group delay aperture in terms of the frequency separation between the two frequency points selected for
1107
+ group delay computation for all waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is
1108
+ set to **Group Delay** and :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_MODE` attribute is
1109
+ set to **Frequency Span**.
1110
+
1111
+ error_code (int):
1112
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
1113
+ """
1114
+ try:
1115
+ self._session_function_lock.enter_read_lock()
1116
+ updated_selector_string = _helper.validate_and_update_selector_string(
1117
+ selector_string, self._signal_obj
1118
+ )
1119
+ attr_val, error_code = self._interpreter.get_attribute_f64(
1120
+ updated_selector_string,
1121
+ attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_FREQUENCY_SPAN.value,
1122
+ )
1123
+ finally:
1124
+ self._session_function_lock.exit_read_lock()
1125
+
1126
+ return attr_val, error_code
1127
+
1128
+ @_raise_if_disposed
1129
+ def set_group_delay_aperture_frequency_span(self, selector_string, value):
1130
+ r"""Sets the group delay aperture in terms of the frequency separation between the two frequency points selected for
1131
+ group delay computation for all waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is
1132
+ set to **Group Delay** and :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_MODE` attribute is
1133
+ set to **Frequency Span**.
1134
+
1135
+ You do not need to use a selector string to configure or read this attribute for the default signal instance.
1136
+ Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
1137
+ information about the string syntax for named signals.
1138
+
1139
+ The default value is 50 MHz.
1140
+
1141
+ Args:
1142
+ selector_string (string):
1143
+ Pass an empty string.
1144
+
1145
+ value (float):
1146
+ Specifies the group delay aperture in terms of the frequency separation between the two frequency points selected for
1147
+ group delay computation for all waves for which :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_FORMAT` attribute is
1148
+ set to **Group Delay** and :py:attr:`~nirfmxvna.attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_MODE` attribute is
1149
+ set to **Frequency Span**.
1150
+
1151
+ Returns:
1152
+ int:
1153
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
1154
+ """
1155
+ try:
1156
+ self._session_function_lock.enter_read_lock()
1157
+ updated_selector_string = _helper.validate_and_update_selector_string(
1158
+ selector_string, self._signal_obj
1159
+ )
1160
+ error_code = self._interpreter.set_attribute_f64(
1161
+ updated_selector_string,
1162
+ attributes.AttributeID.WAVES_GROUP_DELAY_APERTURE_FREQUENCY_SPAN.value,
1163
+ value,
1164
+ )
1165
+ finally:
1166
+ self._session_function_lock.exit_read_lock()
1167
+
1168
+ return error_code
1169
+
1170
+ @_raise_if_disposed
1171
+ def configure_wave(self, selector_string, wave):
1172
+ r"""Configures the wave to be measured in format a<*receiver port number*><*source port number*> or b<*receiver port
1173
+ number*><*source port number*>, where 'a' specifies that the receiver is reference receiver and 'b' specifies that the
1174
+ receiver is test receiver.
1175
+
1176
+ Use "wave<*n*>" as the selector string to configure this method.
1177
+
1178
+ **Supported devices**: NI PXIe-5633
1179
+
1180
+ Args:
1181
+ selector_string (string):
1182
+ This parameter specifies a selector string comprising of result name, and wave number. "wave0"
1183
+
1184
+ "signal::sig1/wave0"
1185
+
1186
+ "result::r1/wave0"
1187
+
1188
+ "signal::sig1/result::r1/wave0"
1189
+
1190
+ You can use the :py:meth:`build_wave_string` method to build the selector string.
1191
+
1192
+ wave (string):
1193
+ This parameter specifies the wave to be measured in format a<*receiver port number*><*source port number*> or
1194
+ b<*receiver port number*><*source port number*>, where 'a' specifies that the receiver is reference receiver and 'b'
1195
+ specifies that the receiver is test receiver.
1196
+
1197
+ Returns:
1198
+ int:
1199
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
1200
+ """
1201
+ try:
1202
+ self._session_function_lock.enter_read_lock()
1203
+ _helper.validate_not_none(selector_string, "selector_string")
1204
+ _helper.validate_not_none(wave, "wave")
1205
+ updated_selector_string = _helper.validate_and_update_selector_string(
1206
+ selector_string, self._signal_obj
1207
+ )
1208
+ error_code = self._interpreter.waves_configure_wave(updated_selector_string, wave)
1209
+ finally:
1210
+ self._session_function_lock.exit_read_lock()
1211
+
1212
+ return error_code
1213
+
1214
+ @_raise_if_disposed
1215
+ def get_wave(self, selector_string):
1216
+ r"""Returns the wave being measured in format a(receiver port number)(source port number) or b(receiver port number)(source port number), where "a" specifies that the receiver is reference receiver and "b" specifies that the receiver is test receiver.
1217
+
1218
+ Use "wave(n)" as the selector string for this method.
1219
+
1220
+ **Supported devices**: NI PXIe-5633
1221
+
1222
+ Args:
1223
+ selector_string (string):
1224
+ This parameter specifies a selector string comprising of result name, and wave number. \"wave0\"
1225
+
1226
+ \"signal::sig1/wave0\"
1227
+
1228
+ \"result::r1/wave0\"
1229
+
1230
+ \"signal::sig1/result::r1/wave0\"
1231
+
1232
+ You can use the :py:meth:`build_wave_string` method to build the selector string.
1233
+
1234
+ Returns:
1235
+ Tuple (wave, error_code):
1236
+
1237
+ wave (string):
1238
+ This parameter returns the wave being measured in format a<*receiver port number*><*source port number*> or b<*receiver
1239
+ port number*><*source port number*>, where "a" specifies that the receiver is reference receiver and "b" specifies that
1240
+ the receiver is test receiver.
1241
+
1242
+ error_code (int):
1243
+ Returns the status code of this method. The status code either indicates success or describes a warning condition.
1244
+ """
1245
+ try:
1246
+ self._session_function_lock.enter_read_lock()
1247
+ _helper.validate_not_none(selector_string, "selector_string")
1248
+ updated_selector_string = _helper.validate_and_update_selector_string(
1249
+ selector_string, self._signal_obj
1250
+ )
1251
+ wave, error_code = self._interpreter.get_wave(updated_selector_string)
1252
+ finally:
1253
+ self._session_function_lock.exit_read_lock()
1254
+
1255
+ return wave, error_code