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.35

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.35
File Size Uploaded Provenance
mpylab-1.0.35.tar.gz 17.6 MB Without provenance Details

Built distribution (wheel)

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

Total release size: 18.6 MB

Release files / mpylab-1.0.35.tar.gz

Download URL mpylab-1.0.35.tar.gz
Size 17.6 MB
Tags Source
SHA-256 checksum
How to use checksums
f2621ab84503f4e918b087c378d0bf327556e368cca8a8ee067e5b1ae444d056
BLAKE2b-256 checksum
How to use checksums
cf80de3609dce76f71e6be5ab32cbb2254261689109a226c2885abc81888ed0d
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.35-py3-none-any.whl

Download URL mpylab-1.0.35-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
03eea72175eef7da14f8688b2f5dbba7fdb84059e97a0de36741402c6dc02a23
BLAKE2b-256 checksum
How to use checksums
2ed64f0ba638c73d8949fe5834801c3a8337d0ce4b5d8eaebdddf34d5b3c936c
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.35

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.35 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