from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class FrequencyCls:
"""
| Commands in total: 36
| Subgroups: 6
| Direct child commands: 9
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("frequency", core, parent)
@property
def converter(self):
"""
| Commands in total: 16
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_converter'):
from .Converter import ConverterCls
self._converter = ConverterCls(self._core, self._cmd_group)
return self._converter
@property
def loscillator(self):
"""
| Commands in total: 4
| Subgroups: 2
| Direct child commands: 1
"""
if not hasattr(self, '_loscillator'):
from .Loscillator import LoscillatorCls
self._loscillator = LoscillatorCls(self._core, self._cmd_group)
return self._loscillator
@property
def pll(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_pll'):
from .Pll import PllCls
self._pll = PllCls(self._core, self._cmd_group)
return self._pll
@property
def step(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_step'):
from .Step import StepCls
self._step = StepCls(self._core, self._cmd_group)
return self._step
@property
def cw(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_cw'):
from .Cw import CwCls
self._cw = CwCls(self._core, self._cmd_group)
return self._cw
@property
def fixed(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_fixed'):
from .Fixed import FixedCls
self._fixed = FixedCls(self._core, self._cmd_group)
return self._fixed
[docs]
def get_center(self) -> float:
"""
``[SOURce<HW>]:FREQuency:CENTer`` \n
Snippet: ``value: float = driver.source.frequency.get_center()`` \n
Sets the center frequency of the sweep. The maximum value depends on the installed hardware options. For more information,
refer to the specifications document.
:return: center: float Range: 300 kHz to depends on options, Unit: Hz
"""
response = self._core.io.query_str('SOURce<HwInstance>:FREQuency:CENTer?')
return Conversions.str_to_float(response)
[docs]
def set_center(self, center: float) -> None:
"""
``[SOURce<HW>]:FREQuency:CENTer`` \n
Snippet: ``driver.source.frequency.set_center(center = 1.0)`` \n
Sets the center frequency of the sweep. The maximum value depends on the installed hardware options. For more information,
refer to the specifications document.
:param center: float Range: 300 kHz to depends on options, Unit: Hz
"""
param = Conversions.decimal_value_to_str(center)
self._core.io.write(f'SOURce<HwInstance>:FREQuency:CENTer {param}')
[docs]
def get_frequency(self) -> float:
"""
``[SOURce<HW>]:FREQuency:FREQuency`` \n
Snippet: ``value: float = driver.source.frequency.get_frequency()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:FREQuency:FREQuency?')
return Conversions.str_to_float(response)
[docs]
def set_frequency(self, frequency: float) -> None:
"""
``[SOURce<HW>]:FREQuency:FREQuency`` \n
Snippet: ``driver.source.frequency.set_frequency(frequency = 1.0)`` \n
No help available
"""
param = Conversions.decimal_value_to_str(frequency)
self._core.io.write(f'SOURce<HwInstance>:FREQuency:FREQuency {param}')
[docs]
def get_manual(self) -> float:
"""
``[SOURce<HW>]:FREQuency:MANual`` \n
Snippet: ``value: float = driver.source.frequency.get_manual()`` \n
Sets the frequency and triggers a sweep step manually if SWEep:MODE MAN.
:return: manual: float You can select any frequency within the setting range, where: STARt is set with method ``RsSmw.source.frequency.start()`` STOP is set with method ``RsSmw.source.frequency.stop()`` OFFSet is set with method ``RsSmw.source.frequency.offset()`` Range: (STARt + OFFSet) to (STOP + OFFSet) , Unit: Hz
"""
response = self._core.io.query_str('SOURce<HwInstance>:FREQuency:MANual?')
return Conversions.str_to_float(response)
[docs]
def set_manual(self, manual: float) -> None:
"""
``[SOURce<HW>]:FREQuency:MANual`` \n
Snippet: ``driver.source.frequency.set_manual(manual = 1.0)`` \n
Sets the frequency and triggers a sweep step manually if SWEep:MODE MAN.
:param manual: float You can select any frequency within the setting range, where: STARt is set with method ``RsSmw.source.frequency.start()`` STOP is set with method ``RsSmw.source.frequency.stop()`` OFFSet is set with method ``RsSmw.source.frequency.offset()`` Range: (STARt + OFFSet) to (STOP + OFFSet) , Unit: Hz
"""
param = Conversions.decimal_value_to_str(manual)
self._core.io.write(f'SOURce<HwInstance>:FREQuency:MANual {param}')
# noinspection PyTypeChecker
[docs]
def get_mode(self) -> enums.FreqMode:
"""
``[SOURce<HW>]:FREQuency:MODE`` \n
Snippet: ``value: enums.FreqMode = driver.source.frequency.get_mode()`` \n
Sets the frequency mode for generating the RF output signal. The selected mode determines the parameters to be used for
further frequency settings.
:return: mode: CW | FIXed | SWEep | LIST CW | FIXed Sets the fixed frequency mode. CW and FIXed are synonyms. The instrument operates at a defined frequency, set with command method ``RsSmw.source.frequency.cw.value()`` . SWEep Sets sweep mode. The instrument processes frequency (and level) settings in defined sweep steps. Set the range and current frequency with the commands: method ``RsSmw.source.frequency.start()`` and method ``RsSmw.source.frequency.stop()`` , method ``RsSmw.source.frequency.center()`` , method ``RsSmw.source.frequency.span()`` , method ``RsSmw.source.frequency.manual()`` LIST Sets list mode. The instrument processes frequency and level settings by means of values loaded from a list. To configure list mode settings, use the commands of the 'SOURce:LIST subsystem'.
"""
response = self._core.io.query_str('SOURce<HwInstance>:FREQuency:MODE?')
return Conversions.str_to_scalar_enum(response, enums.FreqMode)
[docs]
def set_mode(self, mode: enums.FreqMode) -> None:
"""
``[SOURce<HW>]:FREQuency:MODE`` \n
Snippet: ``driver.source.frequency.set_mode(mode = enums.FreqMode.COMBined)`` \n
Sets the frequency mode for generating the RF output signal. The selected mode determines the parameters to be used for
further frequency settings.
:param mode: CW | FIXed | SWEep | LIST CW | FIXed Sets the fixed frequency mode. CW and FIXed are synonyms. The instrument operates at a defined frequency, set with command method ``RsSmw.source.frequency.cw.value()`` . SWEep Sets sweep mode. The instrument processes frequency (and level) settings in defined sweep steps. Set the range and current frequency with the commands: method ``RsSmw.source.frequency.start()`` and method ``RsSmw.source.frequency.stop()`` , method ``RsSmw.source.frequency.center()`` , method ``RsSmw.source.frequency.span()`` , method ``RsSmw.source.frequency.manual()`` LIST Sets list mode. The instrument processes frequency and level settings by means of values loaded from a list. To configure list mode settings, use the commands of the 'SOURce:LIST subsystem'.
"""
param = Conversions.enum_scalar_to_str(mode, enums.FreqMode)
self._core.io.write(f'SOURce<HwInstance>:FREQuency:MODE {param}')
[docs]
def get_multiplier(self) -> float:
"""
``[SOURce<HW>]:FREQuency:MULTiplier`` \n
Snippet: ``value: float = driver.source.frequency.get_multiplier()`` \n
Sets the multiplication factor NFREQ:MULT of a subsequent downstream instrument. The parameters offset fFREQ:OFFSer and
multiplier NFREQ:MULT affect the frequency value set with the method ``RsSmw.source.frequency.cw.value()`` . The query
method ``RsSmw.source.frequency.cw.value()`` returns the value corresponding to the formula: fFREQ = fRFout * NFREQ:MULT
+ fFREQ:OFFSer See 'Displayed RF frequency and level values with downstream instruments'.
:return: multiplier: float Range: -10000 to 10000
"""
response = self._core.io.query_str('SOURce<HwInstance>:FREQuency:MULTiplier?')
return Conversions.str_to_float(response)
[docs]
def set_multiplier(self, multiplier: float) -> None:
"""
``[SOURce<HW>]:FREQuency:MULTiplier`` \n
Snippet: ``driver.source.frequency.set_multiplier(multiplier = 1.0)`` \n
Sets the multiplication factor NFREQ:MULT of a subsequent downstream instrument. The parameters offset fFREQ:OFFSer and
multiplier NFREQ:MULT affect the frequency value set with the method ``RsSmw.source.frequency.cw.value()`` . The query
method ``RsSmw.source.frequency.cw.value()`` returns the value corresponding to the formula: fFREQ = fRFout * NFREQ:MULT
+ fFREQ:OFFSer See 'Displayed RF frequency and level values with downstream instruments'.
:param multiplier: float Range: -10000 to 10000
"""
param = Conversions.decimal_value_to_str(multiplier)
self._core.io.write(f'SOURce<HwInstance>:FREQuency:MULTiplier {param}')
[docs]
def get_offset(self) -> float:
"""
``[SOURce<HW>]:FREQuency:OFFSet`` \n
Snippet: ``value: float = driver.source.frequency.get_offset()`` \n
Sets the frequency offset fFREQ:OFFSet of a downstream instrument. The parameters offset fFREQ:OFFSer and multiplier
NFREQ:MULT affect the frequency value set with the method ``RsSmw.source.frequency.cw.value()`` . The query method
``RsSmw.source.frequency.cw.value()`` returns the value corresponding to the formula: fFREQ = fRFout * NFREQ:MULT +
fFREQ:OFFSer See 'Displayed RF frequency and level values with downstream instruments'. Note: The offset also affects RF
frequency sweep.
:return: offset: float
"""
response = self._core.io.query_str('SOURce<HwInstance>:FREQuency:OFFSet?')
return Conversions.str_to_float(response)
[docs]
def set_offset(self, offset: float) -> None:
"""
``[SOURce<HW>]:FREQuency:OFFSet`` \n
Snippet: ``driver.source.frequency.set_offset(offset = 1.0)`` \n
Sets the frequency offset fFREQ:OFFSet of a downstream instrument. The parameters offset fFREQ:OFFSer and multiplier
NFREQ:MULT affect the frequency value set with the method ``RsSmw.source.frequency.cw.value()`` . The query method
``RsSmw.source.frequency.cw.value()`` returns the value corresponding to the formula: fFREQ = fRFout * NFREQ:MULT +
fFREQ:OFFSer See 'Displayed RF frequency and level values with downstream instruments'. Note: The offset also affects RF
frequency sweep.
:param offset: float
"""
param = Conversions.decimal_value_to_str(offset)
self._core.io.write(f'SOURce<HwInstance>:FREQuency:OFFSet {param}')
[docs]
def get_span(self) -> float:
"""
``[SOURce<HW>]:FREQuency:SPAN`` \n
Snippet: ``value: float = driver.source.frequency.get_span()`` \n
Sets the span of the frequency sweep range.
:return: span: float Full frequency range
"""
response = self._core.io.query_str('SOURce<HwInstance>:FREQuency:SPAN?')
return Conversions.str_to_float(response)
[docs]
def set_span(self, span: float) -> None:
"""
``[SOURce<HW>]:FREQuency:SPAN`` \n
Snippet: ``driver.source.frequency.set_span(span = 1.0)`` \n
Sets the span of the frequency sweep range.
:param span: float Full frequency range
"""
param = Conversions.decimal_value_to_str(span)
self._core.io.write(f'SOURce<HwInstance>:FREQuency:SPAN {param}')
[docs]
def get_start(self) -> float:
"""
``[SOURce<HW>]:FREQuency:STARt`` \n
Snippet: ``value: float = driver.source.frequency.get_start()`` \n
Sets the start frequency for the RF sweep. The maximum value depends on the installed hardware options.
For more information, refer to the specifications document.
:return: start: float Range: 300 kHz to depends on options
"""
response = self._core.io.query_str('SOURce<HwInstance>:FREQuency:STARt?')
return Conversions.str_to_float(response)
[docs]
def set_start(self, start: float) -> None:
"""
``[SOURce<HW>]:FREQuency:STARt`` \n
Snippet: ``driver.source.frequency.set_start(start = 1.0)`` \n
Sets the start frequency for the RF sweep. The maximum value depends on the installed hardware options.
For more information, refer to the specifications document.
:param start: float Range: 300 kHz to depends on options
"""
param = Conversions.decimal_value_to_str(start)
self._core.io.write(f'SOURce<HwInstance>:FREQuency:STARt {param}')
[docs]
def get_stop(self) -> float:
"""
``[SOURce<HW>]:FREQuency:STOP`` \n
Snippet: ``value: float = driver.source.frequency.get_stop()`` \n
Sets the stop frequency range for the RF sweep. The maximum value depends on the installed hardware options. For more
information, refer to the specifications document.
:return: stop: float Range: 300 kHz to depends on options, Unit: Hz
"""
response = self._core.io.query_str('SOURce<HwInstance>:FREQuency:STOP?')
return Conversions.str_to_float(response)
[docs]
def set_stop(self, stop: float) -> None:
"""
``[SOURce<HW>]:FREQuency:STOP`` \n
Snippet: ``driver.source.frequency.set_stop(stop = 1.0)`` \n
Sets the stop frequency range for the RF sweep. The maximum value depends on the installed hardware options. For more
information, refer to the specifications document.
:param stop: float Range: 300 kHz to depends on options, Unit: Hz
"""
param = Conversions.decimal_value_to_str(stop)
self._core.io.write(f'SOURce<HwInstance>:FREQuency:STOP {param}')
def clone(self) -> 'FrequencyCls':
"""
Clones the group by creating new object from it and its whole existing subgroups.
Also copies all the existing default Repeated Capabilities setting,
which you can change independently without affecting the original group.
"""
new_group = FrequencyCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group