opticalib 2.5.4__tar.gz → 2.6.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-2.5.4/opticalib.egg-info → opticalib-2.6.0}/PKG-INFO +3 -1
- {opticalib-2.5.4 → opticalib-2.6.0}/README.md +2 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/__init__.py +2 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/_version.py +3 -3
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/core/_configurations/configuration.yaml +20 -9
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/core/config.py +1 -1
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/core/data_classes.py +25 -24
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/core/exceptions.py +15 -11
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/_API/dms/micAPI.py +55 -28
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/_API/dms/nacoAPI.py +1 -1
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/__init__.py +2 -2
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/cameras.py +2 -2
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/deformable_mirrors.py +63 -25
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/dmutils/__init__.py +17 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/dmutils/flattening.py +121 -68
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/dmutils/iff_processing.py +3 -2
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/plugins.py +1 -1
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/procedures/dm_calibration.py +31 -18
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/widgets/device_panel.py +1 -1
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/widgets/device_registry.py +11 -2
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/procedures/alignment.py +1 -3
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/procedures/iff.py +18 -2
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/procedures/phasing.py +473 -110
- {opticalib-2.5.4 → opticalib-2.6.0/opticalib.egg-info}/PKG-INFO +3 -1
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib.egg-info/SOURCES.txt +1 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib.egg-info/scm_file_list.json +1 -0
- opticalib-2.6.0/opticalib.egg-info/scm_version.json +8 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_core_exceptions.py +79 -3
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_core_read_config.py +42 -6
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_dmutils_flattening.py +1 -1
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_dmutils_iff_module.py +1 -1
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_gui_devices.py +8 -1
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_gui_procedures.py +5 -5
- opticalib-2.6.0/tests/test_procedures_phasing.py +926 -0
- opticalib-2.5.4/opticalib.egg-info/scm_version.json +0 -8
- {opticalib-2.5.4 → opticalib-2.6.0}/CITATION.bib +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/LICENSE +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/MANIFEST.in +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/__init_script__/initCalpy.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/__version__.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/analyzer/__init__.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/analyzer/image_processing.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/analyzer/signals.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/analyzer/timeseries.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/core/__init__.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/core/_configurations/DOCS.md +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/core/_types.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/core/decorators.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/core/fitsarray.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/core/root.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/_API/__init__.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/_API/base_devices.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/_API/cameras/GigE_live_viewer.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/_API/cameras/__init__.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/_API/cameras/frame_buffer.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/_API/dms/__init__.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/_API/dms/alpaoAPI.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/_API/dms/piAPI.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/_API/dms/splattAPI.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/_API/wfs/__init__.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/_API/wfs/i4dAPI.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/_API/wfs/pupil_detector.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/interferometer.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/devices/wfs.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/dmutils/__actuator_identification_wip.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/dmutils/__pupil_calibration_wip.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/dmutils/_misc.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/dmutils/iff_preparation.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/dmutils/slaving.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/ground/__init__.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/ground/_stitching_algorithm.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/ground/geometry.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/ground/logger.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/ground/modal_decomposer.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/ground/osutils.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/ground/reconstructor.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/ground/roi.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/__init__.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/activity.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/app.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/kernel.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/kernel_backend.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/kernel_side.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/procedures/__init__.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/procedures/alignment.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/procedures/base.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/procedures/params.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/procedures/phasing.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/procedures/stitching.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/procedures/timeseries.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/resources/opticalib.ico +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/resources/opticalib.png +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/resources/opticalib.svg +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/theme.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/widgets/__init__.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/widgets/common.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/widgets/config_editor.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/widgets/connect_dialog.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/widgets/data_browser.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/widgets/plot_viewer.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/gui/widgets/workspace.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/procedures/__init__.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/procedures/measurements.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/procedures/stitching.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/py.typed +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/simulator/_API/__init__.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/simulator/_API/alpao_conf.yaml +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/simulator/_API/base_fake_adopticadm.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/simulator/_API/base_fake_alpao.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/simulator/_API/base_petalmirror.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/simulator/_API/base_simulated_dm.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/simulator/_API/simdata.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/simulator/__init__.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/simulator/factory.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/simulator/fake_dms.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/simulator/fake_interf.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib/visualization.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib.egg-info/dependency_links.txt +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib.egg-info/entry_points.txt +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib.egg-info/requires.txt +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/opticalib.egg-info/top_level.txt +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/pyproject.toml +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/pytest.ini +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/setup.cfg +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/setup_calpy.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/README.md +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/__init__.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/conftest.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_analyzer_images_processing.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_analyzer_signals.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_analyzer_timeseries.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_core_dataclass.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_core_fits.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_core_root.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_devices_cameras.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_devices_cameras_no_vmbpy.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_devices_deformable_mirrors.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_devices_interferometer.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_devices_wfs.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_dmutils_iff_acquisition_preparation.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_dmutils_iff_normalization.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_dmutils_iff_processing.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_dmutils_slaving.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_ground_computerec.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_ground_geometry.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_ground_logger.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_ground_modal_decomposer.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_ground_osutils.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_ground_roi.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_ground_stitching_algorithm.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_gui_activity.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_gui_app.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_gui_config_editor.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_gui_kernel_bridge.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_gui_kernel_side.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_gui_widgets.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_measurements.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_portability.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_setup_calpy.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_simulator_factory_functions.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_simulator_run_cmd_history.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_simulator_simdata.py +0 -0
- {opticalib-2.5.4 → opticalib-2.6.0}/tests/test_typings.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: opticalib
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.6.0
|
|
4
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 wavefront sensors.
|
|
5
5
|
Author-email: Adaptive Optics Group - INAF - Osservatorio Astrofisico di Arcetri <pietro.ferraiuolo@inaf.it>
|
|
6
6
|
Maintainer-email: Pietro Ferraiuolo <pietro.ferraiuolo@inaf.it>
|
|
@@ -60,6 +60,8 @@ Requires-Dist: opticalib[gui,test]; extra == "dev"
|
|
|
60
60
|
Requires-Dist: flake8; extra == "dev"
|
|
61
61
|
Dynamic: license-file
|
|
62
62
|
|
|
63
|
+
<img width="841" height="473" alt="gui" src="https://github.com/user-attachments/assets/f7bedf00-5e1a-4a07-9f9b-1392c609d6c1" />
|
|
64
|
+
|
|
63
65
|
# OptiCalib : python framework for OPTical CALibration of deformable mirrors and AO experimentation
|
|
64
66
|
|
|
65
67
|

|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<img width="841" height="473" alt="gui" src="https://github.com/user-attachments/assets/f7bedf00-5e1a-4a07-9f9b-1392c609d6c1" />
|
|
2
|
+
|
|
1
3
|
# OptiCalib : python framework for OPTical CALibration of deformable mirrors and AO experimentation
|
|
2
4
|
|
|
3
5
|

|
|
@@ -29,6 +29,7 @@ from .core.root import (
|
|
|
29
29
|
from .core import config
|
|
30
30
|
from .core import _types as typings
|
|
31
31
|
from .core.fitsarray import fits_array
|
|
32
|
+
from .core import data_classes as data_classes
|
|
32
33
|
|
|
33
34
|
from . import (
|
|
34
35
|
analyzer,
|
|
@@ -63,6 +64,7 @@ __all__ = [
|
|
|
63
64
|
"dmutils",
|
|
64
65
|
"simulator",
|
|
65
66
|
"visualization",
|
|
67
|
+
"data_classes",
|
|
66
68
|
"load_fits",
|
|
67
69
|
"save_fits",
|
|
68
70
|
"read_phasemap",
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '2.
|
|
22
|
-
__version_tuple__ = version_tuple = (2,
|
|
21
|
+
__version__ = version = '2.6.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 6, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g5bc7d9ae8'
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
SYSTEM:
|
|
6
6
|
data_path: ''
|
|
7
|
-
version: '2.
|
|
7
|
+
version: '2.6'
|
|
8
8
|
created_with: ''
|
|
9
9
|
|
|
10
10
|
## Devices configuration ##
|
|
@@ -28,6 +28,7 @@ DEVICES:
|
|
|
28
28
|
- [0, 0]
|
|
29
29
|
- [0, 0]
|
|
30
30
|
- [0, 0]
|
|
31
|
+
|
|
31
32
|
Pyramid:
|
|
32
33
|
camera: CAMERAS:GigaVision
|
|
33
34
|
camera_base_exptime: #in ms
|
|
@@ -54,6 +55,7 @@ DEVICES:
|
|
|
54
55
|
produce_4dpc:
|
|
55
56
|
produce:
|
|
56
57
|
capture:
|
|
58
|
+
|
|
57
59
|
AccuFizX:
|
|
58
60
|
ip:
|
|
59
61
|
port:
|
|
@@ -64,6 +66,7 @@ DEVICES:
|
|
|
64
66
|
produce_4dpc:
|
|
65
67
|
produce:
|
|
66
68
|
capture:
|
|
69
|
+
|
|
67
70
|
4DProcesser1:
|
|
68
71
|
ip:
|
|
69
72
|
port:
|
|
@@ -74,7 +77,7 @@ DEVICES:
|
|
|
74
77
|
produce_4dpc:
|
|
75
78
|
produce:
|
|
76
79
|
capture:
|
|
77
|
-
|
|
80
|
+
|
|
78
81
|
# The deformable mirrors section can be used to define wavefront correctors of
|
|
79
82
|
# the system, such as DMs, SLMs, etc.
|
|
80
83
|
DEFORMABLE.MIRRORS:
|
|
@@ -91,6 +94,7 @@ DEVICES:
|
|
|
91
94
|
diameter:
|
|
92
95
|
slave_ids: []
|
|
93
96
|
border_ids: []
|
|
97
|
+
|
|
94
98
|
PetalDM:
|
|
95
99
|
ip0:
|
|
96
100
|
ip1:
|
|
@@ -101,6 +105,18 @@ DEVICES:
|
|
|
101
105
|
slave_ids: []
|
|
102
106
|
border_ids: []
|
|
103
107
|
|
|
108
|
+
NacoDm:
|
|
109
|
+
host:
|
|
110
|
+
port:
|
|
111
|
+
reply_timeout: # float, in seconds, for the reply timeout
|
|
112
|
+
slave_ids: []
|
|
113
|
+
border_ids: []
|
|
114
|
+
|
|
115
|
+
M4AU: # Mainly needed for the GUI device Entry
|
|
116
|
+
tn: # M4 system configuration TN
|
|
117
|
+
slave_ids: []
|
|
118
|
+
border_ids: []
|
|
119
|
+
|
|
104
120
|
# The cameras section can be used to define any kind of scientific CCD
|
|
105
121
|
CAMERAS:
|
|
106
122
|
GigaVision: # example camera
|
|
@@ -126,13 +142,8 @@ PHASING:
|
|
|
126
142
|
filter: MOTORS:TunableFilter
|
|
127
143
|
expected_psfs: # number of different psfs to expect in the frame
|
|
128
144
|
psfs_angles: # degrees, w.r.t. the horizontal axis of the camera
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
- []
|
|
132
|
-
- []
|
|
133
|
-
- []
|
|
134
|
-
- []
|
|
135
|
-
- []
|
|
145
|
+
expected_psf_pos: # optional, [x, y] pixel position of each PSF, ordered as the angles,
|
|
146
|
+
# e.g. [[310, 120], [520, 240], ...]: only used to sort the detected PSFs. Leave empty to sort by (y, x).
|
|
136
147
|
initial_crop_half_size: # pixels, to be used for the first PSF detection, then refined with a photometric centroid detection
|
|
137
148
|
crop_half_size: # pixels, final crop. If list, is y,x
|
|
138
149
|
min_px_threshold: # minimum number of pixels above the threshold to consider a PSF as detected
|
|
@@ -51,7 +51,7 @@ _update_imports()
|
|
|
51
51
|
#: the ``configuration.yaml`` layout changes (sections/keys added, renamed or
|
|
52
52
|
#: removed), and update ``SYSTEM.version`` in the template in the same commit.
|
|
53
53
|
#: It is independent of the package version.
|
|
54
|
-
CONFIG_SCHEMA_VERSION: str = "2.
|
|
54
|
+
CONFIG_SCHEMA_VERSION: str = "2.6"
|
|
55
55
|
|
|
56
56
|
yaml_config_file = "configuration.yaml"
|
|
57
57
|
_iff_config_file = "iffConfig.yaml"
|
|
@@ -12,9 +12,9 @@ interface for downstream consumers.
|
|
|
12
12
|
|
|
13
13
|
import os as _os
|
|
14
14
|
from dataclasses import dataclass as _dc
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
-
from
|
|
15
|
+
from ..core import _types as _ot
|
|
16
|
+
from ..ground import osutils as _osu
|
|
17
|
+
from ..core.root import folders as _fn
|
|
18
18
|
from collections import OrderedDict as _OrderedDict
|
|
19
19
|
|
|
20
20
|
|
|
@@ -27,24 +27,18 @@ class FlatData:
|
|
|
27
27
|
tn: str
|
|
28
28
|
|
|
29
29
|
def __post_init__(self):
|
|
30
|
+
|
|
31
|
+
from ..dmutils.flattening import _FLATDATA, _DM_OPTIONAL_DATA
|
|
32
|
+
|
|
33
|
+
_FLATDATA.update(_DM_OPTIONAL_DATA)
|
|
34
|
+
_FILELIST = _FLATDATA.copy()
|
|
35
|
+
|
|
30
36
|
filelist = _osu.get_file_list(self.tn, _fn.FLAT_ROOT_FOLDER)
|
|
31
37
|
|
|
32
|
-
attr_map = {
|
|
33
|
-
"flatPosition": "_cmd",
|
|
34
|
-
"flatDeltaCommand": "_deltacmd",
|
|
35
|
-
"imgstart": "_imgstart",
|
|
36
|
-
"imgflat": "_imgflat",
|
|
37
|
-
"modes2flat": "_modes2flat",
|
|
38
|
-
"cavity_offset": "_cavityOffset",
|
|
39
|
-
"flatCommand": "_flatCommand",
|
|
40
|
-
"bias_command": "_biasCommand",
|
|
41
|
-
"bias_forces": "_biasForces",
|
|
42
|
-
"flatTotalForces": "_flatTotalForces",
|
|
43
|
-
}
|
|
44
38
|
|
|
45
|
-
for
|
|
39
|
+
for attr, filename in _FILELIST.items():
|
|
46
40
|
for file in filelist:
|
|
47
|
-
if
|
|
41
|
+
if filename in file:
|
|
48
42
|
setattr(
|
|
49
43
|
self,
|
|
50
44
|
attr,
|
|
@@ -60,14 +54,14 @@ class FlatData:
|
|
|
60
54
|
"""
|
|
61
55
|
Absolute flat command.
|
|
62
56
|
"""
|
|
63
|
-
return self.
|
|
57
|
+
return self._flat_cmd
|
|
64
58
|
|
|
65
59
|
@property
|
|
66
|
-
def
|
|
60
|
+
def flat_delta_cmd(self) -> _ot.ArrayLike:
|
|
67
61
|
"""
|
|
68
62
|
Delta flat command.
|
|
69
63
|
"""
|
|
70
|
-
return self.
|
|
64
|
+
return self._flat_dcmd
|
|
71
65
|
|
|
72
66
|
@property
|
|
73
67
|
def start_image(self) -> _ot.ImageData:
|
|
@@ -102,21 +96,28 @@ class FlatData:
|
|
|
102
96
|
"""
|
|
103
97
|
DM bias command.
|
|
104
98
|
"""
|
|
105
|
-
return self.
|
|
99
|
+
return self._bias_cmd
|
|
106
100
|
|
|
107
101
|
@property
|
|
108
102
|
def bias_forces(self) -> _ot.ArrayLike:
|
|
109
103
|
"""
|
|
110
104
|
DM bias forces.
|
|
111
105
|
"""
|
|
112
|
-
return self.
|
|
106
|
+
return self._bias_force
|
|
113
107
|
|
|
114
108
|
@property
|
|
115
|
-
def
|
|
109
|
+
def flat_total_forces(self) -> _ot.ArrayLike:
|
|
116
110
|
"""
|
|
117
111
|
Total forces on the DM relative to the flattening command.
|
|
118
112
|
"""
|
|
119
|
-
return self.
|
|
113
|
+
return self._flat_total_forces
|
|
114
|
+
|
|
115
|
+
@property
|
|
116
|
+
def dm_last_command(self) -> _ot.ArrayLike:
|
|
117
|
+
"""
|
|
118
|
+
Last command sent to the DM.
|
|
119
|
+
"""
|
|
120
|
+
return self._last_cmd
|
|
120
121
|
|
|
121
122
|
def __repr__(self) -> str:
|
|
122
123
|
return f"FlatData(tn={self.tn})"
|
|
@@ -11,7 +11,7 @@ clause if needed.
|
|
|
11
11
|
"""
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
class DeviceNotFoundError(
|
|
14
|
+
class DeviceNotFoundError(KeyError):
|
|
15
15
|
"""Exception raised when a device is not found in the
|
|
16
16
|
configuration file.
|
|
17
17
|
"""
|
|
@@ -20,51 +20,55 @@ class DeviceNotFoundError(Exception):
|
|
|
20
20
|
super().__init__(f"Device '{device_name}' not found in the configuration file.")
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
class DeviceError(
|
|
24
|
-
"""
|
|
23
|
+
class DeviceError(KeyError):
|
|
24
|
+
"""
|
|
25
|
+
Exception raised when a device is not found in the
|
|
25
26
|
configuration file.
|
|
26
27
|
"""
|
|
27
28
|
|
|
28
29
|
def __init__(self, device_name: str, device_type: str):
|
|
29
30
|
super().__init__(f"Device '{device_name}' is not a valid {device_type}.")
|
|
30
31
|
|
|
32
|
+
def __str__(self):
|
|
33
|
+
return self.args[0]
|
|
34
|
+
|
|
31
35
|
|
|
32
|
-
class DeviceAttributeError(
|
|
36
|
+
class DeviceAttributeError(AttributeError):
|
|
33
37
|
"""Exception raised when a device attribute is missing or invalid."""
|
|
34
38
|
|
|
35
|
-
def __init__(self, message: str):
|
|
36
|
-
super().__init__(message)
|
|
39
|
+
def __init__(self, message: str, attribute: str = None, obj: object = None):
|
|
40
|
+
super().__init__(message, name=attribute, obj=obj)
|
|
37
41
|
|
|
38
42
|
|
|
39
|
-
class MatrixError(
|
|
43
|
+
class MatrixError(ValueError):
|
|
40
44
|
"""Exception raised when a matrix is not valid."""
|
|
41
45
|
|
|
42
46
|
def __init__(self, message: str):
|
|
43
47
|
super().__init__(message)
|
|
44
48
|
|
|
45
49
|
|
|
46
|
-
class CommandError(
|
|
50
|
+
class CommandError(ValueError):
|
|
47
51
|
"""Exception raised when a command is not valid."""
|
|
48
52
|
|
|
49
53
|
def __init__(self, message: str):
|
|
50
54
|
super().__init__(message)
|
|
51
55
|
|
|
52
56
|
|
|
53
|
-
class
|
|
57
|
+
class FrameBufferError(Exception):
|
|
54
58
|
"""Exception raised when a buffer operation fails."""
|
|
55
59
|
|
|
56
60
|
def __init__(self, message: str):
|
|
57
61
|
super().__init__(message)
|
|
58
62
|
|
|
59
63
|
|
|
60
|
-
class PathError(
|
|
64
|
+
class PathError(OSError):
|
|
61
65
|
"""Exception raised when a path operation fails."""
|
|
62
66
|
|
|
63
67
|
def __init__(self, message: str):
|
|
64
68
|
super().__init__(message)
|
|
65
69
|
|
|
66
70
|
|
|
67
|
-
class ReconnectionError(
|
|
71
|
+
class ReconnectionError(ConnectionError):
|
|
68
72
|
"""
|
|
69
73
|
Exception raised when a device reconnection fails after multiple
|
|
70
74
|
attempts.
|
|
@@ -9,12 +9,7 @@ try:
|
|
|
9
9
|
except ImportError:
|
|
10
10
|
pass
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
mirrorModesFile = "ff_v_matrix.fits"
|
|
14
|
-
ffFile = "ff_matrix.fits"
|
|
15
12
|
actCoordFile = "ActuatorsCoordinates.fits"
|
|
16
|
-
nActFile = "n_actuators.dat"
|
|
17
|
-
|
|
18
13
|
|
|
19
14
|
class BaseAdOpticaDm(BaseDeformableMirror):
|
|
20
15
|
"""
|
|
@@ -22,36 +17,44 @@ class BaseAdOpticaDm(BaseDeformableMirror):
|
|
|
22
17
|
This class is intended to be inherited by specific device classes.
|
|
23
18
|
"""
|
|
24
19
|
|
|
25
|
-
def __init__(self, tracknum: str = None):
|
|
26
|
-
"""The constructor"""
|
|
20
|
+
def __init__(self, tracknum: str|None = None):
|
|
27
21
|
"""
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
Constructor for the Microgate AO_CLIENT wrapper
|
|
23
|
+
|
|
24
|
+
Parameters
|
|
25
|
+
----------
|
|
26
|
+
tracknum: str, optional
|
|
27
|
+
Track number for the AO_CLIENT. If None, it will be resolved automatically.
|
|
30
28
|
"""
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
self.
|
|
34
|
-
|
|
29
|
+
# Resolve the TN
|
|
30
|
+
tn = self._resolve_tracknum(tracknum)
|
|
31
|
+
self._aoClient = AO_CLIENT(tn)
|
|
32
|
+
|
|
33
|
+
# Mirror properties
|
|
35
34
|
self.n_acts = self._init_n_actuators()
|
|
36
|
-
self.mirrorModes = self._init_mirror_modes()
|
|
37
35
|
self.act_coord = self._init_act_coord()
|
|
38
36
|
self.workingActs = self._init_working_acts()
|
|
37
|
+
|
|
38
|
+
# Retrieves the mirror's FF, M2C and Bias Vector
|
|
39
|
+
# self.ffm = (self._aoClient.aoSystem.sysConf.gen.FFWDSvdMatrix)[0] #
|
|
40
|
+
self.ff = self._aoClient.aoSystem.sysConf.gen.FFWDMatrix
|
|
41
|
+
# self.mirrorModes = self._init_mirror_modes()
|
|
42
|
+
self._biasCmd = self._aoClient.aoSystem.sysConf.gen.biasVectors[0]
|
|
43
|
+
|
|
44
|
+
# Connect to the Ao SubSystems
|
|
39
45
|
self._aoClient._connect()
|
|
40
|
-
self._enumerate_devices()
|
|
46
|
+
# self._enumerate_devices()
|
|
41
47
|
|
|
42
48
|
def get_counter(self):
|
|
43
49
|
"""
|
|
44
|
-
Function which returns the current
|
|
50
|
+
Function which returns the current skip counter of the mirror.
|
|
45
51
|
|
|
46
52
|
Returns
|
|
47
53
|
-------
|
|
48
|
-
|
|
49
|
-
Current
|
|
54
|
+
counter: int
|
|
55
|
+
Current skip counter of the mirror.
|
|
50
56
|
"""
|
|
51
|
-
|
|
52
|
-
skipByCommand = fc.skipByCommand
|
|
53
|
-
# .....
|
|
54
|
-
return skipByCommand
|
|
57
|
+
return self._aoClient.getCounters()
|
|
55
58
|
|
|
56
59
|
def get_force(self):
|
|
57
60
|
"""
|
|
@@ -63,9 +66,7 @@ class BaseAdOpticaDm(BaseDeformableMirror):
|
|
|
63
66
|
Current force applied to the mirror actuators.
|
|
64
67
|
|
|
65
68
|
"""
|
|
66
|
-
|
|
67
|
-
force = self._aoClient.getForce()
|
|
68
|
-
return force
|
|
69
|
+
return self._aoClient.getForce()
|
|
69
70
|
|
|
70
71
|
def plot_acts(self, amp: ot.Optional[ot.ArrayLike] = None, **kwargs):
|
|
71
72
|
"""
|
|
@@ -117,6 +118,7 @@ class BaseAdOpticaDm(BaseDeformableMirror):
|
|
|
117
118
|
"""
|
|
118
119
|
return self._aoClient.aoSystem.sysConf.gen.M2CMatrix.shape[-1]
|
|
119
120
|
|
|
121
|
+
# DP
|
|
120
122
|
def _init_mirror_modes(self):
|
|
121
123
|
"""
|
|
122
124
|
Function which initialize the mirror modes by reading from a fits file.
|
|
@@ -169,8 +171,33 @@ class BaseAdOpticaDm(BaseDeformableMirror):
|
|
|
169
171
|
coords = load_fits(filepath)
|
|
170
172
|
return coords
|
|
171
173
|
|
|
172
|
-
def
|
|
174
|
+
def _resolve_tracknum(self, tracknum: str|None) -> str|None:
|
|
173
175
|
"""
|
|
174
|
-
Function which
|
|
176
|
+
Function which resolves the tn.
|
|
175
177
|
"""
|
|
176
|
-
|
|
178
|
+
from opticalib.ground.osutils import is_tn
|
|
179
|
+
|
|
180
|
+
if not tracknum is None:
|
|
181
|
+
if tracknum.lower() == "default":
|
|
182
|
+
try:
|
|
183
|
+
from Microgate.adopt.AOBaseConfig import baseConfig # type: ignore
|
|
184
|
+
tn = baseConfig.SYS_CONF_TN
|
|
185
|
+
except ImportError:
|
|
186
|
+
tn = None
|
|
187
|
+
|
|
188
|
+
elif is_tn(tracknum):
|
|
189
|
+
tn = tracknum
|
|
190
|
+
|
|
191
|
+
else:
|
|
192
|
+
tn = None
|
|
193
|
+
|
|
194
|
+
else:
|
|
195
|
+
tn = None
|
|
196
|
+
|
|
197
|
+
return tn
|
|
198
|
+
|
|
199
|
+
# def _enumerate_devices(self):
|
|
200
|
+
# """
|
|
201
|
+
# Function which enumerates the connected devices.
|
|
202
|
+
# """
|
|
203
|
+
# self._aoClient.aoSystem.aoSubSystem0.deviceEnum()
|
|
@@ -85,7 +85,7 @@ class NACOMirror(BaseDeformableMirror):
|
|
|
85
85
|
"""
|
|
86
86
|
return self._last_cmd.copy()
|
|
87
87
|
|
|
88
|
-
def
|
|
88
|
+
def _mirror_command(self, cmd: _t.ArrayLike) -> None:
|
|
89
89
|
"""
|
|
90
90
|
Send an absolute command vector to the NACO mirror via the PLC.
|
|
91
91
|
|
|
@@ -21,7 +21,7 @@ from .deformable_mirrors import (
|
|
|
21
21
|
DP,
|
|
22
22
|
M4AU,
|
|
23
23
|
PetalMirror,
|
|
24
|
-
|
|
24
|
+
NacoDm,
|
|
25
25
|
)
|
|
26
26
|
from .wfs import Ingot
|
|
27
27
|
from .cameras import GigaVision
|
|
@@ -38,5 +38,5 @@ __all__ = [
|
|
|
38
38
|
"GigaVision",
|
|
39
39
|
"Ingot",
|
|
40
40
|
"PetalMirror",
|
|
41
|
-
"
|
|
41
|
+
"NacoDm",
|
|
42
42
|
]
|
|
@@ -41,7 +41,7 @@ else:
|
|
|
41
41
|
_ACQUISITION_ERRORS = (AttributeError,)
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
def _frame_to_array(frame: "_vmbpy.Frame") -> _ot.ImageData:
|
|
44
|
+
def _frame_to_array(frame: "_vmbpy.Frame") -> _ot.ImageData: # type: ignore
|
|
45
45
|
"""Copy a Vimba frame into a numpy array: (H, W) mono, (C, H, W) color."""
|
|
46
46
|
img = frame.as_numpy_ndarray() # a *view* on the SDK buffer, shape (H, W, C)
|
|
47
47
|
img = img[:, :, 0] if img.shape[2] == 1 else img.transpose(2, 0, 1)
|
|
@@ -316,7 +316,7 @@ class GigaVision(BaseCamera):
|
|
|
316
316
|
self._buffer.clear() # free the memory of the stored frames
|
|
317
317
|
|
|
318
318
|
def _on_frame(
|
|
319
|
-
self, cam: "_vmbpy.Camera", stream: "_vmbpy.Stream", frame: "_vmbpy.Frame"
|
|
319
|
+
self, cam: "_vmbpy.Camera", stream: "_vmbpy.Stream", frame: "_vmbpy.Frame" # type: ignore
|
|
320
320
|
):
|
|
321
321
|
"""
|
|
322
322
|
Frame handler: runs in the **Vimba SDK thread**, once per frame.
|