Graphical Editing of Residuals

The graphing of residual values allows the user to quickly see if any data points are out of bounds. Identifying these outlying points and discarding them can produce a better solution.

ODTK provides a technique to identify these points on the residual graphs. The Edit button (Edit) is only available if the graph is presenting data from the MeasurementHistory table of the data file. It will stay highlighted while in edit mode. Confirm the table name in the SQL Query String field on the General Properties page of the Graph Designer.

The graph also needs to be showing data from either the Pre Fit Residual field or the Residual Ratio field. See the list of Dependent Variables in the Graph Designer to find this field in the Database Tables & Fields listing. Once the technique is initiated, a Selected Points list will be added to the right side of the graph window. If one of the filters or Least Squares object in the currently loaded scenario has an Output DataArchive Filename which matches the Run Name of the displayed graph, then the Reject and Ignore buttons will be available. If the Reject and Ignore buttons are not available, check that the name of the input file used to generate the graph matches the output file for one of the filters or LS objects in the current scenario. Generating a residuals graph using multiple input files is not recommended when using residual editing.

The user can then add points to the Selected Points list in two ways. The user can drag or lasso a number of points using the mouse. If a point was previously selected, it is de-selected. The points are added to the list and a square is drawn around the point. Most residual graphs plot more fields than just the Pre Fit Residual or Residual Ratio, typically the sigma bounds. Only the Pre Fit Residual or Residual Ratio points are added to the list.

The second method is to click on each individual point. The cursor will change to a hand shape when it is over any data point. A tool tip will show the current value. Typically the Pre Fit Residual or Residual Ratio field is shown with a symbol and the others fields are just a line. Clicking on other field points will do nothing. Clicking on a selected point will de-select it. If the graph is grouped by the Edit Flag field (see the Graph Designer), then some of the residual points will be shown Accepted and some Rejected. The built-in ODTK residual graphs do this. The selection process will allow either Accepted or Rejected points to be added to the list. You may want to select a Rejected point if your intention is to have that data point ignored by the filter or LS process.

Once the outlying points have been selected, the user can use the Reject and Ignore buttons. This will transfer these points to the Residual Editing.Schedule of the appropriate Filter or LS object in the loaded scenario. See the Object Properties of that object. The user can then re-run the filter or LS and these points will be excluded from the solution. The user can regenerate the graph and will see the selected points in a new color (assuming the data is grouped by the Edit Flag field) and the new solution. The user should save the current scenario at this point to maintain consistency between it and the generated data.

The user can close the Selected Points list using the button in the top right hand corner of the list. This will not lose the current selections. The list can be re-shown by clicking the lasso button again. The user can also zoom/unzoom the graph while the Selected Point list is shown. The user must return to edit mode to update the list but not to close it.

If a selection doesn't update the Selected Points, it could be you are no longer in edit mode. Check the toolbar and make sure the lasso is highlighted. Second, many times the points are very close together and the user will need to zoom in to distinguish the Pre Fit Residual or Residual Ratio symbols.

ODTK 6.5