Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents
Next: Saving/Restoring State Up: NOTE 236 - DISH: User's Manual Previous: Getting Data Into Dish

Subsections


The Dish Graphical User Interface

In DISH, wherever practical, what you see is what you are operating on. So, for example, when you press the ``Apply'' button in the ``Baselines'' graphical user interface (GUI) frame of DISH, a baseline will be fit to whatever is currently plotted in the DISH plotter. Results appear in the results manager and, when appropriate, are immediately displayed on the plotter. Results can be moved between the results manager, the calculator, and the browser through the use of a menu which appears when the user presses the right mouse button in one of these frames. This default behavior can be changed so that selections from the Results Manager will be operated upon. This change is necessary to perform functions on SDIterators (see Bulk Processing).

The current state of DISH (the contents of the results manager, the settings of all of the operations, the contents of the calculator, and any active browsers) can be saved at any time either to the default state file or to a location of the user's choosing. DISH can be restored to a previously saved state. By default, DISH saves its state upon exit from glish and restores itself to that same state when DISH is started in a new Glish session.

The following sections detail the major graphical components of DISH.

Results Manager

The Results Manager is the heart of DISH. All results which DISH creates in response to user actions are stored in the results manager and listed in the Results window. These results are all available at the Glish command line as glish variables of the same name for the user to interact with. DISH immediately plots the currently selected result if it can be plotted. A description is associated with each result. The user can change the description or the name of the result if they choose to do so. Certain results can also be browsed. Since each result is also a glish variable of the same name, new names are limited to be a valid glish variable name.

Results can be copied to and from the clipboard or to the calculator. This Copy/Paste facility is activated by pressing the right mouse button when the mouse pointer is over the Results window. A popup menu appears with the three possible options. The current selection is copied to the chosen destination when a copy option is selected. The contents of the clipboard are pasted into the results manager when that option is selected.

Working sets, SDRECORDs, and everything else

Results are either working sets (also known as sditerators), SDRECORD, and anything else.

A working set is a collection of SDRECORDs. Specifically, it is an sditerator tool. When you open a data set through the File menu (either a new one or an existing one) the result is a working set which will be shown in the results manager. The other way to create a working set is to use the ``Apply'' button in the ``Selection'' operation. When you make a selection this way the result is also a working set. It does not make a copy of the selected data, rather it makes a reference to the selected data in the underlying data. This means that if you change the underlying data, the reference in the selected data is also changed. Working sets can be browsed. See the Reference Manual for more information on the Sditerator tool.

An SDRECORD is a Glish record which has the structure described in Appendix A. It is data (generally spectra at this point in DISH development) plus some standard header values, any non-standard header values, and a history of what has been done to that particular SDRECORD. SDRECORDs can be browsed and plotted.

Anything may appear in the results manager. If it isn't a working set or an SDRECORD it can not be browsed or plotted.

Menubar and Message Line

New data files are created, existing data files are opened, the state of DISH is saved, a previously saved state is restored, and DISH is reset to its default initial state through the File menu. The GUI panels for each available operation are enabled and dismissed through the Operations menu. The Options menu has two options which can be turned on or off. The ``Write to Script'' option, when turned on, causes DISH to echo the underlying glish commands to the AIPS++ defaultscripter (ds) tool when a GUI operation occurs in DISH. This can be a way to learn more about what DISH is doing behind the scenes and write glish scripts to do operations not yet available in DISH. When the ``Save when done'' option is turned on, the state of DISH is saved to the current state file when the ``done'' function is invoked (e.g. dish.done()). The ``done'' function is always invoked whenever you exit glish. Because DISH can not be restarted after ``done'' has been called it is best not to do that unless you are about to exit glish. This deficiency will be corrected in the next release.

The Message Line is the text immediately below the Results Manager. These messages are also echoed to the AIPS++ logger for longer term storage.

Browsing

A working set within the results manager can be 'browsed' or examined by hitting the 'Browse' button. This brings up a frame which lists all of the scan numbers and objects, record by record, within the working set. Each SDRECORD can also be browsed to examine all of the contents (e.g., all of the header information and data).

When browsing a working set, individual records can be copied to the clipboard or to the results manager. This copy facility is activated by pressing the right mouse button when the mouse pointer is over the browser window. A popup menu appears with the three possible options. The current selection is copied to the chosen destination when one of the copy options is selected.

Inspecting

Inspecting is another way of viewing the values of the results within the results manager. It lists all of the contents of the selected result. These may be accessed via the Glish command line by the names shown while inspecting.

Operations

Currently there are eleven operations pre-defined within Dish. These operations are general utilities available from the basic Dish Gui. All operations have two basic buttons: a green Apply button which will execute the given operation and a yellow Dismiss button which will close the operation frame but retain all information in that frame for subsequent use.

Averaging

The Averaging operation offers several options for performing the averaging (Figure 1). Alignment which may be either None, By Velocity, or By X-Axis, 2) Rest Frequency, which allows shifting to match the first in the average (for example, for averaging spectra from transients), 3) Weighting which may be None, Tsys and Time or by RMS, and 4) which will use any selections chosen from the Selection Operation prior to averaging.

Figure 1: Example window showing basic Dish frame with the Averaging and Selection Operation frames open.

Baselines

Figure 2: Example window showing basic Dish frame with the Baseline Operation frame open. In this example, one baseline region is selected and a 5th order polynomial will be shown overlayed on top of the spectrum.

The Baseline operation allows either a polynomial fit or a sinusoid fit. The baseline regions may be typed into the regions entry box at the bottom of the frame, or selected via cursor (the Plot Ranges and Cursor Active buttons should both be checked). The baseline operation frame can be seen in Figure 2.

The default action is to calculate the baseline and show it. Once the fit seems satisfactory, the 'Subtract' button must be checked and the fit 'Apply'd. This will remove the baseline and display the resultant spectrum. The baseline fit may be viewed from the results manager. The current ranges selected will be displayed in the entry field. A history of these is preserved within a cache which can be viewed by clicking on the down-arrow button. The RMS of the fit is displayed to the right of the frame. Units for ranges or fit parameters (sinusoid only) may be converted between channels and X-Axis units using the Convert button.

Calculator

The Calculator operation is a general tool for manipulating spectra in ways not facilitated by the basic set of operations. Spectra may be transferred into the calculator stack through the use of the Copy/Paste to Clipboard facility.

Figure 3: Example window showing basic Dish frame with the Calculator Operation frame open

The Copy/Paste facility is activated by the right mouse button. A popup menu appears with a two copy options and a paste option. ``Copy to clibpoard'' will copy whatever is selected in the Calculator stack listbox to the Clipboard; the Clipboard is simply a convenient virtual storage area. ``Copy to results manager'' copy whatever is selected in the Calculator stack listbox to the results manager. ``Paste from clipboard'' retrieves whatever was most recently sent to the clipboard. For example, in Figure 3, the Results Manager spectrum ``average3'' was copied into the Calculator stack. An ``_1'' designation was added to the label to distinguish it from the same value in the Results Manager. The spectrum was then multiplied by a factor, producing ``average3_1_2''. The additional id tag is an underscore and the stack number.

The available functions may be seen in the figure. In addition, it works as any standard Reverse Polish Notation calculator. Numbers, vectors and arrays may be typed into the entry field. The calculator will only work with SDRECORDs, numbers, vectors and arrays.

Function on Data

The Function on Data operation is another means of manipulating the displayed data. The string typed in the entry box of this operation is evaluated by glish after any of the standard macros are replaced by their equivalent glish. The result of this evaluation is then reassigned to the data array of the last viewed SDRECORD. The standard macros and their meanings are:

DATA
sdrecname.data, the data record of sdrecname.
DESC
sdrecname.data.desc, the data description record of sdrecname.
ARR
sdrecname.data.arr, the data array.
HEADER
sdrecname.header, the header record.
NS_HEADER
sdrecname.ns_header, the ns_header record.
In the above definitions, sdrecname is whatever the name of the last viewed data set. For these macro substitutions to work, they must be given as upper case (to distinguish them from their lower case equivalents, in which no substitution would occur).

Since whatever this text evaluates to after macro substituion is reassigned to the data array, it must have the exact same shape as the data array initial had.

Basic scaling or manipulations can be obtained by typing expressions that operate on ARR. For example, a simple scaling can be obtained by typing the function ``ARR*1.5'', and then pressing ``Apply''. Any function available from within Glish or known at the command line (e.g. a function defined by the user during the run of Dish), can be accessed and used in these expressions.

GaussFit

The GaussFit operation allows fitting of single-multiple gaussians to a spectrum. The number of gaussians is entered initially which then creates corresonding buttons for entering or examining gaussian fit information (height, center, width and whether these values should be fixed for the fit). From the GUI, one can "guess" the values of a gaussian (only works for a single component) or set the values with the right mouse button cursor.

Figure 4: Example window showing basic Dish frame with the GaussFit Operation frame open

Re-gridding

The Re-gridding operation is a more generalized version of the Smoothing Operation as it allows both finer and coarser adjustments of the grids. Currently, it allows Hanning, Boxcar and Gaussian smoothing along with Spline and Fourier Transform Interpolations.

Figure 5: Example window showing basic Dish frame with the Regrid Operation frame open

Saving

The Saving operation allows the user to store and organize spectra into named working sets. The working set must first be defined through the File Menu option ``Open'' (selecting on Read and Write). Once the working set is defined, any displayed spectrum may be written to the working set on disk.

Selection

The Selection operation allows a number of selection criteria to be chosen to create new working sets which are subsets of existing working sets. The recognized terms are: Object Name, Record, Scan, Date, LST, and Rest Frequency. Typing into any of the entry fields is allowed but the selection will only be used if the check box on the right is marked. A history of selected ranges or names will be preserved. For numerical selections, ranges may be made as follows:

Record,Scan Entry:
8,9,10				# Select scans 8, 9 and 10
8,[10:13],17			# Select scans 8, 10, 11, 12, 13, and 17

The 'All' button will select all relevant values for the given selection criteria.

NOTE: Selection on MSv2 is limited to just row-based selection for AIPS++ V1.4.

Smoothing

The Smoothing operation is a more specific tool than the Re-gridding operation. It offers easy Hanning, Boxcar and Gaussian smoothing.

Figure 6: Example window showing basic Dish frame with the Smoothing Operation frame open

Statistics

The Statistics operation calculates basic statistics on an interval of the spectrum. The interval must be defined by the cursor (activate the Plot Range and Cursor Active buttons) and then left click on the left and right regions of the spectrum which are of interest. The region will appear in the Range entry field and the Start and Stop fields will be populated by the beginning and end of the range; NOTE: currently, only the first range in the rangebox will be used for the calculation of statistics. If you want changes to the start and stop range for your interval, those changes should be edited or entered at the start/stop entries. The units may be converted between X-Axis units and channels through the convert button (similar to the Baseline operation capability). The Apply button will calculate the Peak value, the location of the peak, the Area over the region, the location of the centroid (half area), the rms, and the minimum. These values may be written as a record to the clipboard through the ``Copy to CB'' button. The record looks as follows:

- statrec:=dcb.paste()
- statrec
[peak=2.09596825, area=29425582.1, min=-0.26479581, rms=0.580018938, scan=20, ce
ntroid=2.22369707e+10, vpeak=2.22353317e+10] 
-

In addition, the data may be written to a file through the ``Print to File'' button. This pulls up a frame which prompts the user for a filename. If the file exists, it will append the values to the end of the file. The file looks as follows:

  scan  start          stop           atPeak         Centroid 
    20  2.2225160e+10  2.2245390e+10  2.2235332e+10  2.2236971e+10 
        Peak           Area           Mininum        rms 
        2.0959682e+00  2.9425582e+07 -2.6479581e-01  5.8001894e-01

Figure 7: Example window showing basic Dish frame with the interval Statistics Operation frame open

Write to File

This operation allows convenient output to a disk file in the current directory. It automatically defaults to the file name of ``scan_number.spc''; for example if you Write to File while looking at scan 20, the file will be "20.spc". The file looks as follows:

     FREQ              other axis 
       Hz              other unit 
22203023360.000000    -3.907563 
22203086216.617188    -4.986684 
22203149073.234375    -4.020397 
22203211929.851562    -4.558375 
22203274786.468750    -4.556173 
22203337643.085938    -3.856671 
22203400499.703125    -4.001695 
22203463356.320312    -3.464213 
22203526212.937500    -4.438780 
22203589069.554688    -3.296077 
...etc.


next up previous contents
Next: Saving/Restoring State Up: NOTE 236 - DISH: User's Manual Previous: Getting Data Into Dish   Contents
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15