925-456-1020 info@acornnmr.com





This section describes the deconvolution subroutine. A summary of subcommands is given below. See example of how to use LF.

Deconvolution, or line fitting, is a subroutine which adjusts parameters of a set of lines to fit peaks in a real spectrum. The parameters adjusted for each input peak are frequency, height, width at half height, and ratio of Lorentzian/Gaussian lineshape (expressed as percent Lorentzian). The user enters a set of initial peaks which will be varied in a Simplex optimization to find the best fit. Note that in more complex cases involving overlapping lines, this process may require an iterative approach with user input along the way. See example of how to use LF.

The subcommands described below are single-letter commands which are executed immediately. All subcommands can be accessed via the menus, except those which require the mouse, and most can alternatively be executed from the command line. The menu selections list the single-letter commands for the user’s information.

N.B. Before entering the LF subroutine, it is recommended to perform a Baseline Flatten (BF) operation on the displayed region of the spectrum, to be sure that the baseline in the region being fit is flat; otherwise, the fit will not be very good.

To begin, use Zoom to expand the spectrum so that only the peaks of interest are displayed, and then exit Zoom. Type LF or select Line Fit from the Tools menu to enter the fitting subroutine. Note that the menu bar has changed to display commands which are active in this subroutine. The first step is to pick a set of peaks as a starting point. Hold down the left mouse button, place the crosshair cursor at the top of one of the peaks and then release the mouse button. A red Lorentzian line will appear superimposed on the spectrum. To adjust its width, place the cursor at the peak’s half height at the desired width of the line and click the right mouse button. To view the parameters for this line, type I, which brings up a dialog box containing all the information about the line. Any parameters except the absolute intensity and area can be adjusted, and the changes applied by clicking the Apply button. The areas are more easily compared by setting Relative Area of a chosen peak to a value such as 1. To do this, display the parameters for the chosen peak, then using the cursor, wipe across the box labeled Relative Area and type in a new value. All peaks will now have values expressed relative to this value. Close the dialog box to return to the spectrum.

To perform a Simplex fit to this line, type O (for Optimize). The red line will display the result of the fit. The new parameters can be viewed using the dialog box or they can be placed into the Windows clipboard by typing T. The parameters can then be pasted into the Windows or any other word processing program or text editor for editing, or can be displayed on the screen by typing Ctrl-B. Note that, to display the most recent parameters, not only must they be placed into the clipboard with T, but the screen display must be updated. This happens whenever some operation is performed which causes the screen to be re-drawn, but an update can be forced by typing Ctrl-B twice.

More lines can be added in the same manner as the first. Note that the current line is in red and all others are in green. A quicker way to enter the starting lines is to let the software find the peak maximum. Instead of placing the crosshair cursor on the peak maximum, place it directly below the peak, below the axis, and release the mouse button. NUTS find the peak maximum and positions the line at that frequency, provided the cursor is placed within +/- 2 data points of the position of the peak maximum. A still simpler method is to let the peakpicking function of NUTS find the peak positions and heights. Typing P performs peakpicking in the same manner as the PP command used at the base level of NUTS, and displays Lorentzian lines at the position of each peak. If not all peaks are selected, the user can adjust the parameters for minimum height (MH) and RMS noise factor (RM) by typing M, which brings up a dialog box for adjusting these 2 parameters. Lines can also be added or deleted manually.

As lines are entered, they are placed into a list. To move to the next line in the list, type F (for Forward) and to move to the previous line, type B (for Back). The easiest way to keep track of which line is which is to start with the peak farthest to the left and enter them in order from left to right. At any time, the peaks can be reordered from largest to smallest chemical shift by selecting Reorder form the Edit menu or by typing R. The current line (in red) can be deleted by typing D. Note that if the third line out of a list of 5, for example, is deleted and then a new line added in its place, the new line will be fifth and last in the list, until the list is Reordered. When the parameter dialog box is opened (with I), the parameters displayed correspond to the current line, shown in red. The parameters for any other line can be displayed by entering its line number or by clicking the Previous or Next buttons.

Starting with NUTS versions dated May, 2000, it is possible to "freeze" chosen parameters so they are not adjusted during the fit process.  While the parameter dialog box is displayed (with command I), there is a check box labeled "Iterate" next to each of the 4 parameters.  Removing the check mark will prevent the corresponding parameter from being adjusted during the fit.

Once all lines have been initialized and adjusted to some reasonable starting parameters, typing A initiates the Simplex fit on all lines. This can take a minute or more if the fit consists of several lines, as the dimensionality of the problem is large (4 times the number of lines). To fit a group of overlapping peaks, it works best if the starting point is as close as possible. Try optimizing each line individually (with O) before starting the complete fitting routine (A). The Simplex routine has been implemented to perform a fairly quick fit so that the user gets an indication of the progress. After one iteration, adjustments can be made to individual lines as needed and then the optimization performed again. Since the starting point for the second iteration is closer, the result will be better. During the optimization, NUTS displays a decreasing Error value as each Simplex loop is completed to allow the user to monitor how the optimization is proceeding.

There are several choices for viewing the calculated spectrum and comparing it to the real spectrum. Typing S displays the sum of the lines, which should overlay the real spectrum. Typing the plus sign displays both the sum and the individual lines. Typing L displays the individual lines. Typing the period key toggles the display of individual lines between a solid and a dotted line. Typing the minus sign displays the difference between the real and calculated spectra. To perform the fit to the real spectrum, the LF routine first digitizes the theoretical line to match the real peak point-for-point. The digitized calculated spectrum can be viewed by typing C.

Exiting the line fitting subroutine (with Enter) does not delete the calculated lines. Therefore, LF can be exited and changes made to the frequency limits and then LF re-entered. The calculated lines will be adjusted to reflect the new display. Note that this could result in the fit operating on peaks which are no
t displayed.

NUTS provides the option of saving the calculated spectrum and/or the list of parameters which define the calculated peaks (position, height and width for each line). Once a calculated spectrum has been saved, it can be opened and manipulated exactly as any real spectrum. A previously saved list of parameters can be opened and the resulting calculated spectrum will be displayed. This allows the user to save a "template" for repeated use on a series of spectra. These options are available under the File menu.

New macro commands were added to set the file names for these operations: 

SET LF_GET_FILENAME = xxxxxxx.yyy 

SET LF_WRITE_FILENAME = xxxxxxx.yyy 

Another set of Macro Commands were added to increment any filename extensions for these file names (xxx.001 to xxx.002): 





A — simplex fit to All lines
B — move Back to previous line
C — display digitized line Calculated from current Lorentzian (displayed in grey)
D — Delete current line
F — move Forward to next line
I — display parameter Information dialog box
G — Get (open) a lines information text file
L — display individual Lines
M — display Minimum height dialog box for peakpicking
O — Optimize fit to current line
P — Pick peaks for starting point
R — Reorder peaks from low to high field. Remember to type T again to copy the new list to the clipboard.
S — display Sum of individual lines; this toggles between the sum and the individual lines
T — Type parameter list into the Windows clipboard
W — Write a lines information text file
Z — Zero all lines
.(period key) — Toggle display of individual lines between dotted and solid line.
+(Plus sign) — Display both individual lines and sum of lines
(Minus sign) — Display difference between real and calculated spectra (displayed in grey)
% — Set default percent Lorentzian lineshape (default is 1, or 100% Lorentzian).
ENTER — exit LF subroutine

Main Help page

Command Index


Last updated: 9/17/00.