The object_config module

Dialogs for setting up the main objects: actions, instruments, and graphs.

Classes

ActionDialog

class src.gui.object_config.ActionDialog(parent, expt, actionIn)[source]

A dialog to configure standard actions.

This dialog presents a way to configure normal Action objects. It presents a two-region panel. On the left are options for inputs, and on the right are options for outputs. Inputs may have both their values and their column names set here, and outputs may have their column names set.

Parameters :

parent : wxWindow

The panel or frame which owns this dialog.

experiment : Experiment

The experiment which owns the action being configured by this dialog.

actionIn : Action

The action whose parameters will be set by this dialog.

Methods

update()[source]

Try to update the action to reflect changes made by this dialog.

ScanDialog

class src.gui.object_config.ScanDialog(parent, expt, actionIn)[source]

A dialog for configuring scan actions.

Parameters :

parent : wxWindow

The panel or frame which owns this dialog.

expt : Experiment

The experiment which owns the action being configured by this dialog.

actionIn : Action

The action whose parameters will be set by this dialog.

Methods

getData()[source]

Return the data contained in the scan panel.

Returns :

list of tuple of str :

The scan panel data.

update()[source]

Try to update the action to reflect changes made by this dialog.

LoopTimesDialog

class src.gui.object_config.LoopTimesDialog(parent, expt, actionIn)[source]

A dialog for configuring the most simple looping actions.

This dialog allows configuration both of actions which loop for a specified amount of time (in seconds) and of actions which loop for a specified number of iterations.

Parameters :

parent : wxWindow

The panel or frame which owns this dialog.

expt : Experiment

The experiment which owns the action being configured by this dialog.

actionIn : Action

The action whose parameters will be set by this dialog.

Methods

update()[source]

Try to update the action to reflect changes made by this dialog.

BlankDialog

class src.gui.object_config.BlankDialog(parent, expt, actionIn)[source]

An empty dialog which closes immediately.

Parameters :

parent : wxWindow

The panel or frame which owns this dialog.

expt : Experiment

The experiment which owns the action being configured by this dialog.

actionIn : Action

The action whose parameters will be set by this dialog.

Methods

ShowModal(event=None)[source]

Return immediately, so that the dialog closes.

close()[source]

Close the dialog.

update()[source]

Try to update the action to reflect changes made by this dialog.

LoopWhileDialog

class src.gui.object_config.LoopWhileDialog(parent, expt, actionIn)[source]

A dialog for configuring a while loop action.

Parameters :

parent : wxWindow

The panel or frame which owns this dialog.

expt : Experiment

The experiment which will execute the action configured by this dialog.

actionIn : Action

The looping action whose parameters will be set by this dialog.

Methods

update()[source]

Try to update the action to reflect changes made by this dialog.

FileDialog

class src.gui.object_config.FileDialog(parent, expt, actionIn)[source]

A dialog for setting the data filename.

Parameters :

parent : wxWindow

The panel or frame which owns this dialog.

expt : Experiment

The experiment which will be writing to the files.

actionIn : Action

The file-saving action whose parameters will be set by this dialog.

Methods

onBrowse(event)[source]

Show a dialog to browse for a folder.

update()[source]

Try to update the action to reflect changes made by this dialog.

CalculateDialog

class src.gui.object_config.CalculateDialog(parent, expt, actionIn)[source]

A dialog for configuring calculation actions.

Parameters :

parent : wxWindow

The panel or frame which owns this dialog.

expt : Experiment

The experiment which owns the action being configured by this dialog.

actionIn : Action

The action whose parameters will be set by this dialog.

Methods

update()[source]

Try to update the action to reflect changes made by this dialog.

ExpressionPanel

class src.gui.object_config.ExpressionPanel(parent, data)[source]

A panel for creating and editing expressions for later evaluation.

Parameters :

parent : wxWindow

The panel or frame which contains this panel.

data : tuple of list of str

A three-element tuple of lists of strings. The first element of the tuple contains a list of the names of constants, the second contains a list of columns, and the last contains a list of parameters.

Methods

getExpression()[source]

Get the value of the expression box.

Returns :

str :

The string expression set by the user.

setExpression(expression)[source]

Set the value of the expression box.

Parameters :

expression : str

The value which should go in the expression box. The expression may, on use of eval, return an int, a float, or a bool.

InstrumentDialog

class src.gui.object_config.InstrumentDialog(parent, inst)[source]

A simple dialog for creating new instruments.

Methods

update()[source]

Update the instrument to reflect changes.

RebindInstrumentDialog

class src.gui.object_config.RebindInstrumentDialog(parent, expt, action)[source]

A dialog to change the instrument to which an action is bound.

Methods

update()[source]

Update the action to use the new instrument.

GraphDialog

class src.gui.object_config.GraphDialog(parent, expt, graphIn=None)[source]

A dialog for editing graphs.

Parameters :

parent : wxWindow

The frame or panel which owns this dialog.

experiment : Experiment

The experiment which contains the graphs edited by this dialog.

graphIn : Graph

The graph to edit.

Methods

update()[source]

Update the input graph or create a new graph.

Functions

src.gui.object_config.getDialog(action)[source]

Return the appropriate dialog for the supplied action.

Parameters :

action : Action

An Action object which the user wants to edit.

Returns :

class :

The appropriate dialog class (uninstantiated) for modifying action.