Skip to main content

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alshain-0.1.2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

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

Hashes for alshain-0.1.2.tar.gz
Algorithm Hash digest
SHA256 aed3ee4a08ca9b092142ead7288b5cdae27ed391427048492387a9c921208ed7
MD5 ecacc09d2cf33bedb0a1177606bc3138
BLAKE2b-256 f786e54add64c8331351411d73c58ff36e5d0e4d8bad5ac5108fe02cf57d40bc

See more details on using hashes here.

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

Hashes for alshain-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d5ee37a0fc6c0c33a8dd2efcbb3a5b77be5f48d4976ad808d03b580176ec8747
MD5 59d2af00c35638ee4902d9df0fc4d1d8
BLAKE2b-256 7644b05cbca7f5874e153b75b05067ed5fac2911535de34297565675f8c37580

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page