Source code for RsSmw.Implementations.Source.Noise.Phasenoise

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PhasenoiseCls:
	"""
	| Commands in total: 6
	| Subgroups: 3
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("phasenoise", core, parent)

	@property
	def frequency(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_frequency'):
			from .Frequency import FrequencyCls
			self._frequency = FrequencyCls(self._core, self._cmd_group)
		return self._frequency

	@property
	def level(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_level'):
			from .Level import LevelCls
			self._level = LevelCls(self._core, self._cmd_group)
		return self._level

	@property
	def shape(self):
		"""
		| Commands in total: 3
		| Subgroups: 1
		| Direct child commands: 2
		"""
		if not hasattr(self, '_shape'):
			from .Shape import ShapeCls
			self._shape = ShapeCls(self._core, self._cmd_group)
		return self._shape

[docs] def get_state(self) -> bool: """ ``[SOURce<HW>]:NOISe:PHASenoise:[STATe]`` \n Snippet: ``value: bool = driver.source.noise.phasenoise.get_state()`` \n Enables or disables the phase noise generator. :return: phasenoise_state: 1 | ON | 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:NOISe:PHASenoise:STATe?') return Conversions.str_to_bool(response)
[docs] def set_state(self, phasenoise_state: bool) -> None: """ ``[SOURce<HW>]:NOISe:PHASenoise:[STATe]`` \n Snippet: ``driver.source.noise.phasenoise.set_state(phasenoise_state = False)`` \n Enables or disables the phase noise generator. :param phasenoise_state: 1 | ON | 0| OFF """ param = Conversions.bool_to_str(phasenoise_state) self._core.io.write(f'SOURce<HwInstance>:NOISe:PHASenoise:STATe {param}')
def clone(self) -> 'PhasenoiseCls': """ 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 = PhasenoiseCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group