Instrbuilder
Instrbuilder: A Python package for electrical instrument control - Published in JOSS (2019)
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
Repository
Basic Info
- Host: GitHub
- Owner: lucask07
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://lucask07.github.io/instrbuilder/build/html/
- Size: 16.1 MB
Statistics
- Stars: 8
- Watchers: 3
- Forks: 6
- Open Issues: 11
- Releases: 2
Metadata Files
README.md
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
- 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:
- NI-VISA downloads: links to downloads separated by OS.
- PyVISA backends: an explanation of what is needed.
- Install instrbuilder using pip.
console
username$ python -m pip install instrbuilder
Getting Started
- 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.
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.
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
- 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:
- An example YAML is available here on GitHub.
Extra Installation Steps if Using the Bluesky Suite from NSLS-II
- 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
- Repositories: 16
- Profile: https://github.com/lucask07
JOSS Publication
Instrbuilder: A Python package for electrical instrument control
Authors
Tags
instrument control data acquisition SCPI electrical engineering physics experimentsGitHub 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
Top Committers
| Name | 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
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
- Homepage: https://lucask07.github.io/instrbuilder/build/html/
- Documentation: https://instrbuilder.readthedocs.io/
- License: MIT
-
Latest release: 0.1.14
published about 4 years ago
Rankings
Maintainers (1)
Dependencies
- SystemRequirements *
- PyVISA *
- PyYAML *
- bluesky *
- colorama *
- databroker *
- matplotlib *
- numpy *
- oyaml *
- pandas *
- pyserial *
- pytest *
- scipy *
- setuptools *
- sphinx_rtd_theme *
- tabulate *
- wrapt *
