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.1.tar.gz
(10.3 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.1-py3-none-any.whl
(10.0 kB
view details)
File details
Details for the file alshain-0.1.1.tar.gz.
File metadata
- Download URL: alshain-0.1.1.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c396f4608760751faf62c6ee933ec9a8ba647071f75096cf864e63573c8f12d
|
|
| MD5 |
adc87ba5fe8f0c67658695d2c7edf50f
|
|
| BLAKE2b-256 |
96bdeec6516fe3be9c60ad9782c572e6429cf5f45d8457196d20f246b942124b
|
File details
Details for the file alshain-0.1.1-py3-none-any.whl.
File metadata
- Download URL: alshain-0.1.1-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 |
52750da278d07d357fa70764041ce258e8cdebf03dfd6e0d2283096e68e21b54
|
|
| MD5 |
b4b7ce9f5b2ec61a6561706fceea8497
|
|
| BLAKE2b-256 |
dad3bcf89a1ec59defc199f3e0d99cf7bb29a2359b8329a87747c2baa3e9d602
|