Interface library for Alshain Oy devices
Project description
Alshain
Python library for Alshain Oy devices
Quick start
# Pica photometer readout
import alshain
import serial
import sys
# Serial port as first command line parameter
com = serial.Serial( sys.argv[1], alshain.BAUDRATE, timeout = 0.25 )
dev = alshain.Pica( com, address = 1 )
# Enable photometer source
dev.write( alshain.Pica.Parameters.PULSE_ENABLE, 1 )
# Read results
print( dev.read( alshain.Pica.Parameters.RESULT ) )
# Strix SMU
import alshain
import serial
import sys
# Serial port as first command line parameter
com = serial.Serial( sys.argv[1], alshain.BAUDRATE, timeout = 5.0 )
smu = alshain.Strix( com, address = 1 )
voltage, current = smu.measure()
# Sylphium eco laser driver
import alshain
import serial
import sys
# Serial port as first command line parameter
com = serial.Serial( sys.argv[1], alshain.BAUDRATE, timeout = 0.25 )
laser = alshain.Sylphium( com, address = 1 )
# Set driver operating range to 3A
laser.write( alshain.Sylphium.Parameters.IRANGE, alshain.Sylphium.Options.IRANGE_3A )
# Set laser diode drive voltage to 12 V
laser.write( alshain.Sylphium.Parameters.V_SET, 12.0 )
# Set diode current limit to 250mA
laser.write( alshain.Sylphium.Parameters.I_LIMIT, 250e-3 )
# Enable laser output
laser.enable_output( True )
# Use either external or internal modulation to drive the diode
# Disable laser
laser.enable_output( False )
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
alshain-0.1.3.tar.gz
(10.5 kB
view details)
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
alshain-0.1.3-py3-none-any.whl
(10.2 kB
view details)
File details
Details for the file alshain-0.1.3.tar.gz.
File metadata
- Download URL: alshain-0.1.3.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2baad0c3ed79690f81d545b0efde7b423f30d3c67324226b19dca4160a81dc16
|
|
| MD5 |
1d43baebc8299af71423a9b7b5ee80df
|
|
| BLAKE2b-256 |
89c65af27d063f1e4a0ebb5ca1f9a19714495a5e4772a4f50623d8e971978f34
|
File details
Details for the file alshain-0.1.3-py3-none-any.whl.
File metadata
- Download URL: alshain-0.1.3-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
802c56efe0a3b4d585ea33858070ef769c0b19aa601639a39e496021a3f144e4
|
|
| MD5 |
932b452c009cc1d5ac42bc7e489e5cc8
|
|
| BLAKE2b-256 |
32364905c83d871e9645c04e3d095c01ac47d65c0e47f7dbfd1a591bfc0179b7
|