Page 4 - ii
Page 5 - Contents
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) PyTek provides a python API for interacting with Tektronix oscilloscopes over a serial interface. It currently supports some basic commands for the TDS3k series of D P O ’ S (Digital Phosphor Oscilloscopes), especially capturing waveforms and screen ...
Page 7 - CHAPTER; Getting Started; To get started, try the
CHAPTER 1 Getting Started To get started, try the README , or for complete documentation, check out the pytek module API documentation page. 3
Page 8 - Chapter 1. Getting Started
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) 4 Chapter 1. Getting Started
Page 9 - Documentation Contents:; PyTek
CHAPTER 2 Documentation Contents: 2.1 README PyTek provides a python API for interacting with Tektronix oscilloscopes over a serial interface. It currently supports some basic commands for the TDS3000 series of Digital Phosphor Oscilloscopes, especially capturing waveforms and screen shots from the ...
Page 10 - $ pip install pyserial
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) Or, from source: $ python setup.py install Serial? We don’t provide a serial port implementation. We suggest, pyserial : $ pip install pyserial Examples? >>> from serial import Serial >>> from pytek import TDS3k >>> >>...
Page 11 - serial; Contact Information; bitbucket; Copyright and License
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) >>> tds . screenshot(ofile, "tiff" ) >>> >>> >>> >>> >>> #Fin. ... >>> tds . close() >>> Dependencies? You’ll need a serial port interface. See the “ Serial? ” section, a...
Page 12 - from; very important; close; port
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) 2.2 pytek module This is the top level module of the PyTek package. It provides classes for interfacing with various Tektronix oscillo- scopes over a serial interface. Most classes in this module are based on a specific series of devices, based on th...
Page 13 - tek; query; identify; pytek
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) • send_query - To send a query and get a one-line response. send_query ( query ) Sends a query to the device and reads back one line, returning that line (stripped of trailing whitespace). A ‘?’ and a linebreak are automatically appended to the end o...
Page 14 - trigger; auto
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) acquire_state ( [ val ] ) Configures or queries the value of the ACQUIRE:STATE setting on the device. If a value is given, then the setting is configured to the given value. If the value is None (the default), then the setting is queried and the valu...
Page 15 - tds; below
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) • trigger - indicates that the oscilloscope has seen a trigger and is acquiring the posttrigger information. get_waveform_preamble () Queries the waveform preamble from the device, which details how a waveform or curve will be transferredfrom the dev...
Page 16 - screenshot
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) • double ( bool ) – Optional, if True (the default), data points are transferred 16-bits per point, otherwise they are transferred 8-bits per point, which may cut off least significantbits but will transfer faster. • start ( int ) – Optional, the dat...
Page 18 - seq; module; class; Configurator; name; #Make sure it uses the ConfigurableMeta class as its metaclass,
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) check_img_format ( fmt ) Tests if a hardcopy image format is supported by the device. This simply sets the HARDCOPY:FORMAT configuration value to the given format, and checks to see if it comes back as the same format. Return True if the format is su...
Page 20 - With the above code, you could then do the following:; ’taz’
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) @Configurator.config def frobbed (self, val): ’’’ +++ Querying returns True for "ON", and False for "OFF". ’’’ if val == "ON" : return True if val == "OFF" : return False raise ValueError (val) @frobbed.setter def frob...
Page 21 - Parameters
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) False >>> >>> dev . frobbed( "ON" ) ~~~> FROBBED ON >>> dev . frobbed() ???? FROBBED <<<< ON True >>> >>> dev . frobbed( "???" ) Traceback (most recent call last): File "...
Page 22 - ConfigurableMeta; boolean
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) • doc ( callable ) – Optional: if given, used as the value of the doc attribute. DEFAULT_DOCTSTR = ‘\nConfigures or queries the value of the ‘‘%(NAME)s‘‘ setting on the device.\nIf a value is given, then the setting is configured to the given value.\...
Page 23 - config; explicit naming; foobar
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) For implicit arguments , you use this method as a function decorator directly, and the name to use is derived from the decorated function with func_to_name . In this mode, you can’t specify any additional arguments to pass to set_boolean . For explic...
Page 24 - setter
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) Since at this point the foobar symbol is actually a Configurator object, you can use its other decorators such as setter and getter . setter ( func ) A function wrapper which sets this object’s set attribute to the given function and passes the funct...
Page 25 - Configurable
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) depends on the value of the default parameter). For the non-strict set filter, values are simply evaluated as bools to choose which value to send. • default ( bool ) – Optional, default value is False . This is only used if strict is False , in which...
Page 26 - Version Number; version number; Major Version; major version number; Minor Version; minor version number; Patch Version; patch number; Semantic Version; semantic version number
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) Version Number The version number is a four part dotted number, with an optional tag on the end. Formally, a version number lookslike: version number ::= <Major>.<minor>[.<patch>[.<semantic>]][-[x-]<tag>] With each new r...
Page 27 - Compatibility Summary; Version Tag; version tag; Development code; development version; Specifying a version number
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) Compatibility Summary The following table summarizes compatibility for a hypothetical client application built against released PyTek version M.n.p.s : Component Compatibile (all) Incompatible (any) Major M != M minor >= n < n patch any semanti...
Page 28 - Interface Version; interface version; Release Number
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) Interface Version Because any change to the public interface requires a change to either the major or minor version numbers, the interfacecan be specified by a shortened two part version: interface version ::= <Major>.<minor> Note that th...
Page 29 - COPYRIGHT; YEAR; setuptools
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) pytek.version. COPYRIGHT = 2014 The copyright year for the PyTek code. pytek.version. YEAR = 2014 The year in which the code was released. See also: • MONTH • DAY • datestr pytek.version. MONTH = 4 The month in which the code was released. This is 1 ...
Page 30 - string; Like; datestr
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) pytek.version. string () Like setuptools_string , except leaves out the x- for development versions. pytek.version. datestr () Returns a simple string giving the date of release. Format of this string is unspecified, it intended to be humanreadable, ...
Page 43 - Indices and tables; genindex
CHAPTER 3 Indices and tables • genindex • modindex • search 39
Page 44 - Chapter 3. Indices and tables
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) 40 Chapter 3. Indices and tables
Page 45 - Version
CHAPTER 4 Version This documentation is for PyTek 1.1 (v1.1.1.0-x-dev). 41
Page 47 - Project Resources; PyTek on pypi
CHAPTER 5 Project Resources • PyTek project homepage (bitbucket) • PyTek on pypi • Online documentation: – Read The Docs (.org) – Python Hosted (.org) 43
Page 48 - Chapter 5. Project Resources
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) 44 Chapter 5. Project Resources
Page 49 - External References
CHAPTER 6 External References • TDS3000, TDS3000B & TDS3000C Series Programmer Manual (Tektronix.com) 45
Page 50 - Chapter 6. External References
PyTek Documentation, Release 1.1 (v1.1.1.0-x-dev) 46 Chapter 6. External References