Source code for rsmxo.Implementations.Franalysis.Points

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: 3
	| Subgroups: 0
	| Direct child commands: 3
	"""

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

[docs] def get_logarithmic(self) -> int: """ ``FRANalysis:POINts:LOGarithmic`` \n Snippet: ``value: int = driver.franalysis.points.get_logarithmic()`` \n Selects the number of points that are measured per decade, if method ``RsMxo.franalysis.points.mode()`` is set to DECade. :return: pts_per_decade: 10 to 500 """ response = self._core.io.query_str('FRANalysis:POINts:LOGarithmic?') return Conversions.str_to_int(response)
[docs] def set_logarithmic(self, pts_per_decade: int) -> None: """ ``FRANalysis:POINts:LOGarithmic`` \n Snippet: ``driver.franalysis.points.set_logarithmic(pts_per_decade = 1)`` \n Selects the number of points that are measured per decade, if method ``RsMxo.franalysis.points.mode()`` is set to DECade. :param pts_per_decade: 10 to 500 """ param = Conversions.decimal_value_to_str(pts_per_decade) self._core.io.write(f'FRANalysis:POINts:LOGarithmic {param}')
# noinspection PyTypeChecker
[docs] def get_mode(self) -> enums.PointsMode: """ ``FRANalysis:POINts:MODE`` \n Snippet: ``value: enums.PointsMode = driver.franalysis.points.get_mode()`` \n Selects, if the number of points for the FRA are measured as total or per decade. You can set the number of points with method ``RsMxo.franalysis.points.total()`` / method ``RsMxo.franalysis.points.logarithmic()`` . :return: points_mode: TOTal | DECade """ response = self._core.io.query_str('FRANalysis:POINts:MODE?') return Conversions.str_to_scalar_enum(response, enums.PointsMode)
[docs] def set_mode(self, points_mode: enums.PointsMode) -> None: """ ``FRANalysis:POINts:MODE`` \n Snippet: ``driver.franalysis.points.set_mode(points_mode = enums.PointsMode.DECade)`` \n Selects, if the number of points for the FRA are measured as total or per decade. You can set the number of points with method ``RsMxo.franalysis.points.total()`` / method ``RsMxo.franalysis.points.logarithmic()`` . :param points_mode: TOTal | DECade """ param = Conversions.enum_scalar_to_str(points_mode, enums.PointsMode) self._core.io.write(f'FRANalysis:POINts:MODE {param}')
[docs] def get_total(self) -> int: """ ``FRANalysis:POINts:TOTal`` \n Snippet: ``value: int = driver.franalysis.points.get_total()`` \n Set the total number of points for the FRA analysis, if method ``RsMxo.franalysis.points.mode()`` is set to TOTal. :return: total_points: 10 to 5000 """ response = self._core.io.query_str('FRANalysis:POINts:TOTal?') return Conversions.str_to_int(response)
[docs] def set_total(self, total_points: int) -> None: """ ``FRANalysis:POINts:TOTal`` \n Snippet: ``driver.franalysis.points.set_total(total_points = 1)`` \n Set the total number of points for the FRA analysis, if method ``RsMxo.franalysis.points.mode()`` is set to TOTal. :param total_points: 10 to 5000 """ param = Conversions.decimal_value_to_str(total_points) self._core.io.write(f'FRANalysis:POINts:TOTal {param}')