Skip to main content

A set of Python drivers for lab instrumentation.

Project description

Drivers

This is a set of Python drivers for lab instrumentation. These drivers are associated with nspyre, but are also suitable for general usage. Unless otherwise specified, drivers are provided under the terms of the MIT license.

Installation

pip install nspyre-drivers

Certain drivers require extra dependencies. Those dependencies can be installed by specifying a tag during the install. E.g. to install the DLI pdu driver dependencies, use:

pip install nspyre-drivers[dli_pdu]

A full listing of the tags is below.

beaglebone
dli_pdu
oceanoptics
ximea
zaber

For some USB drivers on Linux, you need to grant user access to the drivers in order for VISA to detect them: You should find the udev rules file in the same folder as the driver, then, e.g.:

sudo cp src/drivers/thorlabs/cld1010/99-thorlabs-cld1010.rules /etc/udev/rules.d/

Create a user group for the usb device access:

sudo groupadd usbtmc

Add any relevant users to the group:

usermod -aG usbtmc <myuser>

Reboot for the changes to take effect.

Usage

After installation, you can use drivers with, e.g.:

from drivers.rohde_schwarz.hmp4040.hmp4040 import HMP4040
with HMP4040('TCPIP::192.168.0.10::5025::SOCKET') as power_supply:
	# set the power supply channel 1 to 5V
	power_supply.set_voltage(1, 5.0)

See the source for all of the available drivers and the import paths.

Other Drivers

In order to minimize reinventing the wheel, below is a list of other sources of python instrument drivers. Please contribute if you find other useful sources!

pycobolt

Contributing

If you want to contribute driver code, please submit it as a pull request. This project uses poetry. If your driver requires specific dependencies beyond those currently in use in the project, you should include them in the pyproject.toml file as extras. See the poetry documentation for specifics on how to declare these dependencies.

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

nspyre_drivers-0.1.5.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

nspyre_drivers-0.1.5-py3-none-any.whl (31.7 kB view details)

Uploaded Python 3

File details

Details for the file nspyre_drivers-0.1.5.tar.gz.

File metadata

  • Download URL: nspyre_drivers-0.1.5.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.6 Linux/5.15.0-52-generic

File hashes

Hashes for nspyre_drivers-0.1.5.tar.gz
Algorithm Hash digest
SHA256 de42c9b0c177507b6b3afab8f158a323799bac5f02087e3a8b430082541df9e0
MD5 905f2ad20eda4c4b174636f93dbd99f4
BLAKE2b-256 b7ebb27d5b8c1278fe6ed7c2efceabd3dc13f58d1a2c86cbd3c7d5b6b071308a

See more details on using hashes here.

File details

Details for the file nspyre_drivers-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: nspyre_drivers-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 31.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.6 Linux/5.15.0-52-generic

File hashes

Hashes for nspyre_drivers-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ad69cf0d7ca15fcb6b7f478ae758465065ff67f07d78d804ff3e46443c58b98a
MD5 aa33f1486a027ced98a9f7fd41395a1a
BLAKE2b-256 b07ddf6e1eac5878764b98980884c0c818f73863ca4a9fd756ad2d2a25aa5f47

See more details on using hashes here.

Supported by

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