Procedures Automatic Fitting <Prev Next>

Example from the AutoFit website

(Draft)

This works through the example given on the Autofit 1.0 website  - see http://faculty.virginia.edu/bpate-lab/autofit/intro.html (Brooks Pate, Steve Shipman, and Ian Finneran). It uses the example file s2_dscp_300k_avg_FT.txt.

The auto fit process requires a line list, rather than a spectrum. To generate a line list from a typical experimental plot try the following:

  1. Load the experimental spectrum, s2_dscp_300k_avg_FT.txt. This process requires upward going  peaks - if you have downward going peaks, right click on the spectrum and select invert.
  2. Set up the baseline by:
    1. Right click on the overlay and select baseline.
    2. Use the zoom buttons to zoom in on a small sample of the spectrum to show the (small) baseline ripple.
    3. Click on "Baseline" to display the threshold level for peak finding based on the current settings. The orange line shows the calculated baseline, and the green line indicates the upper limit for points used in calculating the baseline. 
  3. When you are happy with the baseline, adjust the "Noise Multiplier" to set a threshold for peak detection. The automatic peak finding process will find most peaks above the green line. Note that the "Noise Multiplier" need not be the same as for the baseline calculation. [Try Noise Multiplier = 4 for s2_dscp_300k_avg_FT.txt]
  4. From the drop down menu, select "Make Line list". This will generate a line list as a separate overlay that shows in the main window.
  5. If you want to use different settings for different regions, for example where the noise is larger, the peak finder can be re-run over smaller regions as follows:
    1. Select a region in the baseline window
    2. Make this the active region for peak finding by selecting "Select Visible" from the drop down menu.
    3. Adjust the noise multiplier as required.
    4. To replace the peaks in the line list, select "Append Linelist To..." from the drop down menu, making sure the generated line list is selected and "Erase Current Region" is checked when prompted.
    5. Repeat as required - to reset the window, select "Load All" in the drop down menu.
  6. To delete individual lines from the line list in the main window, right click on the line and select "Delete Point"
  7. To delete several adjacent lines, select them (left click and drag) and then right click and select "Delete Points".
  8. To add individual lines by manual measurement, right click and drag over the peak in the baseline window.
  9. The original experimental spectrum is not required at this point - you may want to hide or remove it from the main window by right clicking on it and selecting the appropriate option. You may want to use it later, though, for checking for weak peaks that the automatic peak finder may have missed.
  10. [AutoFitProg.ovr]
The process now requires an approximate simulation set up. This is a standard PGOPHER simulation, but note the following points:
  1. The original Autofit just fits A, B and C for an asymmetric top. PGOPHER has no restriction on the type of molecule or the parameters to be adjusted - just set the parameters to be adjusted to have "float" = "yes". (If no parameters are floated, the process is effectively a simple search for the lines closest to the calculated positions.)
  2. It may speed up the process to use "Intensity Units" = "Arbitrary"
  3. If you want to limit the possible ranges for the constants, enter the permitted change (+ or -) as the "Std Dev" in the constants window.
Given the simulation and experimental line list set up as above:
  1. Right click on some lines to use for the fit part of the process. For the original Autofit algorithm, this should equal the number of parameters floated. The current implementation does no checks as to the suitability of the lines chosen. These "fit" lines must be the first ones (at the top) in the line list window.
  2. Right click on some more lines to use as "check" transitions for the test fits.
  3. In the line list window:
    1. Turn on the extra controls: "More, Advanced".
    2. Set the "Accept" window to the maximum error you expect for the "check" transitions. (The original Autofit uses 2 MHz for this.)
    3. Select the "fit" lines in the line list window. (Click and drag with the mouse in the left hand column.)
  4. Bring up the auto fit window with "Overlays", "Autofit..."
  5. In the window set the search window for the initial fits. (The original Autofit suggests 200 MHz or more for this). [AutoFitProg1.pgo]
  6. If you want to limit the possible range for parameter values, set the maximum permitted change (+ or -) as the "Std Dev" in the constants window for the constant, and check "Limit to Err". This will speed up the search process, as trials can be discarded more quickly.
  7. Press search
  8. After a while, the window will list, for the best fits found:
  9. To try out an individual fit, double click on that row. This will update the line list window with all the assignments made by that fit, and the standard PGOPHER fit process can then be used to refine the fit. Providing the original set of lines are not deleted from the line list window, this process can be used to start other fits at any time. If you don't like the result, the "Reset" button will discard the new assignments and reset the parameters.
  10. To add all the candidate lines in the region:
    1. Open the transitions window, and click "Replace". This will add entries to the line list window for all the transitions selected by the window. By default this is all transitions up to the maximum J, but it may make sense to use some selection in this window, but see also below.
    2. This will typically add too many transitions; in the line list window try "More, Discard, Low Intensity" to remove the weaker unassigned transitions. (The threshold is selected in "More, Options..., Discard lines less than...".)
    3. Also try "More, Discard, Outside line list range" to delete unassigned lines outside the range of the active line list.
  11. To assign these additional lines a modified auto fit is quickest:
    1. Select all lines in the line list window. (Press All).
    2. In the autofit window, reduce the window, say to the same as the acceptance window in the line list window.
    3. "Search" will now try all unassigned lines close to the predicted lines; this should be quick, provided the window is set small enough. The search will typically fail for some lines, in which case two candidate sets of assignments are produced:
  12. Again, double click to select the required set of assignments, and fit with the new assignments
  13. To scan for additional assignment after fitting, on the assumption that some calculated lines will have moved into the acceptance window:
    1. Update the calculated positions selecting all the lines in the line window and pressing "Update". This will change the calculated frequency and intensity of unassigned lines.
    2. Try "Search" in the auto fit window.
  14. To remove spurious assignments, right click on the larger residuals in the residuals window and select "Show and Edit". This will highlight the relevant observation in the line list window, and centre the plot on the transition. Setting the "Std Dev" to blank will remove it from the fit, and allow it to be used with the "Update" button as above.
  15. To remove the assigned lines from the active line list in the main window, to help fitting the next band or species, select all the lines in the line list window and press "Suppress". There is (currently) no undo facility on this, so make sure the line list is saved first.