lightlab.equipment.lab_instruments.RandS_SMBV100A_VG module

Summary

Classes:

RandS_SMBV100A_VG Rohde and Schwartz SMBV100A

Reference

class RandS_SMBV100A_VG(name='The Rohde and Schwartz', address=None, **kwargs)[source]

Bases: lightlab.equipment.visa_bases.visa_driver.VISAInstrumentDriver, lightlab.equipment.abstract_drivers.configurable.Configurable

Rohde and Schwartz SMBV100A

Manual

Usage: TODO

This is a complicated class even though it is implementing about 1 percent of what the R&S can do. The philosophy is that there are several blocks that work independently.

  1. Baseband digital modulation; accessed with digiMod()
  2. Artificial Gaussian noise; accessed with addNoise()
  3. RF carrier wave; accessed with amplitude(), frequency(), and carrierMod()

There are also global switches

  1. All RF outputs; switched with enable()
  2. All modulations; switched with modulationEnable()
instrument_category

alias of lightlab.laboratory.instruments.interfaces.VectorGenerator

amplitude(amp=None)[source]

Amplitude is in dBm

Parameters:amp (float) – If None, only gets
Returns:output power amplitude
Return type:(float)
frequency(freq=None)[source]

Frequency is in Hertz. This does not take you out of list mode, if you are in it

Parameters:freq (float) – If None, only gets
Returns:center frequency
Return type:(float)
enable(enaState=None)[source]

Enabler for the entire output

Parameters:enaState (bool) – If None, only gets
Returns:is RF output enabled
Return type:(bool)
modulationEnable(enaState=None)[source]

Enabler for all modulation: data, noise, carrier

If this is False, yet device is enabled overall. Output will be a sinusoid

This is a global modulation switch, so:

modulationEnable(False)

is equivalent to:

carrierMod(False)
addNoise(False)
digiMod(False)
Parameters:enaState (bool) – If None, only gets
Returns:is global modulation enabled
Return type:(bool)
addNoise(enaState=True, bandwidth=None, cnRatio=None)[source]

Enabler for additive white gaussian noise modulations

Parameters:
  • enaState (bool, None) – If None, only sets parameters; does not change enable state
  • bandwidth (float) – noise bandwidth in Hertz (typical = 1e6)
  • cnRatio (float) – carrier-to-noise ratio in dB (typical = 10)
Returns:

is noise enabled

Return type:

(bool)

setPattern(bitArray)[source]

Data pattern for digital modulation

Parameters:bitArray (ndarray) – array that is boolean or binary 1/0
digiMod(enaState=True, symbRate=None, amExtinct=None)[source]

Enabler for baseband data modulation

Data is derived from pattern.

Parameters:
  • enaState (bool, None) – if False, noise and RF modulations persist. If None, sets parameters but no state change
  • symbRate (float) – bit rate in Symbols/s (typical = 3e6)
  • amExtinct (float) – on/off ratio for AM, in percentage (0-100). 100 is full extinction
Returns:

is digital modulation enabled

Return type:

(bool)

Todo

From DM, only AM implemented right now. Further possibilities for formatting are endless

Possibility for arbitrary IQ waveform saving/loading in the :BB:ARB menu

carrierMod(enaState=True, typMod=None, deviation=None, modFreq=None)[source]

Enabler for modulations of the RF carrier

Parameters:
  • enaState (bool, None) – if False, noise and data modulations persist. If None, sets parameters but no state change
  • typMod (str) – what kind of modulation (of [‘am’, ‘pm’, ‘fm’]). Cannot be None when enaState is True
  • deviation (float, None) – amplitude of the modulation, typMod dependent
  • modFreq (float, None) – frequency of the modulation in Hertz (typical = 100e3)
Returns:

is carrier modulation of typMod enabled

Return type:

(bool)

There are three kinds of modulation, and they affect the interpretation of deviation.
  • typMod='am': depth (0–100) percent
  • typMod='pm': phase (0–50) radians
  • typMod='fm': frequency (0–16e6) Hertz
Only one type of modulation can be present at a time. enaState causes these effects:
  • True: this type is enabled, other types are disabled
  • False: all types are disabled
  • None: sets parameters of this type, whether or not it is the one enabled
listEnable(enaState=True, freqs=None, amps=None, isSlave=False, dwell=None)[source]

Sets up list mode.

If isSlave is True, dwell has no effect. Put the trigger signal into the INST TRIG port. If isSlave is False, it steps automatically every dwell time.

If both freqs and amps are None, do nothing to list data. If one is None, get a constant value from the frequency/amplitude methods. If either is a scalar, it will become a constant list, taking on the necessary length. If both are non-scalars, they must be the same length.

Parameters:
  • enaState (bool) – on or off
  • freqs (list) – list data for frequency, in Hz
  • amps (list) – list data for power, in dBm
  • isSlave (bool) – Step through the list every time INST TRIG sees an edge (True), or every dwell time (False)
  • dwell (float) – time to wait at each point, if untriggered