Skip to main content

scietex.hal.vacuum_gauge

scietex.hal.vacuum_gauge is a Python library for interfacing with and emulating vacuum gauges from various manufacturers, including Edwards, Leybold, and Erstevak. It provides a modular framework for converting analog voltage outputs to pressure readings and communicating with gauges over RS485 protocols. The library is designed for use in scientific and industrial applications, offering both client-side interaction with physical hardware and server-side emulation for testing and development.

Features

  • Analog Gauge Support: Convert voltage outputs to pressure readings (in millibars) for Edwards (APG-M, APG-L), Leybold (TTR 101 N), and Erstevak (MTP4D, MTM9D) gauges using interpolation or exponential formulas.
  • RS485 Communication: Full support for the Thyracont/Erstevak RS485 protocol (versions 1 and 2), including client-side control and server-side emulation.
  • Gateway Translators: ThyracontV1Translator and ThyracontV2Translator expose Thyracont gauges behind scietex.hal.serial v2.0.0’s ModbusGateway, letting a standard Modbus/TCP client talk to a gauge over the vendor RS485 protocol.
  • Modular Design: Organized into subpackages (base, edwards, leybold, erstevak, thyracont) for easy extension to additional manufacturers or models.
  • Atmospheric Adjustments: Apply gas-specific correction factors to pressure calculations.
  • Emulation: Simulate Erstevak gauge behavior for testing without physical hardware.
  • Backends: Supports pymodbus and pyserial for flexible RS485 communication.

Gateway Translators

Both translators are GatewayTranslator plugins for scietex.hal.serial v2.0.0’s ModbusGateway, so a standard Modbus/TCP client can read and write a Thyracont gauge through the gateway. The register maps are documented in each module docstring.

  • ThyracontV1Translator — maps standard Modbus FC03/FC06/FC16 requests to the Thyracont RS485 V1 vendor protocol (pressure, setpoints, calibration, Penning state). Values are raw integers; 32-bit values span two registers.
  • ThyracontV2Translator — read-only FC03 mapping to the Thyracont RS485 V2 vendor protocol (pressure, operating hours, wear) as IEEE-754 float32 register pairs. Every supported read spans exactly two registers.

Gateway usage

Wire the Thyracont plugin artifacts into a GatewayConfig by their installed dotted paths (serial_config is a scietex.hal.serial serial connection config):

from scietex.hal.serial.gateway.config import GatewayConfig, GatewayDeviceConfig

config = GatewayConfig(
    serial=serial_config,
    host="127.0.0.1",
    port=5020,
    devices={
        1: GatewayDeviceConfig(
            device_id=1,
            framer="scietex.hal.vacuum_gauge.thyracont.rs485.v1.framer.ThyracontASCIIFramer",
            decoder="scietex.hal.vacuum_gauge.thyracont.rs485.v1.decoder.ThyracontDecodePDU",
            pdus=["scietex.hal.vacuum_gauge.thyracont.rs485.v1.request.ThyracontRequest"],
            translator="scietex.hal.vacuum_gauge.thyracont.rs485.v1.translator.ThyracontV1Translator",
        )
    },
)

For a V2 gauge, use the matching ...rs485.v2... framer, decoder, request, and ThyracontV2Translator paths instead.

System Requirements

  • Python: 3.10 or higher.
  • Operating Systems: Compatible with Linux and macOS.

Installation

To install the package, execute the following command in your terminal:

pip install scietex.hal.vacuum_gauge

Contribution

We welcome contributions to the project! Whether it's bug fixes, feature enhancements, or documentation improvements, your input is valuable. Please feel free to submit pull requests or open issues to discuss potential changes.

License

This project is licensed under the MIT License. For more details, please refer to the LICENSE file included in the repository.

Metadata

Release files for scietex.hal.vacuum-gauge 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scietex.hal.vacuum-gauge 2.0.0
File Size Uploaded Provenance
scietex_hal_vacuum_gauge-2.0.0.tar.gz 67.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for scietex.hal.vacuum-gauge 2.0.0
File Interpreter ABI Platform
scietex_hal_vacuum_gauge-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 149.7 kB

Release files / scietex_hal_vacuum_gauge-2.0.0.tar.gz

Download URL scietex_hal_vacuum_gauge-2.0.0.tar.gz
Size 67.9 kB
Tags Source
SHA-256 checksum
How to use checksums
123051d95cd04c06d9656b79ce3894da51fca17f46e8cc953d6261a824ecd52c
BLAKE2b-256 checksum
How to use checksums
402eb94c3398f3da6a18944be12ecc1176bf13fb94eeb8e24edfbd103f2e7b85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / scietex_hal_vacuum_gauge-2.0.0-py3-none-any.whl

Download URL scietex_hal_vacuum_gauge-2.0.0-py3-none-any.whl
Size 81.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e1a45b6e844987a41bba67d6f7977ff984ee4150bb6220e34264c4000fbf9d5
BLAKE2b-256 checksum
How to use checksums
33025bbd2dcb506d87cbccba69223ae6d2e98a4f7ae6b236bb8d748bb46211fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Security for scietex.hal.vacuum-gauge 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for scietex_hal_vacuum_gauge-2.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page