pyobs-aravis 2.0.0.dev4__tar.gz → 2.0.0.dev6__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.
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/PKG-INFO +1 -1
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/pyobs_aravis/araviscamera.py +11 -6
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/pyproject.toml +1 -1
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/uv.lock +1 -1
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/.github/workflows/pypi.yml +0 -0
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/.github/workflows/ruff.yml +0 -0
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/.pre-commit-config.yaml +0 -0
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/.readthedocs.yml +0 -0
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/CHANGELOG.rst +0 -0
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/LICENSE +0 -0
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/README.md +0 -0
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/docs/Makefile +0 -0
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/docs/make.bat +0 -0
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/docs/requirements.txt +0 -0
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/docs/source/_static/pyobs.gif +0 -0
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/docs/source/conf.py +0 -0
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/docs/source/index.rst +0 -0
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/pyobs_aravis/__init__.py +0 -0
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/pyobs_aravis/aravis.py +0 -0
- {pyobs_aravis-2.0.0.dev4 → pyobs_aravis-2.0.0.dev6}/pyobs_aravis/gui.py +0 -0
|
@@ -32,11 +32,12 @@ class AravisCamera(BaseVideo, IExposureTime):
|
|
|
32
32
|
BaseVideo.__init__(self, **kwargs)
|
|
33
33
|
from . import aravis
|
|
34
34
|
|
|
35
|
-
self.
|
|
35
|
+
self._camera_device_name = device
|
|
36
36
|
self._camera: aravis.Camera | None = None
|
|
37
37
|
self._settings: dict[str, Any] = {} if settings is None else settings
|
|
38
38
|
self._camera_lock = asyncio.Lock()
|
|
39
39
|
self._buffers = buffers
|
|
40
|
+
self._exposure_time: float = 0.0
|
|
40
41
|
|
|
41
42
|
if device is not None:
|
|
42
43
|
self.add_background_task(self._capture)
|
|
@@ -50,7 +51,7 @@ class AravisCamera(BaseVideo, IExposureTime):
|
|
|
50
51
|
await BaseVideo.open(self)
|
|
51
52
|
|
|
52
53
|
ids: list[str] = aravis.get_device_ids() # type: ignore[assignment]
|
|
53
|
-
if self.
|
|
54
|
+
if self._camera_device_name not in ids:
|
|
54
55
|
raise ValueError("Could not find given device name in list of available cameras.")
|
|
55
56
|
|
|
56
57
|
await self.activate_camera()
|
|
@@ -65,8 +66,8 @@ class AravisCamera(BaseVideo, IExposureTime):
|
|
|
65
66
|
"""Open camera."""
|
|
66
67
|
from . import aravis
|
|
67
68
|
|
|
68
|
-
log.info("Connecting to camera %s...", self.
|
|
69
|
-
self._camera = aravis.Camera(self.
|
|
69
|
+
log.info("Connecting to camera %s...", self._camera_device_name)
|
|
70
|
+
self._camera = aravis.Camera(self._camera_device_name) # type: ignore[assignment]
|
|
70
71
|
log.info("Connected.")
|
|
71
72
|
|
|
72
73
|
for key, value in self._settings.items():
|
|
@@ -79,8 +80,11 @@ class AravisCamera(BaseVideo, IExposureTime):
|
|
|
79
80
|
"""Close camera."""
|
|
80
81
|
if self._camera is not None:
|
|
81
82
|
log.info("Closing camera...")
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
try:
|
|
84
|
+
self._camera.stop_acquisition() # type: ignore[union-attr]
|
|
85
|
+
self._camera.shutdown() # type: ignore[union-attr]
|
|
86
|
+
except Exception:
|
|
87
|
+
log.exception("Error closing camera.")
|
|
84
88
|
self._camera = None
|
|
85
89
|
|
|
86
90
|
async def _activate_camera(self) -> None:
|
|
@@ -125,6 +129,7 @@ class AravisCamera(BaseVideo, IExposureTime):
|
|
|
125
129
|
"""
|
|
126
130
|
await self.activate_camera()
|
|
127
131
|
self._camera.set_exposure_time(exposure_time * 1e6) # type: ignore[union-attr]
|
|
132
|
+
self._exposure_time = exposure_time
|
|
128
133
|
await self.comm.set_state(IExposureTime, ExposureTimeState(exposure_time=exposure_time))
|
|
129
134
|
|
|
130
135
|
|
|
@@ -1770,7 +1770,7 @@ wheels = [
|
|
|
1770
1770
|
|
|
1771
1771
|
[[package]]
|
|
1772
1772
|
name = "pyobs-aravis"
|
|
1773
|
-
version = "2.0.0.
|
|
1773
|
+
version = "2.0.0.dev6"
|
|
1774
1774
|
source = { editable = "." }
|
|
1775
1775
|
dependencies = [
|
|
1776
1776
|
{ name = "numpy", version = "2.4.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" },
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|