Skip to main content

This library provides a high-level interface for communicating with IMT Analytics devices via RS232

Project description

General information

pigeon‑transmission is an independently developed Python library that provides simple and reliable serial communication with measurement devices from IMT Analytics. It is designed for users who want to automate data acquisition, integrate measurement workflows, or control devices programmatically.

This is an unofficial project and is not developed, reviewed, or supported by IMT Analytics. The development of this library was carried out entirely independently of IMT Analytics.

⚙️ Installation

Python 3.10 or higher is required

pip install pigeon-transmission

🚀 Example Usage

First Example - with statement

from pigeon_transmission import DeviceH4

with DeviceH4(port="com2") as device:
    print(device.write_setting(operation_name="gas_type", value="air"))  # WS

Second Example - Explicit Resource Management

from pigeon_transmission import DeviceH4

device = DeviceH4()
device.open_serial_interface(port="com2")  # open
print(device.write_setting(operation_name="gas_type", value="air"))  # WS
device.close_serial_interface()  # close

Third Example - Manual Resource Management (The instance does not need to stay alive)

from pigeon_transmission import DeviceH4

device = DeviceH4()
serial_object = device.open_serial_interface(port="com2")  # open
print(device.execute_command(operation_name="switch_echo", value="off", serial_object=serial_object))  # CM
device.close_serial_interface(serial_object=serial_object)  # close

Fast data mode

import queue  # only for fast data
import threading  # only for fast data
from pigeon_transmission import DeviceH4

device = DeviceH4()
device.open_serial_interface(port="com2")  # open serial connection

data_queue, stop_queue = queue.Queue(), queue.Queue()

# Start background thread for fast data streaming
thread_stream = threading.Thread(
    target=device.start_stream,
    args=("high_flow", "differential_pressure", "temperature",
          data_queue, stop_queue, 5),
    daemon=True
)
thread_stream.start()

# Main loop: receive streamed measurement data
while stop_queue.empty():
    try:
        data = data_queue.get(timeout=1)
        print(data)
        # --- Handle incoming data here ---
        # Process, log, visualize, or store the measurement values.
        # To stop streaming, call:
        #     stop_queue.put(True)
        # This will end the loop and signal the thread to stop.
        # ---------------------------------
    except queue.Empty:
        pass

# Wait for the streaming thread to finish
thread_stream.join()
device.close_serial_interface()  # close serial connection

Notes

  • Measurement of I:E ratio – Use Ti/Te if Ti > Te, otherwise Te/Ti

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pigeon_transmission-0.0.2.tar.gz (40.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pigeon_transmission-0.0.2-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

Details for the file pigeon_transmission-0.0.2.tar.gz.

File metadata

  • Download URL: pigeon_transmission-0.0.2.tar.gz
  • Upload date:
  • Size: 40.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for pigeon_transmission-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f1afde4d4ca05def5d7cd7c7a89618c552c0868e2654374cac1b9b1de272903b
MD5 7b551019f05fc3310a019b5c258c283e
BLAKE2b-256 80963df98f78aea9cbb3a373f45262415d833a030177e34c5c67acb28dd298ba

See more details on using hashes here.

File details

Details for the file pigeon_transmission-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pigeon_transmission-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 abede923af02af4c7bbd2391535f69f1969a50c253673e388a6649775ecfa0a1
MD5 e8c8f1694ba5feade117c574b56e0be7
BLAKE2b-256 5be5f888d998fee9a206c38d25eea0be7e8e610623d9744804543d45e34619a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page