Installation and running of TOF_VIS is explained in the UNIX or VMS installation instructions. Once the program is running, the first task is to load the data into the program. The use of most of the features of TOF_VIS should be apparent once the program is up and running. However, there are a few subtleties that should be pointed out to allow full use of TOF_VIS.
The image display of the entire collection of spectra and the graphical displays of the spectra and vertical cut data are all done using special "widgets". The user can easily zoom in on any of these regions as follows:
| B. Axis Types | ![]() |
![]() |
The image display of the collection of spectra can be arranged in several different ways. The current X-Axis and Y-Axis types for the image are selected from the VIEW ... IMAGE X AXIS and IMAGE Y AXIS menus on the menu bar.
The rows of the display (Y Axis) may be ordered by "ID" or may be ordered by angle. Since the spectra forming the rows of the image may correspond to many different angles, and there may be large "gaps" in the range of angles corresponding to spectra, it would be necessary to re-sample the data in the angular direction in order for the Y Axis to be a true "angle axis". The current version of TOF_VIS does NOT do this re-sampling, but merely orders the spectra in a list in which the angle increases as the row number increases.
For diffractometers, the columns of the display (X Axis) may be time of flight, energy, wavelength, d or Q. Currently, for spectrometers, the X Axis types supported are only time of flight, or energy (actually delta E).
The X-Axis type of the image is also used as the X-Axis type of the graph of the currently selected spectrum that is shown across the bottom of the display.
For a particular X-Axis type, the mouse may be used to select a column of data from the set of spectra. For example, if the image X Axis type is energy, then the cursor can be used to select a column of constant energy values. The counts at this constant energy value are then plotted along the vertical graph on the left side of the display.
The X-Axis of this vertical graph is always counts. The y-axis may be ID, angle or Q value. In the case of an angle y-axis, the actual angle corresponding to the spectrum is used. In the case of a Q y-axis, the Q value corresponding to that time and angle is calculated and used as the y coordinate.
It should be noted that not all combinations of axis types are meaningful. Specifically, if the image X-Axis is d or Q and the vertical graph Y-Axis is Q, then the vertical graph will theoretically collapse to zero height at one constant Q value. In fact, due to rounding errors, the graph will have a height that is only very nearly zero.
The data that is displayed on the image is rebinned in the X direction. The number of bins used is controlled by the widget labeled "<axis-type> Bins". If the number of bins used is set to zero, the number of bins actually used is the width of the image area in pixels at the time the image is generated. This setting provides the best image quality without artifacts due to aliasing. If the image region is resized, the image is not automatically recalculated, but may be recalculated at the new resolution by clicking on the "<axis-type> Range" control and pressing the <ENTER> key.
The horizontal graph at the bottom of the display may show the same rebinned spectra as used for the display, or may show the raw data with the x-coordinate merely transformed ("re-mapped") to the new x-axis units.
Raw/rebinned data is selected from the VIEW ... HOR. GRAPH DATA drop down menu from the menu bar.
Several display parameters are controlled by pop-up valuators: <axis-type> Bins -- Controls the horizontal resolution of the image and binned data display in the horizontal graph. If the value is set to zero, the current width of the image in pixels is used.
To change the value of one of these valuators, click the left mouse button on the valuator to pop up a slider control. The slider can be controlled by dragging with the left mouse button, or if is clicked on, the left/right arrow keys on the keyboard can be used to adjust the value one unit at a time.
Two slightly different conventions are used on these four valuators. For the last three quantities, H.Graph(%Max), V.Graph(%Max) and Brightness, the calculations needed can be be done quickly enough that they are carried out immediately when the slider is moved. The new value can be entered and if it is "acceptable" and no more changes are needed, the <DONE> button can be pressed. In order to return to an earlier setting that was "accepted", the <CANCEL> button can be pressed. In order to record the current setting as "accepted" but continue to make changes, the <OK> button can be pressed.
The recalculation of the entire image when the number of bins is changed is more time consuming ( several seconds or more depending on the amount of data and machine speed ) and is not performed until the user selects <OK> or <DONE>. It is intended that the user first adjust the value to the desired value using the mouse and arrow keys and then trigger the calculation using the <OK> or <DONE> buttons.
| E. X Axis Range | ![]() |
The range of X Axis values over which the data is rebinned is set by the text field widget, "<axis-type> Range [nnn,nnn]", at the top right hand side of the display. Beginning and ending values of the interval may be changed by the user by clicking on the widget and then using the keyboard to change to the desired range. If an invalid range ( i.e. xmin >= xmax ) is entered, it will not be accepted.
Six different color scales may be selected by clicking on the button to the right of the color bar on the right hand side of the display. The six color scales are:
| "Heated Object" | dark red .. orange .. white | ![]() |
| "Heated Object 2" | black .. red .. yellow .. white | ![]() |
| "Gray Scale" | black .. white | ![]() |
| "Negative Gray Scale" | white .. black | ![]() |
| "Green-Yellow" | dark green .. bright yellow | ![]() |
| "Rainbow" | black .. blue .. green .. yellow .. red | ![]() |
The "horizontal" graph that displays the currently selected spectrum can save and display up to 10 spectra simultaneously for easy comparison. Basic control of the list of displayed spectra is available on the EDIT menu. Specifically, the option "HOR. GRAPH <Save Current>" adds the currently selected spectrum to the graph. As the cross-hairs are moved over the IMAGE region, the currently selected spectrum will be displayed and updated in addition to any other spectra that have been saved. The last spectrum saved can be deleted using the option "HOR. GRAPH <Unsave Last>" and the list of saved spectra can be cleared using the option "HOR. GRAPH <Clear Saved List>".
The user can mark certain spectra to be masked off using the menu item "IMAGE <Toggle Spectrum On/Off>" in the EDIT menu. This will blank out the currently selected spectrum. As many spectra as desired can be masked off and the list of spectra that are masked off can be saved to or loaded from a file using an option on the FILE menu.
Hard copy output is based on the freely available plotting package, PGPLOT. PGPLOT is available via FTP from astro.caltech.edu (131.215.240.1). Any of the three views of the data may be printed to a postscript file or directly to a postscript capable printer. When a view is printed, appropriate labeled axes, color scales and legends are added.
Printing is selected using a dialog box started from the FILE .. PRINT option on the menu bar. The dialog box allows the user to select
The name of the postscript printer and be set in three ways. First, if the environmental variable TOF_VIS_PS_PRINTER is set, the value that it is set to will be entered in the PS Printer name field when TOF_VIS is started. Second the user can enter the name of the printer to use in a text field widget. Third, a list of printers on the system can be obtained by clicking on the down arrow to the right of the printer name widget. A printer can be selected from this list using the mouse.