Giter Site home page Giter Site logo

jacobfeder / drivers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nspyre-org/drivers

0.0 0.0 0.0 1.76 MB

A set of Python drivers for lab instrumentation.

License: MIT License

C++ 1.99% Python 24.34% C 0.35% C# 0.58% MATLAB 0.40% Rich Text Format 72.33%

drivers's Introduction

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
cobolt
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 nspyre_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.

drivers's People

Contributors

jacobfeder avatar bensoloway avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.