lightlab.equipment.abstract_drivers.TekScopeAbstract module

Summary

Classes:

TekScopeAbstract General class for several Tektronix scopes, including

Reference

class TekScopeAbstract(headerIsOptional=True, verboseIsOptional=False, precedingColon=True, interveningSpace=True, **kwargs)[source]

Bases: lightlab.equipment.abstract_drivers.configurable.Configurable, lightlab.equipment.abstract_drivers.AbstractDriver

General class for several Tektronix scopes, including

The main method is acquire(), which takes and returns a Waveform.

Todo

These behave differently. Be more explicit about sample mode:

timebaseConfig(avgCnt=1)
acquire([1])

acquire([1], avgCnt=1)

Does DPO support sample mode at all?

totalChans = None
startup()[source]
timebaseConfig(avgCnt=None, duration=None, position=None, nPts=None)[source]

Timebase and acquisition configure

Parameters:
  • avgCnt (int) – averaging done by the scope
  • duration (float) – time, in seconds, for data to be acquired
  • position (float) – trigger delay
  • nPts (int) – number of samples taken
Returns:

(dict) The present values of all settings above

acquire(chans=None, timeout=None, **kwargs)[source]

Get waveforms from the scope.

If chans is None, it won’t actually trigger, but it will configure.

If unspecified, the kwargs will be derived from the previous state of the scope. This is useful if you want to play with it in lab while working with this code too.

Parameters:
  • chans (list) – which channels to record at the same time and return
  • avgCnt (int) – number of averages. special behavior when it is 1
  • duration (float) – window width in seconds
  • position (float) – trigger delay
  • nPts (int) – number of sample points
  • timeout (float) – time to wait for averaging to complete in seconds If it is more than a minute, it will do a test first
Returns:

recorded signals

Return type:

list[Waveform]

wfmDb(chan, nWfms, untriggered=False)[source]

Transfers a bundle of waveforms representing a signal database. Sample mode only.

Configuration such as position, duration are unchanged, so use an acquire(None, …) call to set them up

Parameters:
  • chan (int) – currently this only works with one channel at a time
  • nWfms (int) – how many waveforms to acquire through sampling
  • untriggered (bool) – if false, temporarily puts scope in free run mode
Returns:

all waveforms acquired

Return type:

(FunctionBundle(Waveform))

run(continuousRun=True)[source]

Sets the scope to continuous run mode, so you can look at it in lab, or to single-shot mode, so that data can be acquired

Parameters:continuousRun (bool) –
setMeasurement(measIndex, chan, measType)[source]
Parameters:
  • measIndex (int) – used to refer to this measurement itself. 1-indexed
  • chan (int) – the channel source of the measurement.
  • measType (str) – can be ‘PK2PK’, ‘MEAN’, etc.
measure(measIndex)[source]
Parameters:measIndex (int) – used to refer to this measurement itself. 1-indexed
Returns:(float)
autoAdjust(chans)[source]

Adjusts offsets and scaling so that waveforms are not clipped