Windows classes¶
-
class
pymeasure.display.windows.
ManagedImageWindow
(procedure_class, x_axis, y_axis, z_axis=None, inputs=(), displays=(), log_channel='', log_level=20, parent=None)¶ Bases:
sphinx.ext.autodoc.importer._MockObject
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 anexperiment
(Experiment
) object which contains theResults
andProcedure
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
(procedure_class, inputs=(), displays=(), x_axis=None, y_axis=None, log_channel='', log_level=20, parent=None, sequencer=False, sequencer_inputs=None, sequence_file=None, inputs_in_scrollarea=False, directory_input=False)¶ Bases:
sphinx.ext.autodoc.importer._MockObject
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 anexperiment
(Experiment
) object which contains theResults
andProcedure
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:
sphinx.ext.autodoc.importer._MockObject
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