SDK for typical devices found in an atomic physics research lab.
Project description
labdevices
SDK for devices used in our atomic physics research lab. Since there is probably more of those devices used in other labs as well, this package might be of a more general use.
Included devices
The given links guide you to the programmer manuals of the included devices.
Company | Model |
---|---|
ANDO | AQ-6315A/B spectrum analyzer |
Allied Vision | GigE cameras |
Applied Motion Products | STF03D stepper motor controller |
Keysight | 3000T X-Series oscilloscope |
53220A/53230A counter | |
Kuhne Electronic | MKU LO 8-13 PLL local oscillator |
Newport | SMC100 positioner controller |
Pfeiffer Vacuum | TPG362 vacuum gauge |
Rohde & Schwarz | FPC1000 spectrum analyzer |
RTB2000 oscilloscope | |
Stanford Research Systems | DG645 delay generator |
Thorlabs | TSP01 temperature sensor |
Third party dependencies
Most dependencies are installed automatically. For some devices, however, there are exceptions that need to be installed manually:
- ANDO spectrometer: prologix-gpib-ethernet
- Allied Vision GigE cameras: Vimba SDK
Installation
It is recommended to install the package into a virtual environment.
A) For development
Clone the repository. From inside the package folder run
pip install -e .
Changes in the code will then be reflected when reimporting the labdevices package. No new installation necessary.
There is also a Jupyter Notebook provided that contains some use examples and is handy for development.
B) For general use
pip install labdevices
Usage
Once the labdevices package is installed, for example simply do
from labdevices.thorlabs import TSP01
For each device there should be a dummy device available in order to test software, when there is actually no device connected. For the switching to a dummy device simply import
from labdevices.thorlabs import TSP01Dummy
with Dummy added to the device's class name.
Troubleshooting
Ubuntu
If you want to read a VISA address with the pyvisa package and you get a message of the following type
Found a device whose serial number cannot be read. The partial VISA resource name is: USB0::2733::443::???::2::INSTR
the issue is related to the permissions regarding the udev rules. If you don't have permission to write on USB devices you will not be able to communicate properly with the device. To solve this problem (see also here) you have to create a group with the name usb by
addgroup --system usb
Next, add your user to that group by
sudo adduser <user> usb
where <user>
is your Ubuntu user name, which is also shown in the terminal at the beginning of each line.
Create a file in /etc/udev/rules.d/
with the name 50-myusb.rules
(if it does not exist yet) and add the following line
SUBSYSTEM=="usb", MODE="0666", GROUP="usb"
After restarting the PC check that you are part of the usb group by typing groups
into the terminal.
The communication with the usb device should now work.
Ethernet devices
If an Ethernet device is not recognized, check its settings. Usually a fixed IP address can be given, which should be part of the local subnet.
Contact
- Repo owner: Julian Krauth, j.krauth@vu.nl
- Institution: Vrije Universiteit Amsterdam, Faculty of Sciences, The Netherlands
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
Built Distribution
Hashes for labdevices-0.9.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f005179d4443a081e4479b2e34f7451ab9ee104a54435584423a6f7f3dfc358 |
|
MD5 | a0a3fc6b485256d0d53d404a97080b3f |
|
BLAKE2b-256 | c6898b4e07cbb68907e09c176d5bba8195aaf1bc355491e2424860e9942ae98a |