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.4.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.4-py3-none-any.whl
(10.2 kB
view details)
File details
Details for the file alshain-0.1.4.tar.gz.
File metadata
- Download URL: alshain-0.1.4.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 |
39eb4b4ea056d3697b39116d0b9984939729fa17aaf9ff75a8afb93502ff75e4
|
|
| MD5 |
a3c1fc369ede3073faad571d80c59abf
|
|
| BLAKE2b-256 |
5a1d83f7bf2cc5735604f998b9b2b4c8b184905932adafdde656c7d6b1317dc2
|
File details
Details for the file alshain-0.1.4-py3-none-any.whl.
File metadata
- Download URL: alshain-0.1.4-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 |
711c59d81d88d7b8ae1f08c27d2f30e77901b8dd4a52fc089a9cdf03134d8d88
|
|
| MD5 |
a407aea751e7ab9abcb2514a91c45d02
|
|
| BLAKE2b-256 |
adeecd0c75dea92563b91ecb42cba676212dfea4f6be18e68dad06056b99ae7a
|