Tektronix¶
TekAWG2000
Arbitrary Wave Generator¶
-
class
instruments.tektronix.
TekAWG2000
(filelike)[source]¶ Communicates with a Tektronix AWG2000 series instrument using the SCPI commands documented in the user’s guide.
-
class
Channel
(tek, idx)[source]¶ Class representing a physical channel on the Tektronix AWG 2000
Warning
This class should NOT be manually created by the user. It
is designed to be initialized by the
TekAWG2000
class.-
amplitude
¶ Gets/sets the amplitude of the specified channel.
Units: As specified (if a Quantity
) or assumed to be of units Volts.Type: Quantity
with units Volts peak-to-peak.
-
frequency
¶ Gets/sets the frequency of the specified channel when using the built-in function generator.
- ::units: As specified (if a
Quantity
) or assumed to be - of units Hertz.
Type: Quantity
with units Hertz.- ::units: As specified (if a
-
offset
¶ Gets/sets the offset of the specified channel.
Units: As specified (if a Quantity
) or assumed to be of units Volts.Type: Quantity
with units Volts.
-
polarity
¶ Gets/sets the polarity of the specified channel.
Type: TekAWG2000.Polarity
-
shape
¶ Gets/sets the waveform shape of the specified channel. The AWG will use the internal function generator for these shapes.
Type: TekAWG2000.Shape
-
-
class
Polarity
[source]¶ Enum containing valid polarity modes for the AWG2000
-
inverted
= 'INVERTED'¶
-
normal
= 'NORMAL'¶
-
-
class
Shape
[source]¶ Enum containing valid waveform shape modes for hte AWG2000
-
pulse
= 'PULSE'¶
-
ramp
= 'RAMP'¶
-
sine
= 'SINUSOID'¶
-
square
= 'SQUARE'¶
-
triangle
= 'TRIANGLE'¶
-
-
upload_waveform
(yzero, ymult, xincr, waveform)[source]¶ Uploads a waveform from the PC to the instrument.
Parameters: - yzero (
float
orint
) – Y-axis origin offset - ymult (
float
orint
) – Y-axis data point multiplier - xincr (
float
orint
) – X-axis data point increment - waveform (numpy.ndarray) – Numpy array of values representing the waveform to be uploaded. This array should be normalized. This means that all absolute values contained within the array should not exceed 1.
- yzero (
-
channel
¶ Gets a specific channel on the AWG2000. The desired channel is accessed like one would access a list.
Example usage:
>>> import instruments as ik >>> inst = ik.tektronix.TekAWG2000.open_gpibusb("/dev/ttyUSB0", 1) >>> print(inst.channel[0].frequency)
Returns: A channel object for the AWG2000 Return type: TekAWG2000.Channel
-
class
TekDPO4104
Oscilloscope¶
-
class
instruments.tektronix.
TekDPO4104
(filelike)[source]¶ The Tektronix DPO4104 is a multi-channel oscilloscope with analog bandwidths ranging from 100MHz to 1GHz.
This class inherits from
SCPIInstrument
.Example usage:
>>> import instruments as ik >>> tek = ik.tektronix.TekDPO4104.open_tcpip("192.168.0.2", 8888) >>> [x, y] = tek.channel[0].read_waveform()
-
class
Coupling
[source]¶ Enum containing valid coupling modes for the channels on the Tektronix DPO 4104
-
ac
= 'AC'¶
-
dc
= 'DC'¶
-
ground
= 'GND'¶
-
-
force_trigger
()[source]¶ Forces a trigger event to occur on the attached oscilloscope. Note that this is distinct from the standard SCPI
*TRG
functionality.
-
aquisition_continuous
¶ Gets/sets whether the aquisition is continuous (“run/stop mode”) or whether aquisiton halts after the next sequence (“single mode”).
Type: bool
-
aquisition_running
¶ Gets/sets the aquisition state of the attached instrument. This property is
True
if the aquisition is running, and isFalse
otherwise.Type: bool
-
channel
¶ Gets a specific oscilloscope channel object. The desired channel is specified like one would access a list.
For instance, this would transfer the waveform from the first channel:
>>> tek = ik.tektronix.TekDPO4104.open_tcpip("192.168.0.2", 8888) >>> [x, y] = tek.channel[0].read_waveform()
Return type: _TekDPO4104Channel
-
data_source
¶ Gets/sets the the data source for waveform transfer.
-
data_width
¶ Gets/sets the data width (number of bytes wide per data point) for waveforms transfered to/from the oscilloscope.
Valid widths are 1 or 2.
Type: int
-
math
¶ Gets a data source object corresponding to the MATH channel.
Return type: _TekDPO4104DataSource
-
ref
¶ Gets a specific oscilloscope reference channel object. The desired channel is specified like one would access a list.
For instance, this would transfer the waveform from the first channel:
>>> import instruments as ik >>> tek = ik.tektronix.TekDPO4104.open_tcpip("192.168.0.2", 8888) >>> [x, y] = tek.ref[0].read_waveform()
Return type: _TekDPO4104DataSource
-
y_offset
¶ Gets/sets the Y offset of the currently selected data source.
-
class
-
class
instruments.tektronix.
_TekDPO4104DataSource
(tek, name)[source]¶ Class representing a data source (channel, math, or ref) on the Tektronix DPO 4104.
Warning
This class should NOT be manually created by the user. It is designed to be initialized by the
TekDPO4104
class.-
read_waveform
(bin_format=True)[source]¶ Read waveform from the oscilloscope. This function is all inclusive. After reading the data from the oscilloscope, it unpacks the data and scales it accordingly. Supports both ASCII and binary waveform transfer.
Function returns a tuple (x,y), where both x and y are numpy arrays.
Parameters: bin_format (bool) – If True
, data is transfered in a binary format. Otherwise, data is transferred in ASCII.
-
y_offset
¶
-
-
class
instruments.tektronix.
_TekDPO4104Channel
(parent, idx)[source]¶ Class representing a channel on the Tektronix DPO 4104.
This class inherits from
_TekDPO4104DataSource
.Warning
This class should NOT be manually created by the user. It is designed to be initialized by the
TekDPO4104
class.-
coupling
¶ Gets/sets the coupling setting for this channel.
Type: TekDPO4104.Coupling
-
TekDPO70000
Oscilloscope¶
-
class
instruments.tektronix.
TekDPO70000
(filelike)[source]¶ The Tektronix DPO70000 series is a multi-channel oscilloscope with analog bandwidths ranging up to 33GHz.
This class inherits from
SCPIInstrument
.Example usage:
>>> import instruments as ik >>> tek = ik.tektronix.TekDPO70000.open_tcpip("192.168.0.2", 8888) >>> [x, y] = tek.channel[0].read_waveform()
-
class
AcquisitionMode
[source]¶ Enum containing valid acquisition modes for the Tektronix 70000 series oscilloscopes.
-
average
= 'AVE'¶
-
envelope
= 'ENV'¶
-
hi_res
= 'HIR'¶
-
peak_detect
= 'PEAK'¶
-
sample
= 'SAM'¶
-
waveform_db
= 'WFMDB'¶
-
-
class
AcquisitionState
[source]¶ Enum containing valid acquisition states for the Tektronix 70000 series oscilloscopes.
-
off
= 'OFF'¶
-
on
= 'ON'¶
-
run
= 'RUN'¶
-
stop
= 'STOP'¶
-
-
class
BinaryFormat
[source]¶ Enum containing valid binary formats for the Tektronix 70000 series oscilloscopes (int, unsigned-int, floating-point).
-
float
= 'FP'¶
-
int
= 'RI'¶
-
uint
= 'RP'¶
-
-
class
ByteOrder
[source]¶ Enum containing valid byte order (big-/little-endian) for the Tektronix 70000 series oscilloscopes.
-
big_endian
= 'MSB'¶
-
little_endian
= 'LSB'¶
-
-
class
Channel
(parent, idx)[source]¶ Class representing a channel on the Tektronix DPO 70000.
This class inherits from
TekDPO70000.DataSource
.Warning
This class should NOT be manually created by the user. It is designed to be initialized by the
TekDPO70000
class.-
class
Coupling
[source]¶ Enum containing valid coupling modes for the oscilloscope channel
-
ac
= 'AC'¶
-
dc
= 'DC'¶
-
dc_reject
= 'DCREJ'¶
-
ground
= 'GND'¶
-
-
query
(cmd, size=-1)[source]¶ Wraps queries sent from property factories in this class with identifiers for the specified channel.
Parameters: Returns: The query response
Return type:
-
sendcmd
(cmd)[source]¶ Wraps commands sent from property factories in this class with identifiers for the specified channel.
Parameters: cmd (str) – Command to send to the instrument
-
bandwidth
¶
-
coupling
¶ Gets/sets the coupling for the specified channel.
Example usage:
>>> import instruments as ik >>> inst = ik.tektronix.TekDPO70000.open_tcpip("192.168.0.1", 8080) >>> channel = inst.channel[0] >>> channel.coupling = channel.Coupling.ac
-
deskew
¶
-
label
¶ Just a human readable label for the channel.
-
label_xpos
¶ The x position, in divisions, to place the label.
-
label_ypos
¶ The y position, in divisions, to place the label.
-
offset
¶ The vertical offset in units of volts. Voltage is given by
offset+scale*(5*raw/2^15 - position)
.
-
position
¶ The vertical position, in divisions from the center graticule, ranging from
-8
to8
. Voltage is given byoffset+scale*(5*raw/2^15 - position)
.
-
scale
¶ Vertical channel scale in units volts/division. Voltage is given by
offset+scale*(5*raw/2^15 - position)
.
-
termination
¶
-
class
-
class
DataSource
(parent, name)[source]¶ Class representing a data source (channel, math, or ref) on the Tektronix DPO 70000.
Warning
This class should NOT be manually created by the user. It is designed to be initialized by the
TekDPO70000
class.-
read_waveform
(bin_format=True)[source]¶ Gets the waveform of the specified data source channel. This is an abstract property.
Parameters: bin_format (bool) – If the waveform should be transfered in binary ( True
) or ASCII (False
) formats.Returns: The waveform with both x and y components. Return type: numpy.ndarray
-
-
class
HorizontalMode
[source]¶ Enum containing valid horizontal scan modes for the Tektronix 70000 series oscilloscopes.
-
auto
= 'AUTO'¶
-
constant
= 'CONST'¶
-
manual
= 'MAN'¶
-
-
class
Math
(parent, idx)[source]¶ Class representing a math channel on the Tektronix DPO 70000.
This class inherits from
TekDPO70000.DataSource
.Warning
This class should NOT be manually created by the user. It is designed to be initialized by the
TekDPO70000
class.-
class
FilterMode
[source]¶ Enum containing valid filter modes for a math channel on the TekDPO70000 series oscilloscope.
-
centered
= 'CENT'¶
-
shifted
= 'SHIF'¶
-
-
class
Mag
[source]¶ Enum containing valid amplitude units for a math channel on the TekDPO70000 series oscilloscope.
-
db
= 'DB'¶
-
dbm
= 'DBM'¶
-
linear
= 'LINEA'¶
-
-
class
Phase
[source]¶ Enum containing valid phase units for a math channel on the TekDPO70000 series oscilloscope.
-
degrees
= 'DEG'¶
-
group_delay
= 'GROUPD'¶
-
radians
= 'RAD'¶
-
-
class
SpectralWindow
[source]¶ Enum containing valid spectral windows for a math channel on the TekDPO70000 series oscilloscope.
-
blackman_harris
= 'BLACKMANH'¶
-
flattop2
= 'FLATTOP2'¶
-
gaussian
= 'GAUSS'¶
-
hamming
= 'HAMM'¶
-
hanning
= 'HANN'¶
-
kaiser_besse
= 'KAISERB'¶
-
rectangular
= 'RECTANG'¶
-
tek_exponential
= 'TEKEXP'¶
-
-
query
(cmd, size=-1)[source]¶ Wraps queries sent from property factories in this class with identifiers for the specified math channel.
Parameters: Returns: The query response
Return type:
-
sendcmd
(cmd)[source]¶ Wraps commands sent from property factories in this class with identifiers for the specified math channel.
Parameters: cmd (str) – Command to send to the instrument
-
autoscale
¶ Enables or disables the auto-scaling of new math waveforms.
-
define
¶ A text string specifying the math to do, ex. CH1+CH2
-
filter_mode
¶
-
filter_risetime
¶
-
label
¶ Just a human readable label for the channel.
-
label_xpos
¶ The x position, in divisions, to place the label.
-
label_ypos
¶ The y position, in divisions, to place the label.
-
num_avg
¶ The number of acquisistions over which exponential averaging is performed.
-
position
¶ The vertical position, in divisions from the center graticule.
-
scale
¶ The scale in volts per division. The range is from
100e-36
to100e+36
.
-
spectral_center
¶ The desired frequency of the spectral analyzer output data span in Hz.
-
spectral_gatepos
¶ The gate position. Units are represented in seconds, with respect to trigger position.
-
spectral_gatewidth
¶ The time across the 10-division screen in seconds.
-
spectral_lock
¶
-
spectral_mag
¶ Whether the spectral magnitude is linear, db, or dbm.
-
spectral_phase
¶ Whether the spectral phase is degrees, radians, or group delay.
-
spectral_reflevel
¶ The value that represents the topmost display screen graticule. The units depend on spectral_mag.
-
spectral_reflevel_offset
¶
-
spectral_resolution_bandwidth
¶ The desired resolution bandwidth value. Units are represented in Hertz.
-
spectral_span
¶ Specifies the frequency span of the output data vector from the spectral analyzer.
-
spectral_suppress
¶ The magnitude level that data with magnitude values below this value are displayed as zero phase.
-
spectral_unwrap
¶ Enables or disables phase wrapping.
-
spectral_window
¶
-
threshhold
¶ The math threshhold in volts
-
unit_string
¶ Just a label for the units…doesn”t actually change anything.
-
class
-
class
SamplingMode
[source]¶ Enum containing valid sampling modes for the Tektronix 70000 series oscilloscopes.
-
equivalent_time_allowed
= 'ET'¶
-
interpolation_allowed
= 'IT'¶
-
real_time
= 'RT'¶
-
-
class
StopAfter
[source]¶ Enum containing valid stop condition modes for the Tektronix 70000 series oscilloscopes.
-
run_stop
= 'RUNST'¶
-
sequence
= 'SEQ'¶
-
-
class
TriggerState
[source]¶ Enum containing valid trigger states for the Tektronix 70000 series oscilloscopes.
-
armed
= 'ARMED'¶
-
auto
= 'AUTO'¶
-
dpo
= 'DPO'¶
-
partial
= 'PARTIAL'¶
-
ready
= 'READY'¶
-
-
class
WaveformEncoding
[source]¶ Enum containing valid waveform encoding modes for the Tektronix 70000 series oscilloscopes.
-
ascii
= 'ASCII'¶
-
binary
= 'BINARY'¶
-
-
select_fastest_encoding
()[source]¶ Sets the encoding for data returned by this instrument to be the fastest encoding method consistent with the current data source.
-
HOR_DIVS
= 10¶
-
VERT_DIVS
= 10¶
-
acquire_enhanced_enob
¶ Valid values are AUTO and OFF.
-
acquire_enhanced_state
¶
-
acquire_interp_8bit
¶ Valid values are AUTO, ON and OFF.
-
acquire_magnivu
¶
-
acquire_mode
¶
-
acquire_mode_actual
¶
-
acquire_num_acquisitions
¶ The number of waveform acquisitions that have occurred since starting acquisition with the ACQuire:STATE RUN command
-
acquire_num_avgs
¶ The number of waveform acquisitions to average.
-
acquire_num_envelop
¶ The number of waveform acquisitions to be enveloped
-
acquire_num_frames
¶ The number of frames acquired when in FastFrame Single Sequence and acquisitions are running.
-
acquire_num_samples
¶ The minimum number of acquired samples that make up a waveform database (WfmDB) waveform for single sequence mode and Mask Pass/Fail Completion Test. The default value is 16,000 samples. The range is 5,000 to 2,147,400,000 samples.
-
acquire_sampling_mode
¶
-
acquire_state
¶ This command starts or stops acquisitions.
-
acquire_stop_after
¶ This command sets or queries whether the instrument continually acquires acquisitions or acquires a single sequence.
-
channel
¶ Gets an iterator or list for easy Pythonic access to the various channel objects on the oscilloscope instrument. Typically generated by the
ProxyList
helper.
-
data_framestart
¶
-
data_framestop
¶
-
data_source
¶ Gets/sets the data source for the oscilloscope. This will return the actual Channel/Math/DataSource object as if it was accessed through the usual
TekDPO70000.channel
,TekDPO70000.math
, orTekDPO70000.ref
properties.Type: TekDPO70000.Channel
orTekDPO70000.Math
-
data_start
¶ The first data point that will be transferred, which ranges from 1 to the record length.
-
data_stop
¶ The last data point that will be transferred.
-
data_sync_sources
¶
-
horiz_acq_duration
¶ The duration of the acquisition.
-
horiz_acq_length
¶ The record length.
-
horiz_delay_mode
¶
-
horiz_delay_pos
¶ The percentage of the waveform that is displayed left of the center graticule.
-
horiz_delay_time
¶ The base trigger delay time setting.
-
horiz_interp_ratio
¶ The ratio of interpolated points to measured points.
-
horiz_main_pos
¶ The percentage of the waveform that is displayed left of the center graticule.
-
horiz_mode
¶
-
horiz_pos
¶ The position of the trigger point on the screen, left is 0%, right is 100%.
-
horiz_record_length
¶ The recond length in samples. See
horiz_mode
; manual mode lets you change the record length, while the length is readonly for auto and constant mode.
-
horiz_record_length_lim
¶ The recond length limit in samples.
-
horiz_roll
¶ Valid arguments are AUTO, OFF, and ON.
-
horiz_sample_rate
¶ The sample rate in samples per second.
-
horiz_scale
¶ The horizontal scale in seconds per division. The horizontal scale is readonly when
horiz_mode
is manual.
-
horiz_unit
¶
-
math
¶ Gets an iterator or list for easy Pythonic access to the various math data sources objects on the oscilloscope instrument. Typically generated by the
ProxyList
helper.
-
outgoing_binary_format
¶ Controls the data type of samples when transferring waveforms from the instrument to the host using binary encoding.
-
outgoing_byte_order
¶ Controls whether binary data is returned in little or big endian.
-
outgoing_n_bytes
¶ The number of bytes per sample used in representing outgoing waveforms in binary encodings.
Must be either 1, 2, 4 or 8.
-
outgoing_waveform_encoding
¶ Controls the encoding used for outgoing waveforms (instrument → host).
-
ref
¶ Gets an iterator or list for easy Pythonic access to the various ref data sources objects on the oscilloscope instrument. Typically generated by the
ProxyList
helper.
-
trigger_state
¶
-
class
TekTDS224
Oscilloscope¶
-
class
instruments.tektronix.
TekTDS224
(filelike)[source]¶ The Tektronix TDS224 is a multi-channel oscilloscope with analog bandwidths of 100MHz.
This class inherits from
SCPIInstrument
.Example usage:
>>> import instruments as ik >>> tek = ik.tektronix.TekTDS224.open_gpibusb("/dev/ttyUSB0", 1) >>> [x, y] = tek.channel[0].read_waveform()
-
class
Coupling
[source]¶ Enum containing valid coupling modes for the Tek TDS224
-
ac
= 'AC'¶
-
dc
= 'DC'¶
-
ground
= 'GND'¶
-
-
channel
¶ Gets a specific oscilloscope channel object. The desired channel is specified like one would access a list.
For instance, this would transfer the waveform from the first channel:
>>> import instruments as ik >>> tek = ik.tektronix.TekTDS224.open_tcpip('192.168.0.2', 8888) >>> [x, y] = tek.channel[0].read_waveform()
Return type: _TekTDS224Channel
-
data_source
¶ Gets/sets the the data source for waveform transfer.
-
data_width
¶ Gets/sets the byte-width of the data points being returned by the instrument. Valid widths are
1
or2
.Type: int
-
force_trigger
¶ Forces a trigger event to occur on the attached oscilloscope.
-
math
¶ Gets a data source object corresponding to the MATH channel.
Return type: _TekTDS224DataSource
-
ref
¶ Gets a specific oscilloscope reference channel object. The desired channel is specified like one would access a list.
For instance, this would transfer the waveform from the first channel:
>>> import instruments as ik >>> tek = ik.tektronix.TekTDS224.open_tcpip('192.168.0.2', 8888) >>> [x, y] = tek.ref[0].read_waveform()
Return type: _TekTDS224DataSource
-
class
TekTDS5xx
Oscilloscope¶
-
class
instruments.tektronix.
TekTDS5xx
(filelike)[source]¶ - Support for the TDS5xx series of oscilloscopes
- Implemented from:
- TDS Family Digitizing Oscilloscopes(TDS 410A, 420A, 460A, 520A, 524A, 540A, 544A,620A, 640A, 644A, 684A, 744A & 784A)Tektronix Document: 070-8709-07
-
class
Bandwidth
[source]¶ Bandwidth in MHz
-
FULL
= 'FUL'¶
-
OneHundred
= 'HUN'¶
-
Twenty
= 'TWE'¶
-
TwoHundred
= 'TWO'¶
-
-
class
Coupling
[source]¶ Available coupling options for input sources and trigger
-
ac
= 'AC'¶
-
dc
= 'DC'¶
-
ground
= 'GND'¶
-
-
class
Impedance
[source]¶ Available options for input source impedance
-
Fifty
= 'FIF'¶
-
OneMeg
= 'MEG'¶
-
-
class
Source
[source]¶ Available Data sources
-
CH1
= 'CH1'¶
-
CH2
= 'CH2'¶
-
CH3
= 'CH3'¶
-
CH4
= 'CH4'¶
-
Math1
= 'MATH1'¶
-
Math2
= 'MATH2'¶
-
Math3
= 'MATH3'¶
-
Ref1
= 'REF1'¶
-
Ref2
= 'REF2'¶
-
Ref3
= 'REF3'¶
-
Ref4
= 'REF4'¶
-
-
class
Trigger
[source]¶ Available Trigger sources (AUX not Available on TDS520A/TDS540A)
-
AUX
= 'AUX'¶
-
CH1
= 'CH1'¶
-
CH2
= 'CH2'¶
-
CH3
= 'CH3'¶
-
CH4
= 'CH4'¶
-
LINE
= 'LINE'¶
-
-
channel
¶ Gets a specific oscilloscope channel object. The desired channel is specified like one would access a list.
For instance, this would transfer the waveform from the first channel:
>>> tek = ik.tektronix.TekTDS5xx.open_tcpip('192.168.0.2', 8888) >>> [x, y] = tek.channel[0].read_waveform()
Return type: _TekTDS5xxChannel
-
clock
¶ Get/Set oscilloscope clock
Type: datetime.datetime
-
data_source
¶ Gets/sets the the data source for waveform transfer.
Type: TekTDS5xx.Source
or_TekTDS5xxDataSource
Return type: ‘_TekTDS5xxDataSource`
-
force_trigger
¶ Forces a trigger event to occur on the attached oscilloscope.
-
math
¶ Gets a data source object corresponding to the MATH channel.
Return type: _TekTDS5xxDataSource
-
measurement
¶ Gets a specific oscilloscope measurement object. The desired channel is specified like one would access a list.
Return type: _TDS5xxMeasurement
-
ref
¶ Gets a specific oscilloscope reference channel object. The desired channel is specified like one would access a list.
For instance, this would transfer the waveform from the first channel:
>>> tek = ik.tektronix.TekTDS5xx.open_tcpip('192.168.0.2', 8888) >>> [x, y] = tek.ref[0].read_waveform()
Return type: _TekTDS5xxDataSource
-
trigger_coupling
¶ Get/Set trigger coupling
Type: TekTDS5xx.Coupling
-
trigger_slope
¶ Get/Set trigger slope
Type: TekTDS5xx.Edge
-
trigger_source
¶ Get/Set trigger source
Type: TekTDS5xx.Trigger