Modular instrument control and lab access via Python
Project description
Constellation is a package for simplifying instrument control. It is designed to build off of libraries like pyvisa and pyvisa-py and provide a complete ecosystem for instrument automation. As a brief example of what this can look like in its simplest form, here's an example script which connects to an instrument, resets it, then adjusts and reads some basic settings:
from constellation.all import *
# Create log object
log = plf.LogPile()
# Create NRX Driver
nrx = RohdeSchwarzNRX("TCPIP0::192.168.0.10::INSTR", log)
# Preset device
nrx.preset()
# Get meas frequency
nrx.set_meas_frequency(1e9)
fmeas = nrx.get_meas_frequency()
One of the key components of Constellation is a set of instrument drivers, one of which,
the RohdeSchwarzNRX class, was seen above. However, Constellation is more than just
a collection of driver classes. Some of its key features include:
- Instrument API standardization: Drivers inherit from category classes, guaranteeing that all instruments of the same category (ie. all oscilloscopes) will share a common API.
- Networking: In addition to directly connecting to and interfacing with your instruments, you can optionally use Constellation's networking classes to remotely access your instruments. This works by connecting multiple clients to a single server program over an AES-encrypted network. Typically one client would interface with the instrument drivers, while the other clients can be used to monitor or adjust experiments remotely.
- Autmoatic Rich Logging: Because Constellation's core use-case concerns scientific experiments,
robust and thorough logging is crucial. Constellation automates this via the pylogfile
library and records every command sent to the instruments. Logs can be saved in the binary and open-source HDF format, which can be viewed and analyzed usign the
lumberjackcommand line tool. - Ease of Creating New Drivers: The instrument category classes automate much of the work involved in creating a driver, meaning you only need to focus on finding the right SCPI commands to create any new drivers you need.
- (Work in progress) GUIs: GUI widgets for specific instrument categories make it easy to control or monitor your experiments.
Installation
Constellation can be installed via pip using
pip install constellation-py
TODO
Technical detail: Category system and Drivers
- How the categories work, with 0-n
- How they use ABCs to force correct usage
- They inherit RemoteInstrument so without the end user paying attention, they can be used across a network!
Include graphic of cateogry system, including remote access, drivers and GUIs.
Instrument Control Example
TODO = basic example
Networking
Technical Detail: Networking
- Mention TCPIP, AES, passwords, automatically setup database and server.
- Mention PyFrost (WIP)
Networking Example
TODO = Networking example
List of included drivers
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file constellation_core-0.0.0.dev0.tar.gz.
File metadata
- Download URL: constellation_core-0.0.0.dev0.tar.gz
- Upload date:
- Size: 56.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dcdd41b64e70894848e998e42cd9f5a588e3401f52b670b4dc064bd0fe908f1
|
|
| MD5 |
eb1bc666fd3b538e22548a9f010d22a2
|
|
| BLAKE2b-256 |
3269a63606681064187dfc3b0725c5fd0536d686fadc0f3dff9cde14800b5f0b
|
File details
Details for the file constellation_core-0.0.0.dev0-py3-none-any.whl.
File metadata
- Download URL: constellation_core-0.0.0.dev0-py3-none-any.whl
- Upload date:
- Size: 82.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74bc338adf4ded1aa9004055ce5a89279ff38b2dea9e2bd74611ec3ade75d1ea
|
|
| MD5 |
e6c753c7bedf00ded1a5eb697f9ac693
|
|
| BLAKE2b-256 |
7a4df82a55f2246d8787d960f35bacc4b9afb52ccdf8b4d35ed33fb4725281c7
|