Develop a measurement application

This entry point is for developers who configure an existing workflow or extend mpylab with measurement logic, instruments, or a user interface.

1. Select the appropriate extension layer

Check in this order:

  1. Can an existing measurement class be adapted using only a new conf.py and DOT and INI and DAT files?

  2. Is a concrete driver missing for an existing instrument-family base class?

  3. Is a new technical measurement class actually required?

  4. Does the existing workflow only need another UI adapter or report module?

The framework architecture describes the responsibility boundaries.

2. Follow the end-to-end example

The developer tutorial uses a virtual amplifier test to connect conf.py, DOT, and INI configuration with path corrections, autosave, tests, and UI integration.

3. Preserve the contracts

  • Measurement classes derive from Measure and separate acquisition from evaluation.

  • Hardware protocols remain in instrument drivers.

  • MGraph receives DOT conditions and physical context controllers through an explicit context. Custom applications handle detected state mismatches without automatically switching the hardware back.

  • Measurement values remain SCUQ quantities.

  • Blocking calls run in a worker when using Qt.

  • RF-off, instrument limits, and manual intervention remain reachable.

See measurement classes, drivers, DOT context controllers, path corrections, and UI workers for details. The EUT monitoring guide covers custom monitor development, threaded isolation, and integration through EUTMonitoringSession.

For deliverable results, the report guide separates TOML presentation configuration from custom Python report modules. The curated report API documents their lifecycle and integration.

4. Verify without hardware

New workflows require pure-logic tests, instrument-contract tests, a virtual configuration, a short end-to-end run, and safety and resume tests. The testing guide puts these layers into context.

5. Consult the API

The curated API and CLI reference documents the recommended extension surface. Undocumented names beginning with an underscore should be treated as internal implementation.

When updating older application code, use the tool-module migration guide to replace imports from the historical mpylab.tools.util facade with focused modules.