Command-line tools

Installing mpylab provides five maintenance, diagnostic, and reporting commands. Every command supports --help as the authoritative option reference.

mpylab-dot-migrate

Migrates legacy condition identifiers in one DOT file or recursively in a configuration tree. The default mode previews changes. Use --write to apply them or --check in CI. See the DOT reference for condition semantics and path checks.

mpylab-dot-migrate --write local-config.dot
mpylab-dot-migrate --check --recursive path/to/configurations

mpylab-nport-migrate

Migrates legacy NPORT interpolation settings while retaining explicit control over file modification.

mpylab-nport-migrate --write local-cable.ini
mpylab-nport-migrate --check --recursive path/to/configurations

mpylab-nport-check

Checks NPORT frequency coverage, sampling density, and interpolation quality. It can write a machine-readable result for CI.

mpylab-nport-check --recursive path/to/configurations \
    --json-report nport-quality.json

mpylab-tem-report

Discovers supported sections in a TEM history pickle and creates modular reports. See Modular TEM reports for formats, section selection, layered TOML profiles, output layout, diagnostics, and traceability output.

mpylab-tem-report measurement-history.p --list-sections
mpylab-tem-report measurement-history.p \
    --output tem-report --formats pdf html svg

Use --list-sections before generation and repeated --section options to select specific evaluated datasets from a long measurement history. The report API exposes the same discovery and selection model to Python applications.

mpylab-visa-probe

Opens and closes one explicitly named VISA resource without resource discovery. The default invocation performs no instrument query:

mpylab-visa-probe GPIB0::29::INSTR

Use --query only for an explicitly authorized read-only query. A query must be non-empty, end in ?, and contain no semicolon. --timeout-ms sets a positive VISA timeout in milliseconds and defaults to 3000:

mpylab-visa-probe GPIB0::29::INSTR --query '*IDN?' --timeout-ms 3000

The tool never calls list_resources. Select a particular PyVISA backend through PYVISA_LIBRARY when necessary, for example @py. Running the command against real hardware requires a machine with hardware access and explicit authorization; its validation and automated tests use simulated resources only.