Instrbuilder

Instrbuilder: A Python package for electrical instrument control - Published in JOSS (2019)

https://github.com/lucask07/instrbuilder

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    2 of 4 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Scientific Fields

Mathematics Computer Science - 37% confidence
Last synced: 6 months ago · JSON representation

Repository

Basic Info
Statistics
  • Stars: 8
  • Watchers: 3
  • Forks: 6
  • Open Issues: 11
  • Releases: 2
Created over 7 years ago · Last pushed 9 months ago
Metadata Files
Readme License Code of conduct Authors

README.md

Build Status DOI

instrbuilder is an open-source Python package for control of electrical instruments. This package eases the development of high-level "drivers" to interface with oscilloscopes, power supplies, function generators, multimeters, or any instrument that uses ASCII textual string communication (such as SCPI). instrbuilder is particularly suited for prototying and automating experiments in research laboratory setups within an IPython terminal. Our goals are to accelerate the development of automated data collection and improve the reproducibility of laboratory experiments.

Related Journal Papers

  • L. Koerner "Instrbuilder: A Python package for electrical instrument control" The Journal of Open Source Software: doi
  • L. Koerner, T. Caswell, D. Allan, and S. Campbell "A Python instrument control and data acquisition suite for reproducible research" IEEE Transactions on Instrumentation and Measurement doi

Documentation

https://lucask07.github.io/instrbuilder/build/html/

Installation Steps

  1. Install a VISA driver (National Instruments provides free downloads). The PyVISA documentation page is an excellent resource to locate a VISA driver for your system:
  1. Install instrbuilder using pip.

console username$ python -m pip install instrbuilder

Getting Started

  1. Command lists for Keysight oscilloscopes, function generator, DMM; Rigol DC Power Supply (commands.csv) are included in the package at: instrbuilder/instruments/.

Locate the instrument command files using the following python commands:

python import instrbuilder init_file_loc = instrbuilder.__file__ instrument_cmds = init_file_loc.replace('__init__.py', 'instruments/') print('Instrument commmands (csv files) are at: {}'.format(instrument_cmds)) Note that you can move the command csv files (and probably should). The location of these needs to be specified in the YAML configuration file.

  1. A YAML file is used to track your specific system configurations and instrument addresses (e.g. USB0::0x0957::0x0407::MY44060286::INSTR). Create your system YAML file using the steps below. This will be generated at ~/.instrbuilder/ (where ~ indicates your home directory). See the example YAML on GitHub.

  2. Try an example in the source code at instrbuilder/examples/. A Keysight and Rigol Oscilloscope is demonstrated in: oscilloscope.py.

Locate the example directory using the following python commands:

python import instrbuilder init_file_loc = instrbuilder.__file__ examples = init_file_loc.replace('__init__.py', 'examples/') print('Examples are at: {}'.format(examples))

Create Your YAML

  1. Initialize a YAML (specify the first parameter, the other 3 should always be default):

python from instrbuilder import instrument_opening instrument_opening.init_yaml(csv_dir = 'where/your/commands_csv/files/are') 2. To add instruments to the YAML function use the script found in instrbuilder/examples/addinstrumentsto_config.py. This will prompt the user for information. Note that it may be helpful to have only one instrument connected/powered at a time so that there is no ambiguity:

  1. An example YAML is available here on GitHub.

Extra Installation Steps if Using the Bluesky Suite from NSLS-II

  1. If using the Bluesky suite uninstall ophyd and re-install from a git fork:

console username$ python -m pip uninstall ophyd username$ python -m pip install git+https://github.com/lucask07/ophyd@master#egg=ophyd

To check if the correct ophyd fork was installed try:

python from ophyd.ee_instruments import generate_ophyd_obj This warning:

Error: <class 'ImportError'> IC (integrated circuit imports failed) The aardvark.so or dll must be in the cwd or an importable path Continuing anyways, since many may not use this portion... is OK. A module import error is not.

A basic Bluesky demo is at instrbuilder/blueskydemo/fgoscilloscope_basics.py

Owner

  • Name: Lucas Koerner
  • Login: lucask07
  • Kind: user

JOSS Publication

Instrbuilder: A Python package for electrical instrument control
Published
April 15, 2019
Volume 4, Issue 36, Page 1172
Authors
Lucas J. Koerner ORCID
Lucas J. Koerner, Department of Electrical and Computer Engineering, University of St. Thomas
Editor
Ariel Rokem ORCID
Tags
instrument control data acquisition SCPI electrical engineering physics experiments

GitHub Events

Total
  • Issues event: 2
  • Issue comment event: 3
  • Push event: 3
  • Pull request event: 5
  • Pull request review event: 2
  • Fork event: 1
Last Year
  • Issues event: 2
  • Issue comment event: 3
  • Push event: 3
  • Pull request event: 5
  • Pull request review event: 2
  • Fork event: 1

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 189
  • Total Committers: 4
  • Avg Commits per committer: 47.25
  • Development Distribution Score (DDS): 0.058
Past Year
  • Commits: 4
  • Committers: 2
  • Avg Commits per committer: 2.0
  • Development Distribution Score (DDS): 0.25
Top Committers
Name Email Commits
Lucas Koerner k****s@s****u 178
Stefan n****t 5
Dat Dinh d****2@s****u 3
Jeremy Stashluk s****j@g****m 3
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 24
  • Total pull requests: 8
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 7 days
  • Total issue authors: 4
  • Total pull request authors: 3
  • Average comments per issue: 0.75
  • Average comments per pull request: 0.0
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 3
  • Average time to close issues: 7 days
  • Average time to close pull requests: 12 days
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 3.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • lucask07 (21)
  • konosubakonoakua (1)
  • brainstorm (1)
  • dinhphucdat (1)
Pull Request Authors
  • dinhphucdat (6)
  • nopeppermint (3)
  • stashlukj (2)
Top Labels
Issue Labels
ToDo (9) need for paper (6) style (5) enhancement (4) question (2) docs (2) help wanted (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 14 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 12
  • Total maintainers: 1
pypi.org: instrbuilder

electrical instrument control

  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 14 Last month
Rankings
Dependent packages count: 10.1%
Forks count: 15.4%
Stargazers count: 18.5%
Average: 20.7%
Dependent repos count: 21.6%
Downloads: 38.0%
Maintainers (1)
Last synced: 6 months ago

Dependencies

docs/build/html/_sources/system_requirements.rst.txt pypi
  • SystemRequirements *
requirements.txt pypi
  • PyVISA *
  • PyYAML *
  • bluesky *
  • colorama *
  • databroker *
  • matplotlib *
  • numpy *
  • oyaml *
  • pandas *
  • pyserial *
  • pytest *
  • scipy *
  • setuptools *
  • sphinx_rtd_theme *
  • tabulate *
  • wrapt *
setup.py pypi