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:
- 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.
- Set up the baseline by:
- Right click on the overlay and select baseline.
- Use the zoom buttons to zoom in on a small sample of the
spectrum to show the (small) baseline ripple.
- 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.
- The "Noise Multiplier" setting multiplies the average
noise value determined by the looking at the average
difference between nearby points. (The "Noise Window" sets
the distance between points for this calculation.)
- If the baseline is not flat, try setting the "Baseline
Window" to a number of points indicating the scale over
which the variation happens
- Selecting "Dense" from the drop-down menu uses an
alternate algorithm for finding the baseline
- Press the "Baseline" button to recalculate the baseline
with the new settings.
- [The defaults work fine for s2_dscp_300k_avg_FT.txt]
- 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]
- 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.
- 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:
- Select a region in the baseline window
- Make this the active region for peak finding by selecting
"Select Visible" from the drop down menu.
- Adjust the noise multiplier as required.
- 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.
- Repeat as required - to reset the window, select "Load All"
in the drop down menu.
- To delete individual lines from the line list in the main
window, right click on the line and select "Delete Point"
- To delete several adjacent lines, select them (left click and
drag) and then right click and select "Delete Points".
- To add individual lines by manual measurement, right click and
drag over the peak in the baseline window.
- 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.
- [AutoFitProg.ovr]
The process now requires an approximate simulation set up. This is a
standard PGOPHER simulation, but note the following
points:
- 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.)
- It may speed up the process to use "Intensity Units" =
"Arbitrary"
- 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:
- 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.
- Right click on some more lines to use as "check" transitions
for the test fits.
- In the line list window:
- Turn on the extra controls: "More, Advanced".
- Set the "Accept" window to the maximum error you expect for
the "check" transitions. (The original Autofit uses 2 MHz for
this.)
- Select the "fit" lines in the line list window. (Click and
drag with the mouse in the left hand column.)
- Bring up the auto fit window with "Overlays", "Autofit..."
- In the window set the search window for the initial fits. (The
original Autofit suggests 200 MHz or more for this).
[AutoFitProg1.pgo]
- 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.
- Press search
- After a while, the window will list, for the best fits found:
- nOK - the number of "check" transitions within the
"Accept" window
- Residual - the RMS observed - calculated for these
"check" transitions.
- SumI - the sum of observed intensity for these
"check" transitions.
- The values of the constants obtained for each fit.
- 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.
- To add all the candidate lines in the region:
- 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.
- 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...".)
- Also try "More, Discard, Outside line list range" to delete
unassigned lines outside the range of the active line list.
- To assign these additional lines a modified auto fit is
quickest:
- Select all lines in the line list window. (Press All).
- In the autofit window, reduce the window, say to the same as
the acceptance window in the line list window.
- "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:
- The upper row takes the closest observed line to each
prediction provided the observed line is within the search
window.
- The lower row simply takes the closest line to each
prediction, regardless of how far out the prediction is.
- Again, double click to select the required set of assignments,
and fit with the new assignments
- To scan for additional assignment after fitting, on the
assumption that some calculated lines will have moved into the
acceptance window:
- 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.
- Try "Search" in the auto fit window.
- 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.
- 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.