Windows classes

class pymeasure.display.windows.ManagedWindow(procedure_class, inputs=(), displays=(), x_axis=None, y_axis=None, log_channel='', log_level=20, parent=None)

Bases: PyQt5.QtWidgets.QMainWindow

Abstract base class.

The ManagedWindow provides an interface for inputting experiment parameters, running several experiments (Procedure), plotting result curves, and listing the experiments conducted during a session.

The ManagedWindow uses a Manager to control Workers in a Queue, and provides a simple interface. The queue() method must be overridden by the child class.

See also

Tutorial Using the ManagedWindow

A tutorial and example on the basic configuration and usage of ManagedWindow.

plot

The pyqtgraph.PlotItem object for this window. Can be accessed to further customise the plot view programmatically, e.g., display log-log or semi-log axes by default, change axis range, etc.

queue()

Abstract method, which must be overridden by the child class.

Implementations must call self.manager.queue(experiment) and pass an experiment (Experiment) object which contains the Results and Procedure to be run.

For example:

def queue(self):
    filename = unique_filename('results', prefix="data") # from pymeasure.experiment

    procedure = self.make_procedure() # Procedure class was passed at construction
    results = Results(procedure, filename)
    experiment = self.new_experiment(results)

    self.manager.queue(experiment)
set_parameters(parameters)

This method should be overwritten by the child class. The parameters argument is a dictionary of Parameter objects. The Parameters should overwrite the GUI values so that a user can click “Queue” to capture the same parameters.

setup_plot(plot)

This method does nothing by default, but can be overridden by the child class in order to set up custom options for the plot

This method is called during the constructor, after all other set up has been completed, and is provided as a convenience method to parallel Plotter.

Parameters

plot – This window’s PlotItem instance.

class pymeasure.display.windows.PlotterWindow(plotter, refresh_time=0.1, parent=None)

Bases: PyQt5.QtWidgets.QMainWindow

A window for plotting experiment results. Should not be instantiated directly, but only via the Plotter class.

See also

Tutorial Using the Plotter

A tutorial and example code for using the Plotter and PlotterWindow.

check_stop()

Checks if the Plotter should stop and exits the Qt main loop if so