Skip to main content

Oscilloscope scripts

This project contains interface to help you collect waveform data from osilloscope. TekTronix TBS2000B is supported now. If you prefer old version follow the course slides. Please check here: https://github.com/xzf89718/oscilloscope_scripts/tree/v7.2 and https://github.com/xzf89718/oscilloscope_scripts/releases/tag/v7.2

Getting started

Setup python and NI-VISA

For Windows

Python 3.8:
https://www.python.org/downloads/release/python-383/
NI-VISA:
https://www.ni.com/zh-cn/support/downloads/drivers/download.ni-visa.html

For Linux/Mac OS

Please install libserial libusb pyserial pyusb and install pure python base pyvisa-py

Install

Install package with pip

pip install oscilloscope-scripts-xzf8971  

Install package from github with pip

pip install git+https://github.com/xzf89718/oscilloscope_scripts

Get source code from github:

git clone git@github.com:xzf89718/oscilloscope_scripts.git

The commands here aim to setup package for python

pip install -U virtualenv  
virtualenv -p 3.8 ~/pyvisa_3d8  
~/pyvisa_3d8/Scripts/activate  

How to use this package

Every Login

cd ~/pyvisa_3d8/Scripts     
.\activate  

Use Tektronix_TBS2000B_scripts for TBS2000B DAQ

Batch mode

python -m Tektronix_TBS2000B_scripts this_is_an_example --n_save_waveforms 5 --save_channels CH1,CH2 --output_dir output_dir --scope_name auto --mode batch
# On macOS or linux
# python -m Tektronix_TBS2000B_scripts this_is_an_example --n_save_waveforms 5 --save_channels CH1,CH2 --output_dir output_dir --scope_name auto --mode batch --backend pyvisa-py

Interactive mode (for debug)

python -m Tektronix_TBS2000B_scripts this_is_an_example --n_save_waveforms 5 --save_channels CH1,CH2 --output_dir output_dir --scope_name auto --mode inter
# On macOS or linux
# python -m Tektronix_TBS2000B_scripts this_is_an_example --n_save_waveforms 5 --save_channels CH1,CH2 --output_dir output_dir --scope_name auto --mode inter --backend pyvisa-py
Enter your scope_name, also provide "default" and "auto" for quick setup  
auto  

If the setup is correct, you will got a plot contain waveforms from CH1 and CH2

Get some help

python  xxx.py --help  

Read the comments on the begin of each scripts

Other materials

In order to use the root scripts, you need ROOT and pyroot setup. Get Ubuntu20.04 VM with ROOT here: https://box.nju.edu.cn/d/045506afb0f347b78806/
How to build your own ROOT release on Ubuntu20.04: https://blog.csdn.net/weixin_44121665/article/details/102637844?spm=1001.2014.3001.5502
Data collected by me, without proper Impedance matching: https://box.nju.edu.cn/d/8c35131d91e846c4ada6/

Contact me

Author: Zifeng XU
Email:
zifeng.xu@foxmail.com
mg20220214@smail.nju.edu.cn
zifeng.xu@cern.ch

Metadata

Release files for oscilloscope-scripts-xzf8971 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oscilloscope-scripts-xzf8971 1.2.0
File Size Uploaded Provenance Actions
oscilloscope_scripts_xzf8971-1.2.0.tar.gz 26.5 kB Without provenance Details for oscilloscope_scripts_xzf8971-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for oscilloscope-scripts-xzf8971 1.2.0
File Interpreter ABI Platform Actions
oscilloscope_scripts_xzf8971-1.2.0-py3-none-any.whl Python 3 none any Details for oscilloscope_scripts_xzf8971-1.2.0-py3-none-any.whl

Total release size: 40.3 kB

Release files / oscilloscope_scripts_xzf8971-1.2.0.tar.gz

Download URL oscilloscope_scripts_xzf8971-1.2.0.tar.gz
Size 26.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4d0a106ad56afbbba6717381bbf2965cb5232ab86f96dec0dd9fba42e68a47bb
BLAKE2b-256 checksum
How to use checksums
fb0a66232e18f5926df52999696df7e37f6bf59abcff3feb560bc1cca98d3396
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.3

Release files / oscilloscope_scripts_xzf8971-1.2.0-py3-none-any.whl

Download URL oscilloscope_scripts_xzf8971-1.2.0-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
354040dd9108d8eba7ca62ada2294385a36d754dd0d5c98f3b270816c32eb42d
BLAKE2b-256 checksum
How to use checksums
34953231a824dd7f7f8f4a8245b2fa036c15f69193c4021320e2d10ac32d9137
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.3

Security for oscilloscope-scripts-xzf8971 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page