from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PointsCls:
"""
| Commands in total: 7
| Subgroups: 0
| Direct child commands: 7
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("points", core, parent)
[docs]
def get_arate(self) -> float:
"""
``ACQuire:POINts:ARATe`` \n
Snippet: ``value: float = driver.acquire.points.get_arate()`` \n
Retrieves the sample rate of the ADC, that is the number of points that are sampled by the ADC in one second.
:return: adc_sample_rate: 20 Gsample/s, R&S RTP with serial number ≥ 103000 in interleaved mode (2 channels) : 40 Gsample/s
"""
response = self._core.io.query_str_with_opc('ACQuire:POINts:ARATe?')
return Conversions.str_to_float(response)
# noinspection PyTypeChecker
[docs]
def get_auto(self) -> enums.RecLengthManual:
"""
``ACQuire:POINts:AUTO`` \n
Snippet: ``value: enums.RecLengthManual = driver.acquire.points.get_auto()`` \n
Selection to keep constant either the resolution or the record length when you adjust the time scale (method
``RsRtx.timebase.scale()`` ) or acquisition time (method ``RsRtx.timebase.range()`` ) .
:return: reclgth_manual: RESolution | RECLength \n
- RESolution: Resolution is kept constant. Set the required resolution value with ACQuire:RESolution.
- RECLength: The record length is kept constant. Set the required record length value with ACQuire:POINts[:VALue].
"""
response = self._core.io.query_str_with_opc('ACQuire:POINts:AUTO?')
return Conversions.str_to_scalar_enum(response, enums.RecLengthManual)
[docs]
def set_auto(self, reclgth_manual: enums.RecLengthManual) -> None:
"""
``ACQuire:POINts:AUTO`` \n
Snippet: ``driver.acquire.points.set_auto(reclgth_manual = enums.RecLengthManual.RECLength)`` \n
Selection to keep constant either the resolution or the record length when you adjust the time scale (method
``RsRtx.timebase.scale()`` ) or acquisition time (method ``RsRtx.timebase.range()`` ) .
:param reclgth_manual: RESolution | RECLength \n
- RESolution: Resolution is kept constant. Set the required resolution value with ACQuire:RESolution.
- RECLength: The record length is kept constant. Set the required record length value with ACQuire:POINts[:VALue].
"""
param = Conversions.enum_scalar_to_str(reclgth_manual, enums.RecLengthManual)
self._core.io.write_with_opc(f'ACQuire:POINts:AUTO {param}')
[docs]
def get_value(self) -> int:
"""
``ACQuire:POINts[:VALue]`` \n
Snippet: ``value: int = driver.acquire.points.get_value()`` \n
Indicates the record length, the number of recorded waveform points that build the waveform across the acquisition time.
[:VALue] can be omitted.
:return: record_length: Number of recorded waveform points.
"""
response = self._core.io.query_str_with_opc('ACQuire:POINts:VALue?')
return Conversions.str_to_int(response)
[docs]
def set_value(self, record_length: int) -> None:
"""
``ACQuire:POINts[:VALue]`` \n
Snippet: ``driver.acquire.points.set_value(record_length = 1)`` \n
Indicates the record length, the number of recorded waveform points that build the waveform across the acquisition time.
[:VALue] can be omitted.
:param record_length: Number of recorded waveform points.
"""
param = Conversions.decimal_value_to_str(record_length)
self._core.io.write_with_opc(f'ACQuire:POINts:VALue {param}')
[docs]
def get_dvalue(self) -> int:
"""
``ACQuire:POINts:DVALue`` \n
Snippet: ``value: int = driver.acquire.points.get_dvalue()`` \n
Returns the current digital record length used by each digital channel.
:return: dig_rec_len: 1000 to 200E+6
"""
response = self._core.io.query_str_with_opc('ACQuire:POINts:DVALue?')
return Conversions.str_to_int(response)
[docs]
def get_zvalue(self) -> int:
"""
``ACQuire:POINts:ZVALue`` \n
Snippet: ``value: int = driver.acquire.points.get_zvalue()`` \n
Returns the current record length used by the R&S RT-ZVCmulti-channel power probe channel.
:return: zui_rec_len: 1000 to 400E+6
"""
response = self._core.io.query_str_with_opc('ACQuire:POINts:ZVALue?')
return Conversions.str_to_int(response)
[docs]
def get_maximum(self) -> int:
"""
``ACQuire:POINts:MAXimum`` \n
Snippet: ``value: int = driver.acquire.points.get_maximum()`` \n
Sets a limit for the record length to prevent very large records. This value only takes effect if a constant resolution
is selected with method ``RsRtx.acquire.points.auto()`` . If you increase the time scale, the resolution remains constant
and the record length increases until the limit is reached. Further increase of the time scale changes the resolution and
keeps the record length limit.
:return: reclgth_lim: 1000 to 800 MSa. The actual maximum can be lower depending on the installed options, number of active channels, measurements and math waveforms.
"""
response = self._core.io.query_str_with_opc('ACQuire:POINts:MAXimum?')
return Conversions.str_to_int(response)
[docs]
def set_maximum(self, reclgth_lim: int) -> None:
"""
``ACQuire:POINts:MAXimum`` \n
Snippet: ``driver.acquire.points.set_maximum(reclgth_lim = 1)`` \n
Sets a limit for the record length to prevent very large records. This value only takes effect if a constant resolution
is selected with method ``RsRtx.acquire.points.auto()`` . If you increase the time scale, the resolution remains constant
and the record length increases until the limit is reached. Further increase of the time scale changes the resolution and
keeps the record length limit.
:param reclgth_lim: 1000 to 800 MSa. The actual maximum can be lower depending on the installed options, number of active channels, measurements and math waveforms.
"""
param = Conversions.decimal_value_to_str(reclgth_lim)
self._core.io.write_with_opc(f'ACQuire:POINts:MAXimum {param}')
[docs]
def get_aadjust(self) -> bool:
"""
``ACQuire:POINts:AADJust`` \n
Snippet: ``value: bool = driver.acquire.points.get_aadjust()`` \n
Prevents undersampling and ensures a sufficient resolution to acquire the correct waveform if the time scale is changed.
The setting takes effect if the changed parameter - resolution or record length - reaches a limit.
The instrument automatically keeps this parameter constant at its limit, and changes the other parameter regardless of
the method ``RsRtx.acquire.points.auto()`` setting.
:return: auto_adjust: OFF | ON
"""
response = self._core.io.query_str_with_opc('ACQuire:POINts:AADJust?')
return Conversions.str_to_bool(response)
[docs]
def set_aadjust(self, auto_adjust: bool) -> None:
"""
``ACQuire:POINts:AADJust`` \n
Snippet: ``driver.acquire.points.set_aadjust(auto_adjust = False)`` \n
Prevents undersampling and ensures a sufficient resolution to acquire the correct waveform if the time scale is changed.
The setting takes effect if the changed parameter - resolution or record length - reaches a limit.
The instrument automatically keeps this parameter constant at its limit, and changes the other parameter regardless of
the method ``RsRtx.acquire.points.auto()`` setting.
:param auto_adjust: OFF | ON
"""
param = Conversions.bool_to_str(auto_adjust)
self._core.io.write_with_opc(f'ACQuire:POINts:AADJust {param}')