Tektronix Oscilloscopes

Driver module for Tektronix oscilloscopes. Currently supports

  • TDS 3000 series
  • MSO/DPO 4000 series
class instrumental.drivers.scopes.tektronix.MSO_DPO_4000(name=None, visa_inst=None)

A Tektronix MSO/DPO 4000 series oscilloscope.

class instrumental.drivers.scopes.tektronix.TDS_3000(name=None, visa_inst=None)

A Tektronix TDS 3000 series oscilloscope.

class instrumental.drivers.scopes.tektronix.TekScope(name=None, visa_inst=None)

A base class for Tektronix scopes. Supports at least TDS 3000 series as well as MSO/DPO 4000 series scopes.

__init__(name=None, visa_inst=None)

Create a scope object that has the given VISA name name and connect to it. You can find available instrument names using the VISA Instrument Manager.

are_measurement_stats_on()

Returns whether measurement statistics are currently enabled

disable_measurement_stats()

Disables measurement statistics

enable_measurement_stats(enable=True)

Enables measurement statistics.

When enabled, measurement statistics are kept track of, including ‘mean’, ‘stddev’, ‘minimum’, ‘maximum’, and ‘nsamps’.

Parameters:enable (bool) – Whether measurement statistics should be enabled
get_data(channel=1)

Retrieve a trace from the scope.

Pulls data from channel channel and returns it as a tuple (t,y) of unitful arrays.

Parameters:channel (int, optional) – Channel number to pull trace from. Defaults to channel 1.
Returns:t, y – Unitful arrays of data from the scope. t is in seconds, while y is in volts.
Return type:pint.Quantity arrays
get_math_function()
read_measurement_stats(num)

Read the value and statistics of a measurement.

Parameters:num (int) – Number of the measurement to read from, from 1-4
Returns:stats – Dictionary of measurement statistics. Includes value, mean, stddev, minimum, maximum, and nsamps.
Return type:dict
read_measurement_value(num)

Read the value of a measurement.

Parameters:num (int) – Number of the measurement to read from, from 1-4
Returns:value – Value of the measurement
Return type:pint.Quantity
run_acquire()

Sets the acquire state to ‘run’

set_math_function(expr)

Set the expression used by the MATH channel.

Parameters:expr (str) – a string representing the MATH expression, using channel variables CH1, CH2, etc. eg. ‘CH1/CH2+CH3’
set_measurement_nsamps(nsamps)

Sets the number of samples used to compute measurements.

Parameters:nsamps (int) – Number of samples used to compute measurements
set_measurement_params(num, mtype, channel)

Set the parameters for a measurement.

Parameters:
  • num (int) – Measurement number to set, from 1-4.
  • mtype (str) – Type of the measurement, e.g. ‘amplitude’
  • channel (int) – Number of the channel to measure.
stop_acquire()

Sets the acquire state to ‘stop’