Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.61 KB

File metadata and controls

44 lines (30 loc) · 1.61 KB

Klein Colorimeter Python SDK

This workspace now includes a pure Python SDK package, klein_colorimeter, that mirrors the public surface of the Klein KClmtr SDK and talks to the meter over the same serial protocol.

Install

python -m pip install -e .

Examples

from klein_colorimeter import KClmtr

meter = KClmtr()
if meter.connect("COM3"):
    measurement = meter.getNextMeasurement()
    print(measurement.getBigY(), measurement.getCIE1931_x(), measurement.getCIE1931_y())
    meter.closePort()

Translated sample scripts are in examples/python/:

  • connect_and_measure.py for a single measurement after connecting.
  • continuous_measure_callback.py for continuous measurements using the callback/inheritance pattern from the original SDK.
  • single_flicker.py for a one-shot flicker capture.
  • continuous_flicker_callback.py for continuous flicker reporting.
  • counts_once.py for raw counts and thermal values.
  • calfiles.py for listing and selecting calibration profiles.

API Reference

A complete list of public classes, enums, and methods is available in API_REFERENCE.md.

Notes

  • The package is pure Python. pyserial is required for live device access, and numpy is used when available for faster math paths.
  • The API names intentionally track the original SDK so existing examples can be translated with minimal changes.
  • Derived-work copyright and permission notice from the original Klein SDK source is included in LICENSE.

PyPI Release

Release instructions for building and publishing are in PUBLISHING.md.