opto
opto is a Python module that allows you to control Optotune focus tunable lenses using the Optotune Lens Driver 4. Tested with an Optotune EL-10-30.
Examples
Opens the serial port, connects to the Optotune, sets the lens current to 50 mA, and closes the serial port, gently returning the lens to 0 mA current:
from opto import Opto
o = Opto(port='/dev/cu.usbmodem1411')
o.connect()
o.current(50.0)
o.close(soft_close=True)
Alternatively, here we use the with statement to create a sinusoidal transition from minimum to maximum current and back:
from opto import Opto
import numpy as np
import time
with Opto(port='/dev/cu.usbmodem1411') as o:
current_low = o.current_lower()
current_high = o.current_upper()
current_delta = current_high-current_low
for i in np.linspace(0, 2*np.pi, 1000):
o.current(np.sin(i)*current_delta+current_low)
time.sleep(0.01)
Installation
Use pip to install from github:
pip install git+https://github.com/OrganicIrradiation/opto.git
or clone the package using git:
git clone https://github.com/OrganicIrradiation/opto.git
Requirements
Requires pySerial
Metadata
Release files for opto 0.1
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 | |
|---|---|---|---|---|
| opto-0.1.tar.gz | 5.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| opto-0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 11.9 kB
Release files / opto-0.1.tar.gz
| Download URL | opto-0.1.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41152d84af1943c9ade02b09d162d4f691f0b26a243c2e34c05cee63d1578928
|
|
BLAKE2b-256 checksum How to use checksums |
d7a7d16e603b7b973e78fe04a20592e982623357a1e4571f007c505cbc4b2b15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / opto-0.1-py2.py3-none-any.whl
| Download URL | opto-0.1-py2.py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
321557fc36ec99cc570248b15a3d0996ffbd23ce42b788eb33ab664364791178
|
|
BLAKE2b-256 checksum How to use checksums |
00c674ade62215dfddb182d134c3a29c01c192c2d7b105fef221fae34ae21fc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for opto 0.1
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.