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.2.tar.gz
(10.4 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.2-py3-none-any.whl
(10.0 kB
view details)
File details
Details for the file alshain-0.1.2.tar.gz.
File metadata
- Download URL: alshain-0.1.2.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aed3ee4a08ca9b092142ead7288b5cdae27ed391427048492387a9c921208ed7
|
|
| MD5 |
ecacc09d2cf33bedb0a1177606bc3138
|
|
| BLAKE2b-256 |
f786e54add64c8331351411d73c58ff36e5d0e4d8bad5ac5108fe02cf57d40bc
|
File details
Details for the file alshain-0.1.2-py3-none-any.whl.
File metadata
- Download URL: alshain-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.0 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 |
d5ee37a0fc6c0c33a8dd2efcbb3a5b77be5f48d4976ad808d03b580176ec8747
|
|
| MD5 |
59d2af00c35638ee4902d9df0fc4d1d8
|
|
| BLAKE2b-256 |
7644b05cbca7f5874e153b75b05067ed5fac2911535de34297565675f8c37580
|