b22ao: API for B22 adaptive optics operations
This package provides the basic API for Adaptive Optics scripts running at beamline B22 in Diamond Light Source.
Adaptive Optics operations must implement b22ao.base.BaseOperation, which provides methods for deforming mirrors and capturing images. The implementation is run by the AO manager which will inject any given JSON configuration file.
Example:
from b22ao.base import BaseOperation
import numpy
class MyAO(BaseOperation):
def start(self):
max_iter = self.config['max_iter']
self.select_dm(self.config['mirror'])
self.stopping = False
for iter in range(max_iter):
if self.stopping:
self.stopping = False
break
self.deform(numpy.zeros(97))
self.capture()
print("Finished!")
def stop(self):
self.stopping = True
And the configuration file:
{
"max_iter": 300,
"mirror": 2
}
Gotchas
1. The ZMQ_SERVER address
The ZMQ_SERVER global variable needs to point to the maching currently running pywincam, which will send the images over. When the workstation is changed/upgraded, the zmq server address needs to be updated too.
It is currently using the b22-down-11 endstation (as of Jan. 26), thus the configuration is:
ZMQ_SERVER = "b22-down-11.diamond.ac.uk"
ZMQ_DATA_PORT = 1515
ZMQ_CAMERA_TRIGGER_PORT = 1516
Metadata
Release files for b22ao 0.2.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 |
|---|---|---|---|---|
| b22ao-0.2.0.tar.gz | 18.3 kB | Without provenance | Details for b22ao-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| b22ao-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for b22ao-0.2.0-py3-none-any.whl |
Total release size: 30.0 kB
Release files / b22ao-0.2.0.tar.gz
| Download URL | b22ao-0.2.0.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
081270d626756a6d461e17d0876c86b021e8a798075c2d03a23794e1d8d224f2
|
|
BLAKE2b-256 checksum How to use checksums |
d3e3609b90cc32d3b3d736d8683f3427c04825a032830efd8b9dd815bd6188f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / b22ao-0.2.0-py3-none-any.whl
| Download URL | b22ao-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b8b8943182b8f3fa98e5f1f41a56da75a1273f94bb827cbfdff0dd7a4b6cb80
|
|
BLAKE2b-256 checksum How to use checksums |
319b59048122c4df0151e7e2daacd1f84803451634c59ae1b2a3f205f71acc0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for b22ao 0.2.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.