sdeux
By: chiesa Date: March 31, 2020 Copyright Alpes Lasers SA, Neuchatel, Switzerland
Driver for the Alpes Lasers S-2 pulser. Visit https://www.alpeslasers.ch/ for more informations.
Usage
See also the examples folder in the sdeux package.
import os
from sdeux.auto_detect import init_driver
from sdeux.communication import RETRY_NO, RETRY_SOME
from sdeux.serial_handler import S2SerialHandler
th = None
port = os.path.expanduser('~/tty.AL-S2')
retry_policy = RETRY_SOME # on communication errors, retries up to 3 times until a timeout of 3 seconds
# retry_policy = RETRY_NO # on communications errors, raise an exception directly
def print_status(s2_instance):
print_status = 'Measured current (A): {:.5f}\n'.format(s2_instance.measured_current) + \
'Measured voltage (V): {:.5f}\n'.format(s2_instance.measured_voltage) + \
'Target voltage (V): {:.5f}\n'.format(s2_instance.applied_voltage) + \
'Laser temperature (degC): {:.5f}\n'.format(s2_instance._info.laser_temperature) + \
'Overcurrent Limit (A): {:.5f}\n'.format(s2_instance.current_limit) + \
'MCU temperature (degC): {:.5f}\n'.format(s2_instance._info.MCU_temperature) + \
'Pulse Mode: {}\n'.format(s2_instance.pulsing_mode) + \
'Board Status: {}\n'.format(s2_instance.status_label)
print(print_status)
try:
th = S2SerialHandler(port)
th.open()
s2 = init_driver(th)
s2.set_up()
s2.retry_policy = retry_policy
print_status(s2)
finally:
if th:
th.close()
Metadata
Release files for sdeux 2026.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sdeux-2026.1.0.tar.gz | 298.7 kB | Without provenance | Details for sdeux-2026.1.0.tar.gz |
Release files / sdeux-2026.1.0.tar.gz
| Download URL | sdeux-2026.1.0.tar.gz |
|---|---|
| Size | 298.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4dc3c573dc974d9313a4ab7fe28bdd274f36756403e12bc95633bdede81179b8
|
|
BLAKE2b-256 checksum How to use checksums |
d924c3d00877f023e668ad3aba7320f5d11186bf77c92350758b6bf47cfe1680
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.9
|
Security for sdeux 2026.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.