exopy.measurement.base_tool module

Measurement tools are meant to specify actions not covered by the tasks.

The class defined here are not meant to be used directly. One should rather subclass one of their subclasses according to the kind of tool one wants to create.

The existing kind of tools are the following :

  • pre-measurement execution hook : used to perform additional operations before running a measurement. (see hooks package)

  • monitors : used to follow the progress of a measurement. (see monitors package)

  • post-measurement execution hook : used to perform additional operations after the measurement has been run. (see hooks package)


Forward typing for the declaration member of the BaseMeasureTool.


Delayed import to avoid circular import issues.

class exopy.measurement.base_tool.BaseMeasureTool[source]

Bases: exopy.utils.atom_util.HasPrefAtom

Base tool simply definig the expected interface.


Reference to the measurement to which that tool is linked (None if unlinked)


Reference to the declaration of this tool.

check(workbench, **kwargs)[source]

Ensure that the tool is properly configured and will be able to work

  • workbench – Reference to the application workbench.

  • kwargs – Additional keywords providing infos about the context of execution. For example if any runtime dependencie is unavailable it will be listed in the missing keyword argument.


Get the current state of the tool. Used when saving.


Restore the state of the tool from a preferences dict.

Link this tool to a measurement.

Unlink this tool from the measurement to which it is linked.

class exopy.measurement.base_tool.BaseToolDeclaration(parent=None, **kwargs)[source]

Bases: enaml.core.declarative.Declarative

Base class for defining a measurement tool contribution.


Unique name used to identify the tool. The usual format is top_level_package_name.tool_name


Description of the tool.


Flag indicating whether the tool has an associated parametrisation widget.

new(workbench, default=True)[source]

Create a new instance of the tool.

  • workbench (Workbench) – Reference to the application workbench.

  • default (bool, optional) – Flag indicating whether to use default parameters when creating the tool or not. Mainly used when loading a tool from a saved config.

make_view(workbench, tool)[source]

Create a widget to edit the tool parameters.

This widget should inherit from Container.