opticalib 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- opticalib-1.0.0/LICENSE +21 -0
- opticalib-1.0.0/MANIFEST.in +5 -0
- opticalib-1.0.0/PKG-INFO +98 -0
- opticalib-1.0.0/README.md +55 -0
- opticalib-1.0.0/opticalib/__init__.py +53 -0
- opticalib-1.0.0/opticalib/__version__.py +29 -0
- opticalib-1.0.0/opticalib/alignment.py +920 -0
- opticalib-1.0.0/opticalib/analyzer.py +1068 -0
- opticalib-1.0.0/opticalib/core/__init__.py +20 -0
- opticalib-1.0.0/opticalib/core/_configurations/configuration.yaml +127 -0
- opticalib-1.0.0/opticalib/core/exceptions.py +42 -0
- opticalib-1.0.0/opticalib/core/fitsarray.py +344 -0
- opticalib-1.0.0/opticalib/core/read_config.py +472 -0
- opticalib-1.0.0/opticalib/core/root.py +377 -0
- opticalib-1.0.0/opticalib/devices/_API/__init__.py +27 -0
- opticalib-1.0.0/opticalib/devices/_API/alpaoAPI.py +90 -0
- opticalib-1.0.0/opticalib/devices/_API/base_devices.py +113 -0
- opticalib-1.0.0/opticalib/devices/_API/i4d.py +426 -0
- opticalib-1.0.0/opticalib/devices/_API/micAPI.py +171 -0
- opticalib-1.0.0/opticalib/devices/_API/splattAPI.py +183 -0
- opticalib-1.0.0/opticalib/devices/__init__.py +29 -0
- opticalib-1.0.0/opticalib/devices/cameras.py +170 -0
- opticalib-1.0.0/opticalib/devices/deformable_mirrors.py +534 -0
- opticalib-1.0.0/opticalib/devices/interferometer.py +676 -0
- opticalib-1.0.0/opticalib/dmutils/__init__.py +35 -0
- opticalib-1.0.0/opticalib/dmutils/actuator_identification_lib.py +81 -0
- opticalib-1.0.0/opticalib/dmutils/flattening.py +521 -0
- opticalib-1.0.0/opticalib/dmutils/iff_acquisition_preparation.py +408 -0
- opticalib-1.0.0/opticalib/dmutils/iff_module.py +113 -0
- opticalib-1.0.0/opticalib/dmutils/iff_processing.py +846 -0
- opticalib-1.0.0/opticalib/dmutils/pupil_calibration.py +187 -0
- opticalib-1.0.0/opticalib/ground/__init__.py +28 -0
- opticalib-1.0.0/opticalib/ground/computerec.py +348 -0
- opticalib-1.0.0/opticalib/ground/geo.py +193 -0
- opticalib-1.0.0/opticalib/ground/logger.py +157 -0
- opticalib-1.0.0/opticalib/ground/modal_decomposer.py +623 -0
- opticalib-1.0.0/opticalib/ground/osutils.py +583 -0
- opticalib-1.0.0/opticalib/ground/roi.py +160 -0
- opticalib-1.0.0/opticalib/ground/zernike.py +545 -0
- opticalib-1.0.0/opticalib/py.typed +0 -0
- opticalib-1.0.0/opticalib/simulator/__init__.py +2 -0
- opticalib-1.0.0/opticalib/simulator/deformable_mirrors.py +239 -0
- opticalib-1.0.0/opticalib/simulator/interferometer.py +319 -0
- opticalib-1.0.0/opticalib/typings.py +318 -0
- opticalib-1.0.0/opticalib.egg-info/PKG-INFO +98 -0
- opticalib-1.0.0/opticalib.egg-info/SOURCES.txt +68 -0
- opticalib-1.0.0/opticalib.egg-info/dependency_links.txt +1 -0
- opticalib-1.0.0/opticalib.egg-info/entry_points.txt +2 -0
- opticalib-1.0.0/opticalib.egg-info/requires.txt +15 -0
- opticalib-1.0.0/opticalib.egg-info/top_level.txt +3 -0
- opticalib-1.0.0/requirements.txt +15 -0
- opticalib-1.0.0/setup.cfg +27 -0
- opticalib-1.0.0/setup.py +43 -0
- opticalib-1.0.0/setup_calpy.py +144 -0
- opticalib-1.0.0/tests/__init__.py +4 -0
- opticalib-1.0.0/tests/conftest.py +275 -0
- opticalib-1.0.0/tests/test_core_exceptions.py +125 -0
- opticalib-1.0.0/tests/test_core_fits.py +327 -0
- opticalib-1.0.0/tests/test_core_read_config.py +390 -0
- opticalib-1.0.0/tests/test_core_root.py +248 -0
- opticalib-1.0.0/tests/test_dmutils_flattening.py +219 -0
- opticalib-1.0.0/tests/test_dmutils_iff_acquisition_preparation.py +390 -0
- opticalib-1.0.0/tests/test_dmutils_iff_module.py +176 -0
- opticalib-1.0.0/tests/test_dmutils_iff_processing.py +332 -0
- opticalib-1.0.0/tests/test_ground_computerec.py +265 -0
- opticalib-1.0.0/tests/test_ground_logger.py +169 -0
- opticalib-1.0.0/tests/test_ground_modal_decomposer.py +438 -0
- opticalib-1.0.0/tests/test_ground_osutils.py +283 -0
- opticalib-1.0.0/tests/test_ground_roi.py +237 -0
opticalib-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Pietro Ferraiuolo (pietro.ferraiuolo@inaf.it)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
opticalib-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: opticalib
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: This package is a python interface for laboratory adaptive optics systems, with a focus on the calibration of deformable mirrors (DMs) and the acquisition of wavefront data using interferometers.
|
|
5
|
+
Home-page: https://github.com/pietroferraiuolo/LABOTT
|
|
6
|
+
Author: Adaptive Optics Group - INAF - Osservatorio Astrofisico di Arcetri
|
|
7
|
+
Author-email: pietro.ferraiuolo@inaf.it
|
|
8
|
+
Maintainer: Pietro Ferraiuolo
|
|
9
|
+
License: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: Unix
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: arte
|
|
17
|
+
Requires-Dist: astropy
|
|
18
|
+
Requires-Dist: scikit-image
|
|
19
|
+
Requires-Dist: scikit-learn
|
|
20
|
+
Requires-Dist: thin-plate-spline
|
|
21
|
+
Requires-Dist: scipy
|
|
22
|
+
Requires-Dist: plico_dm
|
|
23
|
+
Requires-Dist: ruamel.yaml
|
|
24
|
+
Requires-Dist: Pyro4
|
|
25
|
+
Requires-Dist: h5py
|
|
26
|
+
Requires-Dist: jdcal
|
|
27
|
+
Requires-Dist: tqdm
|
|
28
|
+
Requires-Dist: matplotlib
|
|
29
|
+
Requires-Dist: xupy
|
|
30
|
+
Requires-Dist: numpy
|
|
31
|
+
Dynamic: author
|
|
32
|
+
Dynamic: author-email
|
|
33
|
+
Dynamic: classifier
|
|
34
|
+
Dynamic: description
|
|
35
|
+
Dynamic: description-content-type
|
|
36
|
+
Dynamic: home-page
|
|
37
|
+
Dynamic: license
|
|
38
|
+
Dynamic: license-file
|
|
39
|
+
Dynamic: maintainer
|
|
40
|
+
Dynamic: requires-dist
|
|
41
|
+
Dynamic: requires-python
|
|
42
|
+
Dynamic: summary
|
|
43
|
+
|
|
44
|
+
# OptiCalib : adaptive OPTics package for deformable dirrors CALibration
|
|
45
|
+
|
|
46
|
+

|
|
47
|
+
|
|
48
|
+
`Adaptive Optics Group, INAF - Osservatorio Astrofisico di Arcetri`
|
|
49
|
+
|
|
50
|
+
- [Pietro Ferraiuolo](mailto:pietro.ferraiuolo@inaf.it)
|
|
51
|
+
|
|
52
|
+
- [Marco Xompero](mailto:marco.xompero@inaf.it)
|
|
53
|
+
|
|
54
|
+
OptiCalib is a python package which first goal is to make easy deformable mirror's calibration in the laboratory (and not only).
|
|
55
|
+
|
|
56
|
+
It was born as a general extrapolation of the software built for the control and calibration of the `ELT @ M4` adaptive mirror and it's calibration tower, `OTT` (`Optical Test Tower`).
|
|
57
|
+
|
|
58
|
+
## Description
|
|
59
|
+
|
|
60
|
+
The `OPTICALIB` package serves two main purposes:
|
|
61
|
+
|
|
62
|
+
- Making connection to the hardware (interferometers, DMs, ...) easy;
|
|
63
|
+
|
|
64
|
+
- Providing routines for Deformable Mirrors calibrations.
|
|
65
|
+
|
|
66
|
+
It can be installed from the repository, while waiting for an official release, as
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pip install git+"https://github.com/pietroferraiuolo/labott.git"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The software will create an entry point script called `calpy`, which is usefull to set up a specific experiment's environment. Let's say we have an optical bench composed of an interferometer 4D PhaseCam6110 and an Alpao Deformable mirror, say DM820. We can create the experiment's environment just like:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
calpy -f ~/alpao_experiment --create
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
This will create, in the `~/alpao_experiment` folder, the package's data folder tree, together with a configuration file in the `SysConfig` folder. The [configuration file](./opticalib/core/_configurations/configuration.yaml), documented [here](./opticalib/core/_configurations/DOCS.md), is where all devices must be specified.
|
|
79
|
+
|
|
80
|
+
Once done with the configuration, we can then start using out instruments:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
calpy -f ~/alpao_experiment
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
# The `calpy` function will automatically import opticalib (with `opt` as alias), as well as the `opticalib.dmutils` as dmutils
|
|
88
|
+
|
|
89
|
+
interf = opt.PhaseCam(6110) # set in the configuration file
|
|
90
|
+
dm = opt.AlpaoDm(820) # set in the configuration file
|
|
91
|
+
|
|
92
|
+
# Having the bench set up and the configuration file set, we can acquire an Influence Function by just doing
|
|
93
|
+
|
|
94
|
+
tn = dmutils.iff_module.iffDataAcquisition(dm, interf) # Optional paramenters are `modesList, modesAmplitude, template`, which if not specified are read from the configuration file
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Documentation
|
|
98
|
+
For the API references, check [here](docs/opticalib.pdf) (work in progress...), while for the configuration file documentation check [here](./opticalib/core/_configurations/DOCS.md)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# OptiCalib : adaptive OPTics package for deformable dirrors CALibration
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
`Adaptive Optics Group, INAF - Osservatorio Astrofisico di Arcetri`
|
|
6
|
+
|
|
7
|
+
- [Pietro Ferraiuolo](mailto:pietro.ferraiuolo@inaf.it)
|
|
8
|
+
|
|
9
|
+
- [Marco Xompero](mailto:marco.xompero@inaf.it)
|
|
10
|
+
|
|
11
|
+
OptiCalib is a python package which first goal is to make easy deformable mirror's calibration in the laboratory (and not only).
|
|
12
|
+
|
|
13
|
+
It was born as a general extrapolation of the software built for the control and calibration of the `ELT @ M4` adaptive mirror and it's calibration tower, `OTT` (`Optical Test Tower`).
|
|
14
|
+
|
|
15
|
+
## Description
|
|
16
|
+
|
|
17
|
+
The `OPTICALIB` package serves two main purposes:
|
|
18
|
+
|
|
19
|
+
- Making connection to the hardware (interferometers, DMs, ...) easy;
|
|
20
|
+
|
|
21
|
+
- Providing routines for Deformable Mirrors calibrations.
|
|
22
|
+
|
|
23
|
+
It can be installed from the repository, while waiting for an official release, as
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install git+"https://github.com/pietroferraiuolo/labott.git"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The software will create an entry point script called `calpy`, which is usefull to set up a specific experiment's environment. Let's say we have an optical bench composed of an interferometer 4D PhaseCam6110 and an Alpao Deformable mirror, say DM820. We can create the experiment's environment just like:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
calpy -f ~/alpao_experiment --create
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This will create, in the `~/alpao_experiment` folder, the package's data folder tree, together with a configuration file in the `SysConfig` folder. The [configuration file](./opticalib/core/_configurations/configuration.yaml), documented [here](./opticalib/core/_configurations/DOCS.md), is where all devices must be specified.
|
|
36
|
+
|
|
37
|
+
Once done with the configuration, we can then start using out instruments:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
calpy -f ~/alpao_experiment
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
# The `calpy` function will automatically import opticalib (with `opt` as alias), as well as the `opticalib.dmutils` as dmutils
|
|
45
|
+
|
|
46
|
+
interf = opt.PhaseCam(6110) # set in the configuration file
|
|
47
|
+
dm = opt.AlpaoDm(820) # set in the configuration file
|
|
48
|
+
|
|
49
|
+
# Having the bench set up and the configuration file set, we can acquire an Influence Function by just doing
|
|
50
|
+
|
|
51
|
+
tn = dmutils.iff_module.iffDataAcquisition(dm, interf) # Optional paramenters are `modesList, modesAmplitude, template`, which if not specified are read from the configuration file
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Documentation
|
|
55
|
+
For the API references, check [here](docs/opticalib.pdf) (work in progress...), while for the configuration file documentation check [here](./opticalib/core/_configurations/DOCS.md)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""
|
|
2
|
+
OPTICALIB: adaptive OPTIcs package for dm CALIBration
|
|
3
|
+
=====================================================
|
|
4
|
+
|
|
5
|
+
Author(s)
|
|
6
|
+
---------
|
|
7
|
+
- Pietro Ferraiuolo : pietro.ferraiuolo@inaf.it
|
|
8
|
+
|
|
9
|
+
Description
|
|
10
|
+
-----------
|
|
11
|
+
`opticalib` is a package for the control of laboratory instrumentations, like
|
|
12
|
+
Interferometers and Deformable Mirrors. It also provides tools for the
|
|
13
|
+
analysis of wavefronts and images.
|
|
14
|
+
|
|
15
|
+
How to Use:
|
|
16
|
+
-----------
|
|
17
|
+
```python
|
|
18
|
+
> import opticalib
|
|
19
|
+
> interf = opticalib.PhaseCam('193.206.155.218', 8011)
|
|
20
|
+
> img = interf.acquire_map()
|
|
21
|
+
```
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
from .__version__ import __version__
|
|
25
|
+
from . import analyzer
|
|
26
|
+
from .ground.osutils import load_fits, save_fits, getFileList, read_phasemap
|
|
27
|
+
from .core.root import (
|
|
28
|
+
folders,
|
|
29
|
+
create_configuration_file,
|
|
30
|
+
)
|
|
31
|
+
from .core import read_config
|
|
32
|
+
from .core.fitsarray import fits_array
|
|
33
|
+
from .devices import *
|
|
34
|
+
from .devices.interferometer import _4DInterferometer
|
|
35
|
+
|
|
36
|
+
getCameraSettings = _4DInterferometer.getCameraSettings
|
|
37
|
+
getFrameRate = _4DInterferometer.getFrameRate
|
|
38
|
+
|
|
39
|
+
del _4DInterferometer
|
|
40
|
+
|
|
41
|
+
__all__ = [
|
|
42
|
+
"analyzer",
|
|
43
|
+
"load_fits",
|
|
44
|
+
"save_fits",
|
|
45
|
+
"read_phasemap",
|
|
46
|
+
"getFileList",
|
|
47
|
+
"folders",
|
|
48
|
+
"create_configuration_file",
|
|
49
|
+
"read_config",
|
|
50
|
+
"getCameraSettings",
|
|
51
|
+
"getFrameRate",
|
|
52
|
+
"fits_array",
|
|
53
|
+
]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Created on March 2025
|
|
3
|
+
|
|
4
|
+
Author
|
|
5
|
+
------
|
|
6
|
+
Pietro Ferraiuolo
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
__title__ = "opticalib"
|
|
10
|
+
__long_title__ = "OPTICALIB : adaptive OPTIcs package for dm CALibrationS"
|
|
11
|
+
__description__ = "This package is a python interface for laboratory adaptive optics systems, with a focus on the calibration of deformable mirrors (DMs) and the acquisition of wavefront data using interferometers."
|
|
12
|
+
__version__ = "1.0.0"
|
|
13
|
+
__author__ = "Adaptive Optics Group - INAF - Osservatorio Astrofisico di Arcetri"
|
|
14
|
+
__maintainer__ = "Pietro Ferraiuolo"
|
|
15
|
+
__author_email__ = "pietro.ferraiuolo@inaf.it"
|
|
16
|
+
__license__ = "MIT License"
|
|
17
|
+
__url__ = "https://github.com/pietroferraiuolo/LABOTT"
|
|
18
|
+
|
|
19
|
+
__all__ = [
|
|
20
|
+
"__title__",
|
|
21
|
+
"__long_title__",
|
|
22
|
+
"__description__",
|
|
23
|
+
"__version__",
|
|
24
|
+
"__author__",
|
|
25
|
+
"__maintainer__",
|
|
26
|
+
"__author_email__",
|
|
27
|
+
"__license__",
|
|
28
|
+
"__url__",
|
|
29
|
+
]
|