Procedures Automatic Fitting <Prev Next>

Automatic Fitting of an N2O IR Spectrum with Additional Diagnostic Tools

This walk through shows how to use additional diagnostic tools, specifically the nearest lines window and intensities to aid the automatic assignment process on the N2O described in the previous section. These additional diagnostic tools are not essential for N2O, but are very helpful in more complicated cases.

A. Setting up the automatic fit

  1. For the purposes of this walk through the overlay (N2Onu2.ovr) and line list (N2Onu2lin.ovr) from the previous example can be used.
  2. As previously, an approximate simulation is required. The same set up as before can be used - "File", "New", "Linear molecule", set the excited state Lambda = Pi, B"= 0.45, B' = 0.451, Origin = 588.7 cm-1.
  3. At this stage a different approach is used to select the trial fit and check transitions. As before the P and R branches are used, but all are added to the working line list:
    1. Open the transitions window, and select the P and R branch lines by setting "Change" to "<>".
    2. Use the Add button to add all these lines to the line window.
    3. For subsequent operations, it is helpful for these to be sorted by J. In the line list window, select "More", "Sort On", "Upper State".
  4. In the line list window, select "More, Advanced" to make the autofit options visible.
  5. The nearest lines window will now give useful results. Bring up this window with "More", "Plot Nearest Lines". At its simplest this window plots, for each line in the line list window, a point for each observed line within the given Y range. If the simulation is perfect, than a clear horizontal line should appear along the centre zero line, together with a typically random set of points either side. In the current case (while the simulation is not that close) the default Y Range is too small - try 1 for this. Possible assignments are indicated by curved line, but we will not make use of them here.
  6. To make use of intensity information, we require peak intensities to be added to the line list as part of the assignment process, as well as positions. To do this, make sure "Set I" is selected in the line list window. This will display another column, Isigma, which works as for the Std Dev column, but for the intensities.
  7. Set up the autofit as follows:
    1. Select a range of J, say J' = 10-15 in the line list window by clicking and dragging.
    2. Mark these as check transitions by right clicking and selecting "Mark as Check". A bold C will appear in the "Std Dev" column, and open triangles will indicate their position in the main plot window.
    3. Select three transitions as trial fit transitions, say the first and last, and one in the middle by click on the individual lines, right clicking and selecting "Mark for Autofit". A bold F will appear in the "Std Dev" column, and filled triangles will indicate their position in the main plot window.
  8. Decide on the controlling parameters for the autofit. There are two key settings:
    1. The acceptance window, which is the maximum error expected for the check transitions after the trial fit. This is set in the box labelled "Accept" in the line list window. For the purposes of this walk-through we will leave this at the default (0.1), though in general a number of the order of the line width  (here 0.001) is more appropriate.
    2. The search window, which controls how far each side of the initial "fit" line positions you want to search. The intent is that the approximate initial simulation should predict the "fit" transitions to be out by no more than this value. For this example 3 cm-1 might be a good value. The search time will increase rapidly as this is increased, so in more complex cases the range may need to be considered carefully. It is set in the autofit window, which is brought up with "Overlays, Autofit...". The Test button in this autofit window will display the number of trials in the box at the top, and display some additional information in the log window.
  9. We are now in a position to try an autofit. The file saved at this stage (before the autofit) is available as N2OautoD1.pgo.

B. Using the automatic fit results

Using the automatic fit results is as in the simplified version - double click on a trial to update the constants, assignments and plots for that trial. Note the following additional points:

As before the best diagnostic is the fit that gives the Q branch in the right place - fit 4 if things are set exactly as above. Fitting with this assignment gives the file saved as N2OautoD2.pgo.

C. Adding More Lines

The nearest lines window comes into its own at this stage, as assignments can be made directly from it, and it is typically easy to see the correct assignments. In the current case the plot looks like this:


To obtain this exact plot "Dim Assigned" has been selected which plots the assigned points in grey. Recall this window plots, for each transition in the line list window, the distance to all observed lines within a particular window, here 0.05 cm-1. It is clear from this plot that most, if not all, of the unassigned lines have a transition within this window, and the obvious assignments to take are the ones that lie on the smooth curves. In this case the density of transitions is such that this is the point closest to zero in each case, though is the density of lines was higher the smooth trend can be easily picked out. The two curves correspond to the P and R branch transitions. Assignments can be from this window as follows:
  1. To assign the low observation numbers, draw a box with the mouse to enclose the observations lying on the horizontal lines to the left, right click, and select "Assign Points Inside":
  2. To assign along the curved lines, click and drag with the mouse so that the diagonal line plotted lies along the line, right click and select "Assign On Diagonal":
    This will assign points close to the line.
  3. Repeat as required; if you make a mistake the various "Clear Point..." actions are available by right clicking, and work in the same way as the residuals window. (The residuals window will be automatically updated, and it is also possible to fix problems there.)
  4. Fit as before, adjusting assignments as required. At this stage the centrifugal distortion constants must be floated. After a couple of cycles of assignment and fitting the nearest lines window must be zoomed in much further (by a factor of 50) to show the quality of the fit:
    This indicates there are no more obvious assignments that can be made. The "Missing" option has been selected here, plots a point (at zero) for each line that has no observation in the selected window. (As you zoom out these will disappear as a transition moves in range.) To investigate consider one or more of the following:
    • Right click on one of them and select "Show and Edit" to centre the main plot on the predicted position
    • Changing the x axis in the nearest lines window to "Frequency".
    In this case either of these will show that missing lines are outside the range of the experimental spectrum.
The intensity window is also giving useful information at this stage. If not already visible bring it up with "View", "Intensity Residuals...", and it should look something like this:

By default, this is a plot of the log of the ratio observed intensity to calculated line strength, i.e. notionally log10(observed population) and plotted against lower state energy should give a linear Boltzmann plot, and here gives additional confirmation that the assignments are plausible. Note that this is choice of plot is independent of the temperature chosen for the simulation. This window has the same tools for adjusting assignments as the main residuals window. A good application is to reject transitions that have much too high an observed intensity (that appear above the trend line) but with correct positions. This implies a weak component of a blend has has been assigned, which should probably not be included in a fit.

The intensity window above is not indicating any problems, so the assignment of the P and R branches is now complete; The file at this stage is saved as N2OautoD3.pgo.

D. Determining additional parameter(s) - the Q branch

We now assign the Q branch lines:
  1. Open the transitions window, and select the Q branch lines by setting "Change" to "Q".
  2. Use the Add button to add all these lines to the line window.
  3. Select (say) the first 10 Q branch lines as check transitions, and one (say Q(4)) as a fit transtion.
  4. In the constants window, float q in the upper state.
  5. Make sure all all the standard deviations are blank (click on the down arrow in the autofit window and select "Clear Parameter Ranges") otherwise they will act as constraints on the search.
  6. A much smaller search window is needed - 0.2 cm-1 should be plenty.
The file set up for the autofit is saved as N2OautoD4.pgo. In this case the top ranked trial is correct, and the same process above allows for rapid assignment of the Q branch lines. The nearest lines window is again invaluable. To show only the Q branch lines in this window (and exclude the already dealt with P and R branch lines) select "Filter". When this option is enabled, any selection set up in the transitions window is also applied to the nearest lines window. The final file, after floating qD is saved as N2OautoD5.pgo.

E. Intensity/Temperature Fitting

In this section, the intensities, rather than the peak positions are fitted, giving a value for temperature.

  1. There is more than one way to show how well the fit is working, but a good starting point is to select "Obs/Calc*Population and Population" for the Y axis of the intensity residuals window.. This will add a line joining the observed values to the calculated values, and it is clear from this that all the calculated values are too high. This is simply a consequence of the measured areas being in arbitrary units and the first step is to apply a scale factor.
  2. IScale in the simulation object can be used for this purpose; it is a scale factor applied to all simulated values. To fit this first fix all the rotational constants - in the constants window click on "Fix" and select "Fix All Parameters..." and then "Mixture". This will set Float to false for everything. Then set Float to true for IScale (click on "Simulation" in the constants window to see it).
  3. For intensity fitting, I recommend using a fractional intensity fit. This sets the estimated error for each intensity equal to the intensity itself, and is equivalent to errors that are a constant fraction of the measured intensity. This is often a better match for errors in typical intensity measurements than a standard fit, as intensities are often subject to large errors, and the most meaningful fit is often to the trend. To do this select "Fractional Intensity Fit" in the line list window.
  4. After pressing "Fit", the normal residuals window now shows obs-calc for intensities, rather than peak positions. For a fractional intensity fit, the average error should be interpreted as an average fraction of the intensities, so an error of 0.18 should be interpreted as individual transitions fitting on average to 18% of their intensity.
  5. The fit is actually quite good, suggesting the default of 300 K is reasonably close to the actual temperature. The temperature can now be floated. To include all the correct factors, the intensity units should be nm2MHzperMolecule or cm2WavenumberperMolecule, either of which are correct for absorption, though the difference for other units will be small unless the spectrum covers a wide frequency range. Changing the units to cm2WavenumberperMolecule and refitting yields the following fit:
    SVD fit: 144 Observations,  2 Parameters (scaled)
    Initial Average Error: 0.153673739017512 (Unweighted: 0.000137160285152105)
    Predicted New Error: 0.153673739017418 (Unweighted: 0.000137160307212933)
    Parameters:
    # Old New Std Dev Change/Std Sens Summary Name
    1 311.3305593962810 311.3305988149829 2.9952182 0.0000 1.64686 311.3(30) Simulation Temperature
    2 1.81756470561995e14 1.81756457020383e14 2.5701e12 0.0000 1.41e12 1.818(26)e14 Simulation IScale

    Correlation Matrix
    1 2
    1 1.000
    2 -0.400 1.000

    Note: when changing units, or making other drastic changes to the fit, you may need to float only the scale factor first, to avoid unphysically large changes in the other parameters.