OOMMF Home next up previous contents
Next: Data Archive: mmArchive Up: OOMMF Documentation Previous: Data Graph Display: mmGraph


Vector Field Display: mmDisp

mmDisp Screen Shot

Overview
mmDisp displays a two-dimensional spatial distribution of three-dimensional vectors (i.e., a vector field). It can load vector fields from files in a variety of formats, or it can accept vector field data from a client application, typically a running solver. mmDisp offers to the user a rich interface for controlling the display of vector field data, and can also save the data to a file and produce Postscript print output.

Launching
mmDisp may be started either by selecting the mmDisp button on mmLaunch, or from the command line via

tclsh app/oommf/oommf.tcl mmDisp [-server] [-version] \
       [-console] [--] [<fileName>]

The command line option -server makes mmDisp a server supplying vector field display services to other applications. Without that option mmDisp only displays vector field data loaded from files. The -server option is automatically included when mmDisp is launched by mmLaunch.

If the option -version is present on the command line, version information is printed, and mmDisp exits immediately.

If a filename is supplied on the command line, mmDisp takes it to be the name of a file containing vector field data for display. That file will be opened on startup.

Inputs
Input to mmDisp may come from either a file or from a client application (typically a running solver), in any of the vector field formats.

File input is initiated through the File |Open... dialog box. Several example files are included in the OOMMF release directory app/mmdisp/examples. When the Browse button is enabled, the ``Open File'' dialog box will remain open after loading a file, so that multiple files may be displayed in sequence. The Auto configuration box determines whether the arrow subsampling or the zoom factor of the display should be determined automatically based on the data in the file to be loaded and the current display window size, or whether their values should be held constant while loading the file.

The client application(s) that send data to mmDisp for display control the flow of data. The user, interacting with the mmDisp window, controls how the vector field data are displayed.

Outputs
The vector field displayed by mmDisp may be saved to disk via the File |Save As... dialog box. The output is in the OVF format. The OVF file options may be set by selecting the appropriate radio buttons in the OVF File Options panel. The Title and Desc fields may be edited before saving. Enabling the Browse button allows for saving multiple files without closing the ``Save File'' dialog box.

The File |Print... dialog is used to produce a Postscript file of the current display. On Unix systems, the output may be sent directly to a printer by filling the Print to: entry with the appropriate pipe command, e.g., |lpr. (The exact form is system dependent.)

Controls

The View menu provides to the user high-level control over how the vector field is placed in the display window. The menu selection View |Wrap Display resizes the display window so that it just contains the entire vector field surrounded by a margin. View |Fill Display resizes the vector field until it fills the current size of the display window. If the aspect ratio of the display window does not match the aspect ratio of the vector field, a larger than requested margin appears along one edge to make up the difference. View |Rotate ccw and View |Rotate cw rotate the display one quarter turn counter-clockwise and clockwise respectively. The display window also rotates, so that the portion of the vector field seen and any margins are preserved (unless the display of the control bar forces the display window to be wider). View |reDraw allows the user to invoke a redrawing of the display window.

The vector field may be rescaled (``zoomed'') and moved so that only a portion of it is visible in the display window. When a portion of the vector field lies outside the display window, scrollbars appear that may be used to translate the vector field so that different portions are visible in the display window. On systems which have a middle mouse button, clicking the middle button on a point in the display window adjusts the display so that the selected location is centered within the display window.

The mouse may also be used within the display window to rescale the display. A click and drag with the left mouse button displays a red rectangle which changes size as the mouse is dragged. When the left mouse button is released, the vector field is rescaled so that the portion of the display window within the red rectangle expands until it reaches the edges of the display window. Both dimensions are scaled by the same amount so there is no distortion of the vector field. Small red arrows on the sides of the red rectangle indicate which dimension will expand to meet the display window boundaries upon release of the left mouse button. After the rescaling, the red rectangle remains in the display window briefly, surrounding the same region of the vector field, but at the new scale.

A click and drag with the right mouse button displays a blue rectangle which changes size as the mouse is dragged. When the right mouse button is released, the vector field is rescaled so that all of the vector field currently visible in the display window fits in the size of the blue rectangle. Both dimensions are scaled by the same amount so there is no distortion of the vector field. Small blue arrows on the sides of the blue rectangle indicate the dimension in which the vector field will shrink to exactly transform the display window size to the blue rectangle size. After the rescaling, the blue rectangle remains in the display window briefly, surrounding the same region of the vector field, now centered in the display window, and at the new scale.

mmDisp remembers the previous display scale. To revert to the previous scale, the user may hit the ESC key. This is a limited ``Undo'' feature.

The menu selection Options |Configure... brings up a dialog box through which the user may control many features of the vector field display. Vectors in the vector field may be displayed as arrows, pixels, or both. The Arrow and Pixel buttons in the Plot type column on the left of the dialog box enable each type of display.

Both arrows and pixels may be colored to indicate some quantity. Columns 2-4 in the Configure dialog box control the use of color. Colormaps are labeled by three colors, those which are used to display one extreme value, the middle value, and the other extreme value of a range in which the quantity represented by color takes its value. The #of Colors controls the number of levels to which mmDisp quantizes the displayed quantity when representing it with color, controlling how much use mmDisp makes of potentially limited color resources. The Color Quantity selects which scalar quantity the color of the arrow or pixel represents. The x, y, or z components of the vector may be selected. On regularly gridded data the vector field divergence is also available for display.

When there are many vectors in a vector field, a display of all of them can be more confusing than helpful. The Subsample Rate column allows the user to request that only a sampling of vectors from the vector field be displayed. The Subsample Rate value is roughly the number of vectors along one dimension of the vector field which map to a single displayed vector (arrow or pixel). Each vector displayed is an actual vector in the vector field--the selection of vectors for display is a sampling process, not an averaging or interpolation process. The subsample rates for arrows and pixels may be set independently. A subsample rate of 0 is interpreted specially to display all data. (This is typically much quicker than subsampling at a small rate, e.g., 0.1.)

An arrow or pixel which represents a vector is by default displayed at a size which covers the portion of the vector field which that displayed vector is intended to represent, given the current subsample rate. Following this default, arrows do not significantly overlap each other, yet all portions of the vector field which are magnetically active have a representation in the display. The Magnification column allows the user to modify the size of the displayed arrows or pixels (independently). A Magnification of 1 is the default size. By changing to a larger or smaller Magnification value, the user may request arrows or pixels larger or smaller than the default size.

Lower in the Option |Configure... dialog box, the user may also select whether or not a rectangle representing the boundary of the vector field is displayed, what margin (in pixels) should be maintained around the vector field, and what background color the display window should use.

None of the changes made by the user in the Options |Configure... dialog box affect the display window until either the Apply or OK button is selected. If the OK button is selected, the dialog box is dismissed. The Cancel button dismisses the dialog.

The other item under the Options menu is a checkbutton which toggles the display of a control bar. The control bar offers alternative interfaces to some of the operations available from the Options |Configure... dialog box and the View menu. To the left of the control bar is a display of coordinate axes. These axes rotate along with the vector field in the display window to identify the coordinate system of the display, and are color coded to agree with the pixel (if active) or arrow coloring. A click of the left mouse button on the coordinate axes causes a counter-clockwise rotation. A click of the right mouse button on the coordinate axes causes a clockwise rotation.

To the right of the coordinate axes, are two rows of controls. The top row allows the user to control the subsample rate and magnification of the arrow display. The subsample rate may be modified either by direct entry of a new rate, or by manipulation of the slider.

The lower row offers an alternative means to control the rescaling of the vector field in the display. The Zoom value roughly corresponds to the number of pixels per vector in the vector field. This value may be entered directly, or modified by manipulation of the slider. This alternative interface provides a more precise control over the rescaling of the vector field display than mouse operations provide.

Several keyboard shortcuts are available as alternatives to menu- or mouse-based operations. The effect of a key combination depends on which subwindow of mmDisp is active. The TAB key may be used to change the active subwindow. The SHIFT-TAB key combination also changes the active subwindow, in reverse order.

When the active subwindow is the display window, the following key combinations are active:

When the active subwindow is the control bar's coordinate axes display, the following key combinations are active:

When the active subwindow is any of the control bar's value entry windows - arrow subsample, magnification, or zoom, the following key combinations are active:

When the active subwindow is wither of the control bar's sliders - arrow subsample or zoom, the following key combinations are active:

Of course the usual keyboard access to the menu items is also available.

The menu selection File |Clear clears the display window. The menu selection File |Exit terminates the mmDisp application. The menu Help provides the usual help facilities.


OOMMF Home next up previous Contents

OOMMF Documentation Team
October 2, 1998