Skip to main content

mpylab

MPyLab — Graph-Based Lab Measurements

pipeline status coverage PyPI version tested Python documentation

mpylab connects laboratory instruments, measurement procedures, and traceable results.

Overview

Use mpylab to:

  • describe instruments and signal paths in configurable measurement graphs;
  • run TEM/GTEM, mode-stirred chamber, and amplifier measurements;
  • retain physical units, uncertainties, and measurement history;
  • try measurement workflows with virtual devices before using laboratory hardware;
  • inspect configurations, convert calibration data, and generate reports.

mpylab is a Python framework. Applications such as TEMField provide a graphical measurement interface built on it.

Device test windows and the limit explorer include a project icon and a nonmodal About dialog with version and documentation links. Quit follows each tool's existing device shutdown path. See the GUI integration guide for using the same pattern in an application.

Installation

mpylab requires Python 3.11 or newer. Create and activate a virtual environment:

python -m venv .venv
source .venv/bin/activate

On Windows PowerShell, activate it with .venv\Scripts\Activate.ps1 instead. Install the published package and its Python dependencies:

python -m pip install mpylab

For the limit explorer, device test windows and Qt measurement interfaces, install the optional GUI dependencies:

python -m pip install "mpylab[gui]"

The base installation supports non-GUI workflows without PySide6 or Shiboken.

The installation guide covers platform-specific steps and installation from GitLab. Communication backends for real instruments depend on the laboratory setup.

First steps

Try a complete measurement and evaluation with virtual instruments. The example scripts and configurations are provided in the repository; obtaining them requires Git. Keep the virtual environment activated, then run:

git clone https://gitlab.hrz.tu-chemnitz.de/chair-of-electromagnetic-theory-and-compatibility-at-tu-dresden/mpylab/mpylab.git
cd mpylab
python script/tem-verification.py script/conf/tem-gtem-verification-virtual/conf.py

The example needs no instruments or operator input. A successful measurement ends with:

End of TEM verification. Status: 0

Results and logs are written below script/conf/tem-gtem-verification-virtual/output/. Inspect the available report sections in the resulting history:

mpylab-tem-report script/conf/tem-gtem-verification-virtual/output/tem-verification-virtual.p --list-sections

Continue with the first-run guide for output files, reporting, and the steps required before real hardware use.

Command-line interface

Installing mpylab provides the following commands. Replace example input paths with your own files; run any command with --help for its complete options.

Command Purpose Example
mpylab-config-show Display the effective configuration without running a measurement. mpylab-config-show measurement.py setup.py
mpylab-config-check Validate an inventoried configuration package without hardware access. mpylab-config-check config-checks.toml
mpylab-dot-migrate Check or migrate legacy DOT condition identifiers. mpylab-dot-migrate --check setup.dot
mpylab-nport-migrate Check or migrate legacy NPORT INI settings. mpylab-nport-migrate --check cable.ini
mpylab-nport-check Check NPORT frequency coverage, sampling, and interpolation. mpylab-nport-check cable.ini --json-report nport-quality.json
mpylab-vna2dat Convert VNA CSV or Touchstone exports into correction-data files. mpylab-vna2dat cable.s2p --parameter S21 --dry-run
mpylab-tem-report Inspect TEM history sections or generate measurement reports. mpylab-tem-report history.p --list-sections
mpylab-limit-explorer Open the graphical browser for emission limits (requires [gui]). mpylab-limit-explorer
mpylab-visa-probe Open one explicitly selected VISA instrument, optionally sending a query. mpylab-visa-probe --help

The migration commands show a dry-run diff by default; --check checks without writing, and --write applies changes. mpylab-visa-probe accesses real hardware when given an instrument resource; its example above only displays help.

Documentation

Help and contributing

Start with troubleshooting or report a problem through the issue tracker. For development setup and checks, see CONTRIBUTING.md.

Original author and principal developer: Hans Georg Krauthäuser (hgk@ieee.org), Chair for Electromagnetic Theory and Compatibility, Technische Universität Dresden. See CONTRIBUTORS.md for contributor acknowledgements and roles.

License

mpylab is distributed under GPL-3.0-or-later.

Metadata

Release files for mpylab 1.0.34

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

Source distribution (sdist)

Source distribution for mpylab 1.0.34
File Size Uploaded Provenance
mpylab-1.0.34.tar.gz 17.6 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mpylab 1.0.34
File Interpreter ABI Platform
mpylab-1.0.34-py3-none-any.whl Python 3 none any Details

Total release size: 18.6 MB

Release files / mpylab-1.0.34.tar.gz

Download URL mpylab-1.0.34.tar.gz
Size 17.6 MB
Tags Source
SHA-256 checksum
How to use checksums
54b70c2ac75e0d57c8185727fa3b6fff43632e4735f08b7037cc1b910f4be21c
BLAKE2b-256 checksum
How to use checksums
fe3af498a8cd5826d1e3b9041e6eb0661342b6892ce5b7c132486aac2dc3601d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / mpylab-1.0.34-py3-none-any.whl

Download URL mpylab-1.0.34-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
92875948e3bb65179575f7ef147d33ae805080c8ed89ae69ca045809a82dec4c
BLAKE2b-256 checksum
How to use checksums
9a499253c34a646da1db4ff6345000617512cb679ea2c4f0234351ac84f8383b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for mpylab 1.0.34

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

1.0.34 This release

2 release files No provenance

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