DataViewer

Throughout the MIEN documentation, the Data Viewer will often be referred to as DV, and the syntax DV->Menu->Option will be used to mean "Select the choice named 'option' from the menu named 'Menu' in the menubar on the Data Viewer window". This may be used interchangeably with Menu->option if only DV is open, but often MIEN sessions will have several open GUIs, so DV->File, X->File, and CV->File refer to the file menus on different windows.

Starting Data Viewer

Start the GUI using the command mien -a data. Optionally, you can append the name of one or more data files to open at the end of the command.

Loading data

If you didn't pass in the names of any data files, there are two other ways to load data into Data Viewer; Drag and Drop, and the File menu.

To load data by drag and drop, drag a local file from your Desktop or from a graphical file manager, and drop the file onto the black graphing area in the center of the Data Viewer. Dropping files here will cause DV to open them in append mode. This means that the data in each file will be concatenated with any data that is currently open in DV.

To load from the File menu, use File->Load, File->Append, and File-Append Subset. Each of these commands will open a file dialog where you can select a file to open, and will import data from that file. In the case of "Load", these new data will replace any existing data. In the case of "Append" they will be concatenated with the existing data. "Append Subset" allows you to choose parts of a complex document for import, rather than importing the entire contents. "Load" is exactly equivalent to "New Document" followed by "Append", so if you would like to "Load Subset", just call "New Document" before calling "Append Subset".

If you attempt to load data and nothing displays, check your terminal for error messages. If the file loaded correctly, but DV reported "No numerical elements to display" then the problem is that MIEN can't figure out that your file contains numerical data. Here are some suggestions for fixing that.

Types of data to open

Why Are There Two Lines for Each Plot?

This is the all time most frequently asked question about DV. If you just loaded up a long data set containing two channels of rapidly varying measurements, and all went well you are probably looking at 4, not 2 wiggly lines; 2 green ones and 2 blue ones. Don't worry, this is normal behavior.

What is happening here is that you have many more data points than DV has pixels on the screen to draw them with. When this happens, DV doesn't waste time drawing many sub-pixel lines that you can't see. Instead it draws the "envelope" of the data: one line showing the upper bound, and one showing the lower bound. If you zoom in on a region enough that MIEN has at least one pixel per data point to draw with, you will see only one line. The envelope line style can be changed, but it is much faster than the full line style, and most users have found that it is clear and informative once they get used to it.

Navigating in DV

The core of DV is a MIEN 2D graph widget. This is the black area that takes up most of the DV window. The graph provides a number of navigation features itself. In addition, the DV frame surrounding the graph adds some navigation features of its own.

Graph navigation

Mouse behaviors

Left-clicking the mouse in a DV graph will draw a vertical marker. This is a vertical line with a label showing it's X coordinate. Markers can be used to measure things, to specify parameters (such as thresholds) for analysis functions, and to control zoom commands.

If you Left-click-and-drag rather than just clicking, you can zoom in on a region of the data. This zoom is a horizontal-only zoom. The range of X values displayed is changed but the range of Y values is not.

If you hold down shift while clicking, the behavior is changed from X-axis to Y-axis. A Shift-left-click-and-drag will perform a vertical-only zoom, and a Shift-left-click will draw a horizontal marker. The behavior of Shift is very common in 2-D graphs. You will find that other commands use Shift similarly; for example the keystroke "a" will zoom out horizontally, and "A" (Shift-a) will zoom out vertically.

Right-clicking brings up a contextual menu which gives you access to configuration details for the graph. You can save images, change colors and line styles, and show/hide plots. Note that if you make a custom configuration in the graph menu, you will need to select "Save Configuration" in order to inform DV of the changes. Otherwise, your custom configuration will only last until Dataviewer redraws the graph (for example because you opened new data or ran an analysis function).

Key Bindings

Most navigation on the graph is done using key bindings. You can get a list of the current set of bindings by using the right-click menu and choosing "Show Key Bindings". The Bindings will print in your controlling terminal. As of the time of this writing, the graph key bindings are as follows:

Choosing Display Offsets.

At the bottom of the DV window there is a row of widgets including two pull-down menus and three text boxes. The most important of these is the right-hand pull-down which gives you access to several useful view presets.

The view presets determine how DV displays multiple channels of data. You can separate the channels in various ways, show them just as they are, overlap them, or show them in image mode. The default mode, quick sep separates each channel as though you had given each one different Y offsets on an oscilloscope. The difference between quick sep, local sep and separate is the algorithm used to determine the offsets. The most reliable and best looking is separate, but it can be slow on very large data sets (which is why it isn't the default, since then you would have to wait for it to run before you got a chance to turn it off). Initially, you should probably use separate mode, but feel free to play with the other modes and see if you like them.

Note that with the exception of image mode, all the view modes are simply preset algorithms for setting the 3 values associated to the three text boxes; X off(set), Y off(set), and Y sca(le). You can also set these manually. Use the left-hand pull down menu to select a channel. The text boxes will now reflect the offset and scale values for that channel. You can edit the value in a box and hit enter in order to display that channel with a different horizontal shift, vertical shift, or scaling factor.

If you get DV in a state where the offsets are not doing what you want, you can always select the raw view preset to remove all offsets and show the data just as they are. After that you can go back to a different preset, or set manual values, and things should be working as expected again.

Changing the display offsets doesn't change the actual data, only the view. Also, DV will compensate for the display offsets when sending parameters to analysis functions, so if you want to set a threshold on channel 4 (using a marker), you just put the marker at the level that looks right. You don't need to worry that channel 4 might be displayed with a vertical offset.

The offset controls in DV are designed to be somewhat similar to the offset controls on a multi-channel oscilloscope.

Navigation Commands in the DataViewer Menus

Some functions in the DV menus also have navigational effects, particularly functions in the Edit and Display menus.

Use of all the menu commands is described in the next section.

DV Menu Commands

If you are using Mac OS, read note about Mac menu behavior.

DV has 6 menus: File, Edit, Display, Extensions, DSP, and Python. Each is described in its own section below.

File Menu

Many of the functions in the DV file menu are standard to MIEN GUIs, and are described here.

The following functions are DV specific:

Edit Menu

Display Menu

Extensions

Note that this menu provides functions for managing extensions, as well as listing DV type extension block functions. The content of this menu may change if you add blocks. Only the built-in functions are documented here. Extension block functions for signal processing, that don't define custom GUIs, are listed in the DSP menu, rather than here.

DSP

This menu provides signal processing functions, including some defined by MIEN, and those defined by any loaded extensions. See the MIEN DSP documentation, or the documentation for the relevant block for usage of each function.

The functions are organized using Python package notation. If you install an extension block named "myext", which provides a module named "mydsp" with a function in it named "mytest", then you should see a sub-menu in the DV DSP menu named "myext.mydsp", an within that submenu, you will see a function "mytest".

When you activate a DSP function from this menu, MIEN auto-generates a GUI interface for you to enter the parameters for the function. How polished this interface is depends on the design of the function. Some functions provide polished step-by-step GUIs. The worst functions provide text entry fields in which you will need to enter correctly constructed Python code. Most extensions are somewhere in between. In particular, if a complex entry of Python code is needed, MIEN will often provide a "browser" helper function to construct this code for you. If you see an intimidating text field, don't know what to type, but see a "browse" button on the right, try pressing that. It should help.

The most common of the complex function parameters is the data selection tuple. This is a Python tuple with three elements: the path to the data to use, a list of channels to use, and a range of samples to use. For example: ('/filter', [0,1], [1000,10000]) specifies 9000 samples on two channels of the subdata element named "fiter". False arguments mean "all of it", or "the top level data", so (None, None, None) refers to all samples of all channels of the currently displayed main data element.

Python

The menu lets you launch Python interactive sessions that interact with the DV gui. See the general-purpose gui documentation.

Preferences

Choosing DV->File->Preferences launches the preference editor for DV. DV has the most extensive preferences menu of the MIEN GUIs. The majority of preferences handle how data are displayed. Some others handle what to do when loading or saving complex data.

 

Last edit: 05/29/09

Index