Skip to main content

A package to control and read data from oscilloscope. Support TekTronix TBS2000B now.

Project description

Oscilloscope scripts

This project contains interface to help you collect waveform data from osilloscope and transform them into root file. If you prefer old version follow the 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 or other lib as backen

Install

Install package with pip

pip install oscilloscope-scripts-xzf8971  
pip install git+
Get source code from github:  
```bash
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 --backen 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 --backen 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

Example: $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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oscilloscope_scripts_xzf8971-1.0.1.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oscilloscope_scripts_xzf8971-1.0.1-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file oscilloscope_scripts_xzf8971-1.0.1.tar.gz.

File metadata

File hashes

Hashes for oscilloscope_scripts_xzf8971-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4f6994079752b08eaf0e3d06edd437332e8d2b990c4e4a42149b7cb3508caf17
MD5 c170b076833a375ee0a6b593f6549fd9
BLAKE2b-256 b5f06cd58f8c9391ec0398240d813757e9203ee583447b4d0d92c8e19922ad1f

See more details on using hashes here.

File details

Details for the file oscilloscope_scripts_xzf8971-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for oscilloscope_scripts_xzf8971-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1f7752d0222cb97001e2e0e7cd7ca598742202e7ac96ff7946a6a7a7ad2fa979
MD5 913cae28ddcaf192e80ed80d18b9e484
BLAKE2b-256 f60f8e336623bd3e7d33e216f014f26ea37769edf4cded7064c59da390d4bb65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page