"""enums.py - Contains enum classes."""
from enum import Enum, IntFlag
[docs]
class TriggerType(Enum):
"""TriggerType."""
NONE = 0
r"""No Reference Trigger is configured."""
DIGITAL_EDGE = 1
r"""The Reference Trigger is not asserted until a digital edge is detected. The source of the digital edge is specified
using the :py:attr:`~nirfmxpulse.attributes.AttributeID.DIGITAL_EDGE_TRIGGER_SOURCE` attribute."""
IQ_POWER_EDGE = 2
r"""The Reference Trigger is asserted when the signal changes past the level specified by the slope (rising or falling),
which is configured using the :py:attr:`~nirfmxpulse.attributes.AttributeID.IQ_POWER_EDGE_TRIGGER_SLOPE` attribute."""
SOFTWARE = 3
r"""The Reference Trigger is not asserted until a software trigger occurs."""
[docs]
class DigitalEdgeTriggerEdge(Enum):
"""DigitalEdgeTriggerEdge."""
RISING = 0
r"""The trigger asserts on the rising edge of the signal."""
FALLING = 1
r"""The trigger asserts on the falling edge of the signal."""
[docs]
class IQPowerEdgeTriggerLevelType(Enum):
"""IQPowerEdgeTriggerLevelType."""
RELATIVE = 0
r"""The value of the IQ Power Edge Level attribute is relative to the value of the
:py:attr:`~nirfmxpulse.attributes.AttributeID.REFERENCE_LEVEL` attribute."""
ABSOLUTE = 1
r"""The IQ Power Edge Level attribute specifies the absolute power."""
[docs]
class IQPowerEdgeTriggerSlope(Enum):
"""IQPowerEdgeTriggerSlope."""
RISING = 0
r"""The trigger asserts when the signal power is rising."""
FALLING = 1
r"""The trigger asserts when the signal power is falling."""
[docs]
class TriggerMinimumQuietTimeMode(Enum):
"""TriggerMinimumQuietTimeMode."""
MANUAL = 0
r"""The minimum quiet time for triggering is the value of the
:py:attr:`~nirfmxpulse.attributes.AttributeID.TRIGGER_MINIMUM_QUIET_TIME_DURATION` attribute."""
AUTO = 1
r"""The measurement computes the minimum quiet time used for triggering."""
[docs]
class MeasurementFilterType(Enum):
"""MeasurementFilterType."""
RECTANGULAR = 0
r"""The Rectangular filter is applied."""
GAUSSIAN = 1
r"""The Gaussian filter is applied."""
[docs]
class MaximumPulseCountEnabled(Enum):
"""MaximumPulseCountEnabled."""
FALSE = 0
r"""The maximum pulse count is disabled."""
TRUE = 1
r"""The maximum pulse count is enabled."""
[docs]
class SegmentedAcquisitionEnabled(Enum):
"""SegmentedAcquisitionEnabled."""
FALSE = 0
r"""Segmented acquisition is disabled."""
TRUE = 1
r"""Segmented acquisition is enabled."""
[docs]
class MultiburstEnabled(Enum):
"""MultiburstEnabled."""
FALSE = 0
r"""Multiburst disabled, assumes all pulses detected in the current acquisition are analysed as single burst."""
TRUE = 1
r"""Multiburst enabled, assumes every burst in the acquisition contains pulses specified by
:py:attr:`~nirfmxpulse.attributes.AttributeID.PULSE_MULTIBURST_LENGTH` attribute."""
[docs]
class PulseDetectionReference(Enum):
"""PulseDetectionReference."""
REFERENCE_LEVEL = 0
r"""The threshold is relative to the reference level of the samples."""
ABSOLUTE = 1
r"""The threshold is the absolute power, in dBm."""
PEAK = 2
r"""The threshold is relative to the peak level of the samples."""
[docs]
class PulseMetricsEnabled(Enum):
"""PulseMetricsEnabled."""
FALSE = 0
r"""Pulse Metric results computation is disabled."""
TRUE = 1
r"""Pulse Metric results computation is enabled."""
[docs]
class PulseMetricsAmplitudeDeviationUnit(Enum):
"""PulseMetricsAmplitudeDeviationUnit."""
PERCENTAGE = 0
r"""Amplitude deviation results are returned as a percentage."""
DB = 1
r"""Amplitude deviation results are returned in dB."""
[docs]
class PulseLevelComputationMethod(Enum):
"""PulseLevelComputationMethod."""
MEAN = 0
r"""The levels derived as the pulse sub-histogram mean levels."""
MEDIAN = 1
r"""The levels derived as the pulse sub-histogram median levels."""
MODE = 2
r"""The levels derived as the pulse sub-histogram mode levels."""
[docs]
class PulseAmplitudeLevelDomain(Enum):
"""PulseAmplitudeLevelDomain."""
VOLTS = 0
r"""All threshold levels are calculated in the voltage domain."""
WATTS = 1
r"""All threshold levels are calculated in the power domain."""
[docs]
class PulseDroopCompensationEnabled(Enum):
"""PulseDroopCompensationEnabled."""
FALSE = 0
r"""Droop Compensation is disabled."""
TRUE = 1
r"""Droop Compensation is enabled."""
[docs]
class PulseMeasurementPointReference(Enum):
"""PulseMeasurementPointReference."""
RISE = 0
r"""The measurement point is defined in reference to the rising edge."""
CENTER = 1
r"""The measurement point is defined in reference to the center of the pulse."""
FALL = 2
r"""The measurement point is defined in reference to the falling edge."""
[docs]
class PulseMultipleMeasurementPointsEnabled(Enum):
"""PulseMultipleMeasurementPointsEnabled."""
FALSE = 0
r"""Multiple Measurement Points related computation is disabled."""
TRUE = 1
r"""Multiple Measurement Points related computation is enabled."""
[docs]
class PulseFrequencyAndPhaseDeviationRangeReference(Enum):
"""PulseFrequencyAndPhaseDeviationRangeReference."""
EDGE = 0
r"""Specifies the range with respect to the edges of the pulse."""
CENTER = 1
r"""Specifies the range with respect to the center of the pulse."""
[docs]
class PulseModulationType(Enum):
"""PulseModulationType."""
CW = 0
r"""Continous wave where the frequency remains constant over pulse ON duration."""
LINEAR_FM = 1
r"""Frequency varies linearly within pulse ON duration."""
TRIANGULAR_FM = 2
r"""Frequency varies with two lienar FM chirps with opposite slopes within pulse ON duration."""
[docs]
class PulseCWFrequencyOffsetAuto(Enum):
"""PulseCWFrequencyOffsetAuto."""
FALSE = 0
r"""CW frequency offset computation is set to manual."""
TRUE = 1
r"""CW frequency offset computation is set to automatic."""
[docs]
class PulseStabilityEnabled(Enum):
"""PulseStabilityEnabled."""
FALSE = 0
r"""Pulse Stability results computation is disabled."""
TRUE = 1
r"""Pulse Stability results computation is enabled."""
[docs]
class PulseStabilityFrequencyErrorCompensation(Enum):
"""PulseStabilityFrequencyErrorCompensation."""
OFF = 0
r"""Frequency error compensation is disabled."""
ON = 1
r"""Frequency error compensation is enabled."""
[docs]
class PulseTimeSidelobeEnabled(Enum):
"""PulseTimeSidelobeEnabled."""
FALSE = 0
r"""Pulse Time Sidelobe results computation is disabled."""
TRUE = 1
r"""Pulse Time Sidelobe results computation is enabled."""
[docs]
class PulseTimeSidelobeReferenceWindowType(Enum):
"""PulseTimeSidelobeReferenceWindowType."""
NONE = 0
r"""Indicates no windowing."""
FLATTOP = 1
r"""Indicates Flat Top window type."""
HANNING = 2
r"""Indicates Hanning window type."""
HAMMING = 3
r"""Indicates Hamming window type."""
GAUSSIAN = 4
r"""Indicates Gaussian window type."""
BLACKMAN = 5
r"""Indicates Blackman window type."""
DOLPH_CHEBYSHEV = 6
r"""Indicates Chebyshev window type."""
[docs]
class PulseTimeSidelobeKeepOutTimeAuto(Enum):
"""PulseTimeSidelobeKeepOutTimeAuto."""
FALSE = 0
r"""Keep out time computation is set to manual specifified by
:py:attr:`~nirfmxpulse.attributes.AttributeID.PULSE_TIME_SIDELOBE_KEEP_OUT_TIME` attribute."""
TRUE = 1
r"""Keep out time computation is set to automatic, determined mainlobe 3dB width is used."""
[docs]
class PulseAcquisitionTraceSelect(Enum):
"""PulseAcquisitionTraceSelect."""
ALL_PULSES = 0
r"""Selects all the acquired pulses."""
SUBSET = 1
r""""""
[docs]
class PulseTraceRangeAuto(Enum):
"""PulseTraceRangeAuto."""
FALSE = 0
r"""Trace range computation is set to manual."""
TRUE = 1
r"""Trace range is automatically computed according to the pulse width."""
[docs]
class PulseTraceRangeReference(Enum):
"""PulseTraceRangeReference."""
RISE = 0
r"""Trace range is defined in reference to the rising edge."""
CENTER = 1
r"""Trace range is defined in reference to the center of the pulse."""
FALL = 2
r"""Trace range is defined in reference to the falling edge."""
[docs]
class PulseAmplitudeTraceUnit(Enum):
"""PulseAmplitudeTraceUnit."""
DBM = 0
r"""Amplitude trace is expressed in dBm."""
VOLTS = 1
r"""Amplitude trace is expressed in Volts."""
WATTS = 2
r"""Amplitude trace is expressed in Watts."""
[docs]
class MeasurementTypes(IntFlag):
"""MeasurementTypes."""
PULSE = 1 << 0
r"""Selects PULSE measurement."""