b22ao-0.0.9
توضیحات
API for B22 AO operations
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | b22ao-0.0.9 |
| نام | b22ao |
| نسخه کتابخانه | 0.0.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Douglas Winter |
| ایمیل نویسنده | douglas.winter@diamond.ac.uk |
| آدرس صفحه اصلی | https://gitlab.diamond.ac.uk/douglas/b22ao |
| آدرس اینترنتی | https://pypi.org/project/b22ao/ |
| مجوز | - |
# 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:
```python
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:
```json
{
"max_iter": 300,
"mirror": 2
}
```
نیازمندی
| مقدار | نام |
|---|---|
| - | numpy |
| - | scipy |
| - | dcor |
| - | pyepics |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl b22ao-0.0.9:
pip install b22ao-0.0.9.whl
نصب پکیج tar.gz b22ao-0.0.9:
pip install b22ao-0.0.9.tar.gz