pyTelops 0.2.2__tar.gz → 0.2.3__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.
Files changed (53) hide show
  1. {pytelops-0.2.2 → pytelops-0.2.3}/PKG-INFO +2 -2
  2. {pytelops-0.2.2 → pytelops-0.2.3}/README.rst +1 -1
  3. pytelops-0.2.3/docs/source/changelog.rst +169 -0
  4. {pytelops-0.2.2 → pytelops-0.2.3}/docs/source/conf.py +1 -1
  5. {pytelops-0.2.2 → pytelops-0.2.3}/pyTelops/__init__.py +1 -1
  6. {pytelops-0.2.2 → pytelops-0.2.3}/pyTelops/camera.py +382 -82
  7. {pytelops-0.2.2 → pytelops-0.2.3}/pyTelops/errors.py +6 -0
  8. {pytelops-0.2.2 → pytelops-0.2.3}/pyproject.toml +2 -2
  9. {pytelops-0.2.2 → pytelops-0.2.3}/tests/conftest.py +18 -0
  10. {pytelops-0.2.2 → pytelops-0.2.3}/tests/test_camera.py +178 -0
  11. {pytelops-0.2.2 → pytelops-0.2.3}/tests/test_download_integrity.py +303 -14
  12. {pytelops-0.2.2 → pytelops-0.2.3}/tests/test_hardware.py +56 -0
  13. pytelops-0.2.2/docs/source/changelog.rst +0 -87
  14. {pytelops-0.2.2 → pytelops-0.2.3}/.gitignore +0 -0
  15. {pytelops-0.2.2 → pytelops-0.2.3}/AGENTS.md +0 -0
  16. {pytelops-0.2.2 → pytelops-0.2.3}/CONTRIBUTING.rst +0 -0
  17. {pytelops-0.2.2 → pytelops-0.2.3}/LICENSE +0 -0
  18. {pytelops-0.2.2 → pytelops-0.2.3}/PYPI_README.rst +0 -0
  19. {pytelops-0.2.2 → pytelops-0.2.3}/docs/requirements.txt +0 -0
  20. {pytelops-0.2.2 → pytelops-0.2.3}/docs/rtd_postbuild.py +0 -0
  21. {pytelops-0.2.2 → pytelops-0.2.3}/docs/source/_static/.gitkeep +0 -0
  22. {pytelops-0.2.2 → pytelops-0.2.3}/docs/source/_static/ai-buttons.css +0 -0
  23. {pytelops-0.2.2 → pytelops-0.2.3}/docs/source/_static/ai-buttons.js +0 -0
  24. {pytelops-0.2.2 → pytelops-0.2.3}/docs/source/_static/logo.png +0 -0
  25. {pytelops-0.2.2 → pytelops-0.2.3}/docs/source/calibration.rst +0 -0
  26. {pytelops-0.2.2 → pytelops-0.2.3}/docs/source/camera.rst +0 -0
  27. {pytelops-0.2.2 → pytelops-0.2.3}/docs/source/examples.rst +0 -0
  28. {pytelops-0.2.2 → pytelops-0.2.3}/docs/source/getting_started.rst +0 -0
  29. {pytelops-0.2.2 → pytelops-0.2.3}/docs/source/index.rst +0 -0
  30. {pytelops-0.2.2 → pytelops-0.2.3}/docs/source/streaming_and_buffer.rst +0 -0
  31. {pytelops-0.2.2 → pytelops-0.2.3}/docs/source/troubleshooting.rst +0 -0
  32. {pytelops-0.2.2 → pytelops-0.2.3}/examples/01_connect_and_grab.py +0 -0
  33. {pytelops-0.2.2 → pytelops-0.2.3}/examples/02_continuous_live.py +0 -0
  34. {pytelops-0.2.2 → pytelops-0.2.3}/examples/03_buffer_record.py +0 -0
  35. {pytelops-0.2.2 → pytelops-0.2.3}/examples/04_calibration_load.py +0 -0
  36. {pytelops-0.2.2 → pytelops-0.2.3}/examples/05_external_trigger.py +0 -0
  37. {pytelops-0.2.2 → pytelops-0.2.3}/examples/06_force_ip.py +0 -0
  38. {pytelops-0.2.2 → pytelops-0.2.3}/examples/07_robust_download.py +0 -0
  39. {pytelops-0.2.2 → pytelops-0.2.3}/examples/README.rst +0 -0
  40. {pytelops-0.2.2 → pytelops-0.2.3}/pyTelops/cli.py +0 -0
  41. {pytelops-0.2.2 → pytelops-0.2.3}/pyTelops/connection.py +0 -0
  42. {pytelops-0.2.2 → pytelops-0.2.3}/pyTelops/gui.py +0 -0
  43. {pytelops-0.2.2 → pytelops-0.2.3}/pyTelops/provisioning.py +0 -0
  44. {pytelops-0.2.2 → pytelops-0.2.3}/pyTelops/py.typed +0 -0
  45. {pytelops-0.2.2 → pytelops-0.2.3}/pyTelops/registers.py +0 -0
  46. {pytelops-0.2.2 → pytelops-0.2.3}/requirements.dev.txt +0 -0
  47. {pytelops-0.2.2 → pytelops-0.2.3}/requirements.txt +0 -0
  48. {pytelops-0.2.2 → pytelops-0.2.3}/sync_version.py +0 -0
  49. {pytelops-0.2.2 → pytelops-0.2.3}/tests/test_cli.py +0 -0
  50. {pytelops-0.2.2 → pytelops-0.2.3}/tests/test_connection.py +0 -0
  51. {pytelops-0.2.2 → pytelops-0.2.3}/tests/test_discovery_reachability.py +0 -0
  52. {pytelops-0.2.2 → pytelops-0.2.3}/tests/test_enum_resolution.py +0 -0
  53. {pytelops-0.2.2 → pytelops-0.2.3}/tests/test_registers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyTelops
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Pure-Python driver for Telops thermal cameras over GigE Vision
5
5
  Project-URL: Homepage, https://github.com/ladisk/pyTelops
6
6
  Project-URL: Documentation, https://pytelops.readthedocs.io
@@ -25,7 +25,7 @@ Classifier: Topic :: Scientific/Engineering :: Image Processing
25
25
  Classifier: Topic :: System :: Hardware :: Hardware Drivers
26
26
  Requires-Python: >=3.10
27
27
  Requires-Dist: numpy>=1.20
28
- Requires-Dist: pygigevision>=0.2.1
28
+ Requires-Dist: pygigevision>=0.2.2
29
29
  Requires-Dist: tqdm
30
30
  Provides-Extra: dev
31
31
  Requires-Dist: build; extra == 'dev'
@@ -76,7 +76,7 @@ Frames are returned as numpy arrays with Telops header rows already stripped.
76
76
  Documentation
77
77
  -------------
78
78
 
79
- Full documentation at https://pytelops.readthedocs.io.
79
+ Full documentation at https://pytelops.readthedocs.io/en/latest/
80
80
 
81
81
  The sections below walk through the camera the way you use it: find it,
82
82
  connect, configure, capture, and disconnect.
@@ -0,0 +1,169 @@
1
+ Changelog
2
+ =========
3
+
4
+ Version 0.2.3
5
+ -------------
6
+
7
+ - **Fixed silent frame decimation of buffer downloads when a non-zero**
8
+ ``packet_delay`` **is set.** A live-streaming ``packet_delay`` (GVSP
9
+ inter-packet delay / SCPD) was being applied to memory-buffer downloads too,
10
+ where it makes the camera silently return **every other frame** (a 2x, or with
11
+ heavy throttling higher, decimation): the throttled transmit desyncs from the
12
+ camera's buffer-read clock, so it skips frames -- with contiguous block-ids and
13
+ no error, so the data looked valid but was time-aliased (a signal at frequency
14
+ ``f`` appeared at ``2f``). ``buffer_download`` now forces SCPD to 0 for the
15
+ transfer and restores the user's value afterwards, so downloads are correct
16
+ regardless of the live ``packet_delay``. For host-side packet loss during
17
+ download use jumbo packets and/or a lower ``bitrate_mbps`` (both proven), NOT
18
+ ``packet_delay``. Confirmed on hardware (FAST-M3k, firmware 3.1.13.2): with
19
+ ``packet_delay=1000`` the same recording strided before the fix and downloads
20
+ cleanly after.
21
+ - **Large buffer downloads are now streamed in chunks (default 1000 frames per
22
+ session).** A single large acquisition session overruns the host receive path
23
+ and the camera's paced readout: an 8000-frame session lost most of its frames
24
+ (thousands incomplete at idle on a USB-GigE host) and returned them
25
+ mis-ordered, whereas sessions of at most a thousand frames come back complete.
26
+ ``buffer_download`` now splits the range into ``chunk_size`` pieces, so large
27
+ downloads are **100% complete** at idle and under CPU load (validated on
28
+ hardware). The recovery loop also no longer paces the bitrate *down* between
29
+ rounds -- a low download bitrate is what makes the camera stride (skip frames),
30
+ so lowering it to fight packet loss was counter-productive; it stays at the
31
+ base rate. Use jumbo packets and/or a lower base ``bitrate_mbps`` for loss.
32
+ - ``buffer_download`` now verifies frame **ordering** using the per-frame camera
33
+ leader timestamps and raises ``FrameIntegrityError`` when more than
34
+ ``order_tolerance`` (default 5%) of the frames are mis-ordered, duplicated, or
35
+ strided (new ``verify_order`` parameter, default ``True``). This backstop
36
+ catches gross corruption such as the decimation above (which mis-orders ~half
37
+ the frames) even though every packet arrives complete. A small (~1%)
38
+ irreducible residual of cross-session mis-ordering remains on large downloads
39
+ -- the camera does not halt a download session promptly, so a session's tail
40
+ can leak into the next -- and is recorded and logged but tolerated rather than
41
+ failing every download. The anomaly counts are on ``cam.last_download_stats``
42
+ (``n_out_of_order``, ``n_stride_gaps``); the check is skipped when the camera
43
+ does not populate timestamps. Pass ``order_tolerance=0`` for strict behaviour
44
+ or ``verify_order=False`` to accept frames as delivered.
45
+ - **Fixed stale frames leaking between recovery rounds of a buffer download on a
46
+ heavily loaded host.** Each paced recovery round re-streams the still-missing
47
+ frames in a fresh GVSP session, and the session's block id (which restarts at 1)
48
+ is used to place each frame at ``offset = block_id - 1``. Under host CPU
49
+ saturation the GVSP receiver could fall behind and leave a frame from the
50
+ previous session queued -- or unread in the OS socket buffer -- so the next
51
+ session read it first and mapped it to the **wrong position** (packet-complete
52
+ but out-of-order / strided frames, which ``verify_order`` above then reported).
53
+ The receiver now exposes ``flush()`` and ``buffer_download`` drains the frame
54
+ queue, partial frame buffers, and the socket receive buffer at each session
55
+ boundary, so recovery is correct under load. Requires
56
+ ``pyGigEVision>=0.2.2`` (``GVSPReceiver.flush``).
57
+ - Added software **power-state control**. ``Camera.standby()`` spins the
58
+ Stirling cooler down while keeping the GVCP connection open;
59
+ ``Camera.power_on(wait=True)`` brings it back and waits for the detector to
60
+ re-cool; and the read-only ``Camera.power_state`` property reports the current
61
+ ``DevicePowerState``. Standby is the way to quiet the camera and cut power
62
+ during genuine idle periods without unplugging it -- coolers have a finite
63
+ cycle life (the camera counts them, see ``diagnostics()``
64
+ ``cooler_power_on_cycles``), so use it for real idle time, not rapid cycling.
65
+ - Added ``Camera.reset()`` to issue a firmware reset via ``REG_DEVICE_RESET``
66
+ (0xD340). The camera reboots and the control channel is dropped, so the call
67
+ marks the camera disconnected; reconnect after it reboots. The reboot can bring
68
+ the camera up on a new link-local IP, so ``reset()`` clears the cached address
69
+ and the next ``connect()`` re-discovers it. Prefer ``standby()``/``power_on()``
70
+ for routine idling.
71
+ - ``connect()`` / ``wait_until_ready()`` no longer time out while the camera is
72
+ cooling. The old fixed 120 s wait failed on a freshly powered camera (an
73
+ from-ambient cooldown takes minutes) yet made you wait a full two minutes on a
74
+ genuinely absent one. There are now two budgets: a short ``timeout``
75
+ (default 10 s) that applies while the camera is unresponsive or stuck -- so a
76
+ missing camera fails fast -- and a long ``cooling_timeout`` (default 600 s)
77
+ that applies while the camera reports it is actively cooling or initialising
78
+ (from its TDC status). Both are keyword arguments on ``connect()`` and
79
+ ``wait_until_ready()`` (issue #15).
80
+ - ``diagnostics()`` now returns ``None`` for temperature locations the camera
81
+ model does not support, as its docstring already promised. On the TS-IR the
82
+ unsupported thermistor locations reported the raw ADC-floor sentinel
83
+ (``-138.3`` C) instead of rejecting the read, leaking through as a bogus
84
+ temperature; it is now detected and mapped to ``None`` (issue #16).
85
+
86
+ Version 0.2.2
87
+ -------------
88
+
89
+ - First release published to PyPI.
90
+ - The pyGigEVision dependency now installs from PyPI (``pyGigEVision>=0.2.1``)
91
+ instead of a git URL; automated CI runs on push and pull request again.
92
+ - ``Camera(ip=...).connect()`` now runs a discovery sweep to bind the host
93
+ interface that actually reaches the camera, instead of trusting OS routing.
94
+ On hosts with several link-local interfaces (VPN, Bluetooth, virtual
95
+ adapters) the route by metric could pick a dead interface and the connect
96
+ timed out. Cameras the sweep cannot see fall back to OS routing as before.
97
+ - ``discover()`` now finds cameras on every host network interface (USB-to-GigE
98
+ adapters, secondary NICs), via the reworked multi-interface discovery in
99
+ pyGigEVision. Each result carries a ``reachable`` flag and an ``interface_ip``
100
+ recording the host NIC the camera replied on.
101
+ - ``Camera()`` now connects through the interface the camera replied on during
102
+ discovery, so a host with multiple link-local NICs no longer needs manual
103
+ interface selection. It also raises an actionable error when the selected
104
+ camera is on no host NIC subnet, instead of failing later with a confusing
105
+ OS error.
106
+ - Added ``pyTelops.force_ip(camera, ip, mask, gateway=None)`` to re-home a
107
+ wrong-subnet camera by MAC (GVCP FORCEIP).
108
+ - Removed the host-side link-local probe that the multi-interface discovery
109
+ makes redundant. Thanks to Lorenzo Capponi (LolloCappo) for the
110
+ connected-socket interface-detection approach (PR #13) that informed this work.
111
+ - Requires the updated pyGigEVision (multi-interface discovery, ``force_ip``).
112
+ - ``buffer_download`` now detects dropped and corrupted frames and raises
113
+ ``FrameIntegrityError`` by default when any frame is incomplete. This is a
114
+ behavior change: pass ``max_dropped_frames=N`` to tolerate up to ``N``
115
+ incomplete frames, as older code relied on the method always returning an
116
+ array.
117
+ - ``buffer_download`` attaches a ``DownloadStats`` integrity report to
118
+ ``cam.last_download_stats`` (per-frame missing packets, resend counts,
119
+ throughput) so callers can inspect data quality without pixel inspection.
120
+ - ``buffer_download`` enables GVSP packet resends during the stream and
121
+ re-downloads incomplete frames from the camera buffer, controlled by the new
122
+ ``resend`` and ``retries`` parameters. It no longer suppresses the
123
+ ``pyGigEVision.gvsp`` packet-loss warnings.
124
+ - Corrected the misleading ``packet_size=9000`` guidance. Oversized requests on
125
+ a non-jumbo path are now detected with a FireTestPacket path probe, and the
126
+ download warns and falls back to ``packet_size=1500`` instead of silently
127
+ emitting mostly-zero frames.
128
+ - ``buffer_download`` now auto-tunes by default: it probes once per connection
129
+ whether the path carries jumbo frames and learns a download bitrate from
130
+ each transfer's completeness. Pass ``packet_size`` or ``bitrate_mbps`` to
131
+ override, or set ``cam.auto_tune = False`` to disable.
132
+ - Added ``tune_connection()`` to probe the link and sweep download settings,
133
+ recommending a stable and fast configuration for the current adapter and
134
+ cable. Includes an opt-in read-only NIC diagnostics pass.
135
+ - New public names: ``FrameIntegrityError``, ``DownloadStats``,
136
+ ``ConnectionReport``, ``tune_connection``.
137
+
138
+ Version 0.2.1
139
+ -------------
140
+
141
+ - Adopt sdypy package template conventions: hatchling build, sphinx-book-theme
142
+ docs on ReadTheDocs, manual changelog, version-sync release script.
143
+ - Add full Sphinx documentation: getting started, Camera API reference,
144
+ calibration, streaming and buffer, troubleshooting.
145
+ - Add five runnable examples in ``examples/``: connect and grab, continuous
146
+ live view, buffer recording, calibration loading, external trigger.
147
+ - Add ``CONTRIBUTING.rst`` and this changelog. Fold the standalone
148
+ troubleshooting guide into the documentation.
149
+ - Switch lint from flake8 to ruff (strict superset, includes formatter).
150
+ - Polish: NumPy-style docstrings and complete type hints across the Camera
151
+ class and the registers, CLI, and GUI modules.
152
+ - No public API changes; the LDAQ Telops plugin and existing user code
153
+ continue to work unchanged.
154
+
155
+ Version 0.2.0
156
+ -------------
157
+
158
+ - Split the GigE Vision protocol layer into the standalone `pyGigEVision
159
+ <https://github.com/ladisk/pyGigEVision>`_ package. pyTelops becomes the
160
+ Telops vendor layer on top of it.
161
+ - ``Camera`` re-exports ``GVCPClient`` and ``GVCPError`` from pyGigEVision for
162
+ back-compatibility.
163
+ - 127 unit tests plus 57 hardware tests.
164
+
165
+ Version 0.1.0
166
+ -------------
167
+
168
+ - Initial Telops camera driver: discovery, control, live streaming, onboard
169
+ buffer recording and download, calibration loading, NUC, diagnostics.
@@ -10,7 +10,7 @@ sys.path.insert(0, os.path.abspath("../.."))
10
10
  project = "pyTelops"
11
11
  author = "Jaša Šonc, Janko Slavič"
12
12
  copyright = "2026, Jaša Šonc and Ladisk group, University of Ljubljana"
13
- release = "0.2.2"
13
+ release = "0.2.3"
14
14
  # -- General configuration ---------------------------------------------------
15
15
  extensions = [
16
16
  "sphinx.ext.autodoc",
@@ -18,7 +18,7 @@ Usage::
18
18
 
19
19
  from __future__ import annotations
20
20
 
21
- __version__ = "0.2.2"
21
+ __version__ = "0.2.3"
22
22
  from pyGigEVision import GVCPClient, GVCPError
23
23
 
24
24
  from .camera import Camera, discover