mpylab.device.sa_pmm_9010 moduleΒΆ
PMM 9010 Analyzer Mode spectrum analyzer driver (chapter 14 remote protocol).
- class mpylab.device.sa_pmm_9010.SPECTRUMANALYZER(**kw)
Bases:
SPECTRUMANALYZERConcrete PMM 9010 Analyzer Mode driver.
This driver reads Analyzer Mode traces via
SAGO. PMM Sweep Mode is a receiver-oriented protocol path and is not exposed through this class.- GetAtt()
Return input attenuation in dB.
- GetAttMode()
Return attenuation mode.
- GetCenterFreq()
Return center frequency in Hz.
- GetDescription()
Query and return the instrument identification string.
- GetDetector()
Return detector mode.
- GetPreAmp()
Return preamplifier setting in dB.
- GetRBW()
Return the current PMM RBW in Hz or the last unknown value.
- GetRefLevel()
Return cached display reference level in dBm.
- GetSpan()
Return configured frequency span in Hz.
- GetSpectrum()
Acquire one binary spectrum trace from the analyzer.
- GetStartFreq()
Return start frequency in Hz.
- GetStopFreq()
Return stop frequency in Hz.
- GetSweepCount()
Return sweep count.
- GetSweepPoints()
Return number of sweep points.
- GetSweepTime()
Return sweep time in seconds.
- GetTrace()
Return active trace number.
- GetTraceMode()
Return trace mode.
- GetTriggerDelay()
Return trigger delay in seconds.
- GetTriggerMode()
Return trigger mode.
- GetVBW()
Report that PMM Analyzer mode has no separate VBW setting.
- Init(ini=None, channel=None, ignore_bus=None)
Initialize the analyzer from INI data and apply channel defaults.
- Quit()
Stop analyzer operation.
- SetAtt(value)
Set input attenuation in dB or enable automatic attenuation.
- SetAttMode(value)
Set attenuation mode.
- SetCenterFreq(value)
Set center frequency in Hz while keeping the current span.
- SetDetector(value)
Set detector mode.
- SetPreAmp(value)
Enable or disable the preamplifier.
- SetRBW(value)
Set analyzer RBW via the PMM global RBW command.
- SetRefLevel(value)
Set PMM display reference level in dBuV.
- SetSpan(value)
Set frequency span in Hz around the current center.
- SetStartFreq(value)
Set start frequency in Hz.
- SetStopFreq(value)
Set stop frequency in Hz.
- SetSweepCount(value)
Set sweep count.
- SetSweepPoints(value)
Set number of sweep points.
- SetSweepTime(value)
Set analyzer hold time in seconds.
The PMM Analyzer mode exposes a hold-time setting but no separate automatic hold-time command. For mpylab configuration compatibility,
autoexplicitly sets the one-second default.
- SetTrace(value)
Set active trace number.
- SetTraceMode(value)
Set trace mode.
- SetTriggerDelay(value)
Set trigger delay in seconds.
- SetTriggerMode(value)
Set trigger mode.
- SetVBW(value)
Report that PMM Analyzer mode has no separate VBW setting.
- conftmpl = {'channel_%d': {'attenuation': <function _number_or_auto>, 'attmode': <class 'str'>, 'detector': <class 'str'>, 'rbw': <function _number_or_auto>, 'reflevel': <class 'float'>, 'span': <class 'float'>, 'sweepcount': <class 'int'>, 'sweeppoints': <class 'int'>, 'sweeptime': <function _number_or_auto>, 'trace': <class 'int'>, 'tracemode': <class 'str'>, 'triggermode': <class 'str'>, 'unit': <class 'str'>, 'vbw': <function _number_or_auto>}, 'description': {'description': <class 'str'>, 'deviceid': <class 'str'>, 'driver': <class 'str'>, 'serialnr': <class 'str'>, 'type': <class 'str'>, 'vendor': <class 'str'>}, 'init_value': {'fstart': <class 'float'>, 'fstep': <class 'float'>, 'fstop': <class 'float'>, 'nr_of_channels': <class 'int'>, 'virtual': <function strbool>, 'visa': <class 'str'>}}
- mpylab.device.sa_pmm_9010.analyzer_trace_smoke_test(analyzer, output=<built-in function print>)
Read one short PMM Analyzer Mode trace and report its basic shape.
The helper expects an initialized
SPECTRUMANALYZERinstance and returns the(frequencies, levels_dbm)payload fromGetSpectrum.
- mpylab.device.sa_pmm_9010.main()
Run a minimal command-line smoke test for the PMM driver.