from typing import List
from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from ....... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SpursCls:
"""
| Commands in total: 3
| Subgroups: 2
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("spurs", core, parent)
@property
def discrete(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_discrete'):
from .Discrete import DiscreteCls
self._discrete = DiscreteCls(self._core, self._cmd_group)
return self._discrete
@property
def random(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_random'):
from .Random import RandomCls
self._random = RandomCls(self._core, self._cmd_group)
return self._random
[docs]
def get(self, trace=repcap.Trace.Default) -> List[float]:
"""
``FETCh:PNOise<t>:SPURs`` \n
Snippet: ``value: List[float] = driver.applications.k40PhaseNoise.fetch.pnoise.spurs.get(trace = repcap.Trace.Default)`` \n
Queries the location and level of all spurs that have been detected.
:param trace: optional repeated capability selector. Default value: Tr1 (settable in the interface 'Pnoise')
:return: spurs: Returns two values (frequency and level) for each each spur that has been detected.
"""
trace_cmd_val = self._cmd_group.get_repcap_cmd_value(trace, repcap.Trace)
response = self._core.io.query_bin_or_ascii_float_list(f'FETCh:PNOise{trace_cmd_val}:SPURs?')
return response
def clone(self) -> 'SpursCls':
"""
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 = SpursCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group