spectrum¶
List of supported commands:
-
class
nardascripting.base.scpi.spectrum.
ScpiSpectrum
(com: nardascripting.base.comm.CommBase)¶ SignalShark SPECtrum SCPI subsystem class.
-
get_data_count
()¶ Queries the spectrum data count (number of bins)
- Returns
Number of bins
- Return type
int
-
get_data_frequency_start
()¶ Queries spectrum data start frequency
- Returns
Start frequency of the X-Axis
- Return type
float
-
get_data_frequency_step
()¶ Queries spectrum data frequency step
- Returns
Frequency step of the X-Axis
- Return type
float
-
get_data_level
(trace: nardascripting.base.scpi.enums.SpecTraceTypes)¶ Queries spectrum level data
- Parameters
trace (SpecTraceTypes) – RMS, PPk, MPk, Avg, Smp, MnR, AvR, MxR, MxP, MnP, MxA, MxS
- Returns
List of power levels in actual unit
- Return type
list of float
-
get_data_overdriven
()¶ Queries the spectrum data overdriven flag
- Returns
Overdriven flag
- Return type
bool
-
get_data_realtime
()¶ Queries the spectrum data realtime flag for traces: MnR, AvR, MxR, MxP, MnP, MxA, MxS
- Returns
Realtime flag
- Return type
bool
-
get_data_update
(scan_number=-1, timeout=3.0)¶ Synchronization command, that waits for new measurement results.
- Parameters
scan_number (Integer number) – ScanNumber of last queried measurement data. The command forces an update, if not set.
timeout (Float number) – Timeout value for update data in seconds
- Returns
ScanNumber of current measurement data or -1 if error.
- Return type
Integer number
note:: Update is only available in RUN and HOLD state!
-
get_data_update_stop
(scan_number=-1, timeout=3.0)¶ Synchronization command, that waits for new measurement results and stops measurement if new results are available.
- Parameters
scan_number (Integer number) – ScanNumber of last queried measurement data. The command forces an update, if not set.
timeout (Float number) – Timeout value for update data in seconds
- Returns
ScanNumber of current measurement data or -1 if error.
- Return type
Integer number
note:: Update is only available in RUN and HOLD state!
-
get_frequency_center
()¶ Queries the center frequency
- Returns
Center frequency in Hz
- Return type
float
-
get_frequency_center_step
()¶ Queries the center frequency step for spectrum
- Returns
Center frequency step in Hz
- Return type
float
-
get_frequency_center_tune_coupling
()¶ Queries the coupling state of Fcent and Ftune
- Returns
Coupling state
- Return type
bool
-
get_frequency_entry_mode
()¶ Queries the entry mode for Fcent, Fspan or Fstart, Fstop
- Returns
Entry mode (FSTART_FSTOP,FCENT_FSPAN)
- Return type
-
get_frequency_span
()¶ Queries the frequency span
- Returns
Frequency span in Hz
- Return type
float
-
get_frequency_start
()¶ Queries the start frequency, in Hz
- Returns
Start frequency in Hz
- Return type
float
-
get_frequency_stop
()¶ Queries the stop frequency, in Hz
- Returns
Stop frequency in Hz
- Return type
float
-
get_measurement_time
()¶ Queries the measurement time
- Returns
Measurement time in s
- Return type
float
-
get_rbw
()¶ Queries the bandwidth, in Hz
- Returns
Resolution Bandwidth in Hz
- Return type
float
-
get_rbw_auto
()¶ Queries the bandwidth automatic coupling state
- Returns
Coupling state
- Return type
bool
-
get_rbw_entry_mode
()¶ Queries the bandwidth entry mode; absolute or relative
- Returns
RBW entry (Absolute, Relative)
- Return type
-
get_rbw_filter_type
()¶ Queries the bandwidth filter type
- Returns
Filter type (Normal, EMC)
- Return type
-
get_rbw_list
()¶ Queries a list of possible RBW settings
- Returns
list of possible RBW settings
- Return type
list of float
-
get_scan_count
()¶ Queries the current scan count
- Returns
Scan count
- Return type
int
-
get_scan_number
()¶ Queries the current scan number
- Returns
Scan number
- Return type
int
-
get_trace_3rd_detector
()¶ Queries the detector configuration. Only the 3rd detector can be configured
- Returns
Detector1 (PPk), Detector2 (RMS), Detector3 (MPk, Smp, Avg)
- Return type
-
get_trace_enable
(trace: nardascripting.base.scpi.enums.SpecTraceTypes)¶ Queries the corresponding trace state
- Parameters
trace (SpecTraceTypes) – All, RMS, PPk, MPk, Avg, Smp, MnR, AvR, MxR, MxP, MnP, MxA, MxS
- Returns
Trace state
- Return type
bool
-
get_trace_infinite
()¶ Queries the infinite min max trace state
- Returns
Infinite state
- Return type
bool
-
get_trace_list
()¶ Queries a list of selected display traces
- Returns
List of selected display traces
- Return type
list of SpecTraceTypes
-
get_tstamp_raw
()¶ Queries the spectrum data timestamp
- Returns
Timestamp Sync Flag; Seconds since 1.1.1970 0:00 Greenwich Mean Time; Nanoseconds fractional part
- Return type
bool, int, int
-
set_frequency_center
(value: float)¶ Sets the center frequency for spectrum
- Parameters
value (float) – Center frequency (Hz)
-
set_frequency_center_step
(value: float)¶ Sets the center frequency step for spectrum
- Parameters
value (float) – Center frequency step (Hz)
-
set_frequency_center_tune_coupling
(value: bool)¶ Automatic coupling of Fcent and Ftune
- Parameters
value (bool) – Coupling state
-
set_frequency_entry_mode
(value: nardascripting.base.scpi.enums.FreqEntryModes)¶ Sets the entry mode for Fcent, Fspan or Fstart, Fstop
- Parameters
value (FreqEntryModes) – Entry mode (FSTART_FSTOP,FCENT_FSPAN)
-
set_frequency_span
(value: float)¶ Frequency span for spectrum
- Parameters
value (float) – Frequency span (Hz)
-
set_frequency_start
(value: float)¶ Sets the Start frequency for spectrum
- Parameters
value (float) – Start frequency (Hz)
-
set_frequency_stop
(value: float)¶ Sets the Stop frequency for spectrum
- Parameters
value (float) – Stop frequency (Hz)
-
set_measurement_time
(value: float)¶ Measurement time for spectrum
- Parameters
value (float) – Measurement time (s)
-
set_rbw
(value: float)¶ Sets the resolution bandwidth for spectrum
- Parameters
value (float) – Resolution Bandwidth (Hz)
-
set_rbw_auto
(value: bool)¶ Bandwidth automatic coupling to the span
- Parameters
value (bool) – Coupling state
-
set_rbw_entry_mode
(value: nardascripting.base.scpi.enums.RbwEntryModes)¶ Sets the bandwidth entry mode; absolute or relative
- Parameters
value (RbwEntryModes) – RBW entry (Absolute, Relative)
-
set_rbw_filter_type
(value: nardascripting.base.scpi.enums.RbwFilterTypes)¶ Sets the bandwidth filter type
- Parameters
value (RbwFilterTypes) – Filter type (Normal, EMC)
-
set_scan_count
(value: int)¶ Sets the spectrum scan count
- Parameters
value (int) – Scan count
-
set_trace_3rd_detector
(mode: nardascripting.base.scpi.enums.Spec3rdDetectorModes)¶ Sets the detector configuration. Only the 3rd detector can be configured.
- Parameters
mode (Spec3rdDetectorModes) – Detector3 (MPk, Smp, Avg)
-
set_trace_enable
(trace: nardascripting.base.scpi.enums.SpecTraceTypes, state: bool, disable_others: bool = False)¶ Enables the displayed detectors and traces
- Parameters
trace (Enum) – All, RMS, PPk, MPk, Avg, Smp, MnR, AvR, MxR, MxP, MnP, MxA, MxS
state (bool) – Trace state
disable_others (bool) – Disables other traces if set to True.
-
set_trace_infinite
(value: bool)¶ Sets the infinite min max trace state
- Parameters
value (bool) – Infinite state
-