Creating and Using Spectral Display Windows

Table of Contents

Adding Spectral Display Windows
Using the Graphical Interface
Using Tcl Commands
Using Spectral Windows
Display Modes
The Spectrum Icon Bar
Cursors
Crosshair Correlation
Keypad Navigation
Spectral Attributes Dialog
The File Panel
The View Panel
The Graph Panel
The Plot Panel
The PeakPick Panel
The Peak Display Panel
The Peak Attributes Panel
The Analysis Panel
Spectral Display Menu
Managing Spectral Display Windows
Spectrum Synchronization
Preserving the Spectral Window State between Sessions

Spectral display windows are the windows in which graphical plots of spectra can be displayed. NMRView has few limits on the user's ability to visualize NMR spectra. As with the number of datasets one can open, there are no arbitrary limits on the number of spectral display windows that can be open at once. Likewise they can be displayed with arbitrary locations and sizes on the desktop. Large numbers of windows in arbitrary locations can sometimes be more confusing than useful so NMRView also provides a variety of ways to group related windows. While only one- and two-dimensional displays of spectra are possible, the choice of which dataset dimensions correspond to which display axes is up to the user. Different views, including variations on such parameters as dataset dimensions; plot regions; and contour levels of the same spectrum, can be displayed simultaneously in different display windows. A hallmark of NMRView is the fact that no matter how the spectra are displayed in different windows the positions of the cross hairs in each window are correlated with the positions in every other window in an automatic and intuitive way.

Adding Spectral Display Windows

The simplest way to get a spectrum displayed is to use Datasets Open and Draw Dataset from the Control Panel. In many cases, however, one wants more control over how spectral windows are named, configured and arranged. For example, sometimes one wants to pack spectrum widgets inside of other windows, or create a matrix of spectra all packed together. Accordingly, spectral display windows can also be created either through the pop-up panels in the NMRViewJ GUI or through Tcl commands. The latter method allows for the creation of very complex arrangements of spectra in a way that can be used to facilitate a complex analysis method.

Using the Graphical Interface

To create a new spectral window using the NMRViewJ GUI choose Windows Add from the Control Panel menu bar. The following panel will appear.

Create

Click on this to create a new spectral window with the name specified in the text field of this panel. A new window will be created and the dialog will close. If the name specified is already in use by another spectral window a new spectral window will be added within the toplevel frame occupied by the existing window. The new window will be added to the right of the existing windows, and all the windows will adjust their sizes so that they equally divide the toplevel window. This only works, however, if the previous windows in that toplevel were created with the Rowand Columnentries set to 1.

Close

Click on this entry to close the panel without opening a new window.

A grid of windows can be created within a single toplevel window by setting the Rows and Columns entries to values greater than 1. For example, to create 6 windows laid out in two rows and three columns set Rows to 2 and Columns to 3. All the windows will appear in a single toplevel window.

Figure 6.1. Windows laid out in a 2x3 matrix


Using Tcl Commands

The most flexible method for creating spectral windows is to use Tcl scripting commands, but it is certainly not necessary to understand how to create windows in this way to make extensive use of NMRViewJ. So beginners, are likely to want to skip this section.

The most convenient scripting method is to use the NMRViewJ procedure NvMkSpectrum. This command takes one or two arguments. The first argument is the name of the window to be created. Thus, a window containing a spectrum widget can be created by simply typing NvMkSpectrum noesy. If one intends to subsequently pack additional spectrum widgets into the same toplevel window, the second argument should be specified to indicate the packing direction. If windows are to be added horizontally, the direction should be left or right, to pack windows against the left or right sides of the toplevel window. If windows are to be added vertically, the direction should be top or bottom, to pack windows against the top or bottom of the toplevel window. A powerful alternative, is to create an array of windows automatically. In this case, the second argument specifies the number of rows and columns of windows to be created. Thus, NvMkSpectrum hmqc 2x4 would create a toplevel window with 2 rows, each containing 4 spectrum widgets. For example, NvMkSpectrum noesy, or NvMkSpectrum noesy left will create a new toplevel window named .noesy and will pack a spectrum widget, named .noesy.0 in it against the left side. NvMkSpectrum cosy top will create a new toplevel window named .cosy and pack a spectrum widget , named .cosy.0 against the top side.

The lowest level command available to the user for creating a spectrum widget is the spectrum command which simply creates a new spectrum widget. If the "spectrum" command is used it is the users responsibility to decide what toplevel widget the window is to be displayed in and to explicitly use a Tk geometry manager such as the "pack" command to cause it to be displayed. To create a toplevel window with three spectra in it from left to right, the following commands would be used.

                        toplevel .noesy 
                        spectrum .noesy.0
                        spectrum .noesy.1
                        spectrum .noesy.2
                        pack .noesy.0 noesy.1 noesy.2 -side left.
          

While this latter method is the most complicated, it also is the most flexible. Spectrum widgets can be packed into toplevel windows along with all sorts of other widgets such as buttons, lists, menus, text or canvases, to create very powerful interfaces.