7.2. Using the Spectra page

Let's look at the controls on the Spectra tab. These controls are divided into several sections. First let's look at the entire page. Each of the subsequent sections will zoom in on the functionality of a section of the user interface.

Figure 7-18. The Spectra tab.

The bottom part of the user interface provides a filterable list of the spectra currently defined:

Figure 7-19. The spectrum list

The headings of the list box make the list fairly self explanatory. There are, however several things you can do to control what you see:

Figure 7-20. Spectrum definition and configuration

In the figure above, items not related to spectrum definition and manipulation have been smudged out. We will look at those controls later.

Using this section of the user interface you can:

Creating a new spectrum. Briefly to create a new spectrum you select the type of spectrum from the spectrum type box, Fill in the spectrum definition (name and parameters) and click the Create/Replace button. You can also specify a data type by checking something other than Long (32 bits) but with modern computers there's seldom any reason to use smaller data types.

Parameters are selected using the Parameter pulldown menubuttons (the second one will be enabled if the spectrum type, e.g. 2D, requries) the parameter tree is presented as a menu/submenu tree. If any menu is too long scroll buttons are provided as well to allow you to scroll the visible set of menu items.

If a selected parameter is a tree parameter, it will have recommended limits and binning. If not, or if you want to change these values, type them in.

Once the spetrum definition has been filled in, click Create/Replace to create the new spectrum. The new spectrum is, if it matches the filter, added to the spectrum list without the need for an Update

As we'll see the Array checkbutton allows you to create several spectra simultaneously.

Replacing an existing spectrum. Replacing an existing spectrum is identical to creating a new one except that the spectrum name is the name of a previously existing spectrum. You can also double click an existing spectrum in spectrum list and change its definition, since double clicking a spectrum loads its spectrum definition.

Prior to replacing existing spectra you'll have a chance to confirm this operation.

Deleting a spectrum. To delete a spectrum, Double click it to load it into the spectrum definition. Click the Delete button. Warning - you are not prompted to confirm this destructive operation.

Duplicating a spectrum. You can duplicate a spectrum by loading its definition (Double click the spectrum in the spectrum list). Once you've loaded the spectrum you want to duplicate, click Duplicate. The new spectrum will be given a name like the old spectrum name followed by _ and a unique number.

The very useful Array checkbutton. Many experiments have detector systems that have several nearly identical channels. These channels can be represented naturally as tree parameter arrays. The array checkbutton allows you to create a set of spectra (1D) from a tree parameter array.

Simply enter a base name for the spectrum and choose one of the array elements as the parameter. Be sure the Array checkbutton is selected. When you click Create/Replace, one spetrum will be made for each element of the array. The name of each spectrum will be the basename followed by a . followed by the parameter index.

The Clear button. The Clear button clears the channels of the spectrum that is loaded. You can clear a single spectrum by double clicking it in the spectrum list and the clicking Clear.

The very innocuous looking but dangerous all checkbutton. The All button extends the scope of several operations to all currently defined spectra. This can be very useful or very dangerous depending on the operation performed:


All spectra are cleared.


Very dangerous!! All spectra are deleted.


All spectra are duplicated.

Let's now look at the section of the Spectra tab below:

Figure 7-21. Load/Save section of Spectra tab.

This bit of the GUI allows you to save and restore the current analysis definitions/settings.

The Save button saves the current settings to file. It operates like the FileSave... menu command if you checked all categories. Therefore the button only prompts for a file to which the settings will be written.

Similarly the Load button prompts for a file to load (like the FileLoad... menu command). If the Cumulative checkbutton is checked, previous definitions are not deleted prior to reading the file.

The Failsafe checkbutton controls the writing of a failsafe.tcl file. If checked, the GUI saves the current definitions after each modification to the analysis definitions.

Finally let's look at the section of the page that controls the application of gates:

Figure 7-22. Spectra gate applications

The dropdown menubutton (Gate) allows you to select a gate. The name of the gate is loaded into the text entry box. The Apply applies the gate to the currently selected spectrum. The Ungate removes that application (applies a True gate to the spectrum). Note that both Apply and Ungate are modified by the state of the All check button.