This tutorial will help guide you through the features of the experimenter and get started with building experiments. The tutorial assumes you have the lrexp package installed.

The following should be completed sequentially:

Hello, world!
Simple Math and Logic


Here are some definitions or terms that appear in the tutorial.

General Terms

Experimenter - The program which allows users to graphically create, edit and execute Units (.lre files).

Unit - A basic part of an experiment. Can be executed. Units can contain other units, but any unit is a fully functional experiment on its own.

Component - Any part of a Unit tree. All Scans, for instance, possess a Scan Range, which is not a unit but still a part of the experiment which can be saved, edited, etc. Units and inputs are both considered Components.

input (lowercase) - Any component which has a value attribute is designed to hold python data. Technically it consists of any python object that inherits from the Input class.

Unit Types

Action - Executes a specified python function with specified function arguments.

Sequence - Executes a series of Units in a specific order.

Scan - Executes a Unit (called the Scan Unit) a number of times, each time setting the value attribute of the Scan Input to the next value from the Scan Range.

Repeat - Executes a Unit a specified number of times.

Conditional - Executes one Unit (called the True Unit) if an input's (called the Condition) value returns true, otherwise executing another Unit (called the False Unit).

Null - Does nothing.

Component Types


Input - Holds python data stored in its value attribute.

Map - Executes a function whose return value becomes the Map's value.

Result - Possessed by an Action, it holds the most recent return value of the Action's execution.

Global - Equivalent to an Input, it is used by the Experimenter to allow easy tweaking of experiments by giving user top level access to a small number of variables, encapsulating a potentially complex Unit tree structure.


Parameter - Represents a Unit or Function argument Holds a single input. Possesses a name attribute to distinguish itself from other Parameters on the same branch.

Label - Holds a single Component. Included for clarity when viewing Units in Experimenter tree views.

Argument List (List Argument) - Holds either:
  • A group of inputs whose value attributes comprise the list argument to be passed to the function (POLY mode).
  • A single input whose value attribute, which is a collection of some sort (e.g. list, tuple, array), comprises the list argument (MONO mode).

Scan Range - Represents the collection of value over which a Scan scans. Has four different modes:
  • Uses the numpy arange function. A sequence that begins at a specified start point, continuing in steps of a specified interval without exceeding a specified end point (DELTA mode).
  • Uses the numpy linspace function. A sequence of a specified number of evenly spaced steps between specified start and end points (STEPS mode).
  • A collection equivalent to the Argument List's POLY mode (COLLECTION mode).
  • A collection equivalent to the Argument List's MONO mode (LIST mode).

Dictionary Argument (not implemented) - Holds keyword arguments.

Experimenter Features

Root Unit - The top level Unit in the Root view. Usually this is the experiment you are currently working on. Saving, loading, and creation of Root Units can be done through the File menu.

Root view - The main workspace of the current Unit (or experiment) you are constructing. Double-clicking (or pressing return or right clicking) Components of the Unit brings up their edit dialogs.

Clipboard - A temporary storage space for Components. Place a Component in the Clipboard by dragging it from the Root view. Edit dialogs have access to Components from the Clipboard, and Components in the Clipboard can be edited in the same way as the Root view.

Globals Widget - Quick access to creating, finding and editing Globals.


Here is a list of the shortcuts for the Experimenter. Note that for Mac OS X you should use the Command key instead of Control.
Root Unit
New Root
Ctrl - N
Load Root
Ctrl - O
Load Root from Clipboard
Ctrl - C
Ctrl - S
Save Root As
Ctrl - Shift - S
Execute Root
Ctrl - E
Reorderable Lists[1]
Raise Item
Ctrl - L - U
Lower Item
Ctrl - L - D
Add Item
Ctrl - L - A
Remove Item
Ctrl - L - R
Ctrl - C
Toggle Views
Ctrl - Shift - G
Clip Board
Ctrl - Shift - C

  1. ^ For Globals and the Clip Board, substitute G and B for L, respectively.