dso_spectrum module
Spectrum mode control on the DSO.
Basic control functions for the spectrum mode.
Typical usage example:
import dso2ke as gds
# Create a Dso instance, myDso, and get connected to it.
myDso = gds.Dso()
ret = myDso.connect(host='localhost', port=3000)
if ret != 0:
raise ValueError('Socket connection failed.')
# Activate spectrum mode
myDso.sa.set_spectrum_mode('ON')
# Configure SA parameters: center and span frequency
myDso.sa.set_freq(10e6)
myDso.sa.set_span(10e6)
# Exit the spectrum mode
myDso.sa.set_spectrum_mode('OFF')
myDso.close() # Clean-up
- class dso_spectrum.Spectrum(parent=None, max_instances: int = 1)
Bases:
objectThis module controls the spectrum analyzer(SA) on the DSO.
- is_RBW_Manual(_id: int = SA) bool
Check for manual-RBW mode
- Parameters:
_id (int) – 0 for single SA(optional) while 1,2, .. and etc for multi-SAs
- Returns:
True if manual-RBW mode, False otherwise.
- is_spectrum_mode() bool
Get state of the spectrum mode
- Returns:
True if present state is the spectrum mode. False otherwise.
- Return type:
- set_spectrum_mode(state: str) None
Set state of the spectrum mode
- Parameters:
state (str) – ON or OFF
- set_trace_data_type(trace_type: str, _id: int = SA) bool
Set trace type before retrieving the trace data
- set_window(window: int = kHanningWin, _id: int = SA) None
Window function for spectrum analysis
- Parameters:
window (int, optional) –
Choose one of the following window functions to trade-off amplitude accurary and side-lobe reduction.
kRectWin for Rectangular kHammingWin for Hamming kHanningWin for Hann(default) kBlackmanWin for Blackman
_id (int) – 0 for single SA(optional) while 1,2, .. and etc for multi-SAs