# Windows classes

class pymeasure.display.windows.ManagedImageWindow(*args: Any, **kwargs: Any)

  Bases: `QMainWindow`

  Abstract base class.

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

  The MangedImageWindow 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 MangedImageWindow.

  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.

  open_file_externally(filename)

    Method to open the datafile using an external editor or viewer. Uses the default application to open a datafile of this filetype, but can be overridden by the child class in order to open the file in another application of choice.

  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_im_plot(im_plot)

    This method does nothing by default, but can be overridden by the child class in order to set up custom options for the image 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:

      im_plot – This window’s ImageItem instance.

  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.ManagedWindow(*args: Any, **kwargs: Any)

  Bases: `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.

  open_file_externally(filename)

    Method to open the datafile using an external editor or viewer. Uses the default application to open a datafile of this filetype, but can be overridden by the child class in order to open the file in another application of choice.

  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(*args: Any, **kwargs: Any)

  Bases: `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