This routine performs automatic or manual clipping of points from the set of samples representing the path of an order across the frame. A variety of methods of manually clipping points is available, and the degree of the polynomial used may also be altered. The relationship of the fit to the trace samples, and the deviations, may be examined graphically.
Orders may be repeatedly re-fitted once they have been initially traced. In general an automatic fit, clipping to a maximum deviation of third of a pixel will yield good trace polynomials. The routine may also be used to remove sets of points which are distorting a fit, for example a run of bad centre estimates caused by a dodgy column/row.
This routine should be used manually on single orders when they are clearly not correctly fitted. This will usually be seen by viewing the paths of the fitted order traces using ech_trplt. In many cases it will be possible to get a good trace fit by clipping a set of obviously bad samples, and re-fitting (perhaps with a lower degree of polynomial).
The other main option for coping with such problems is to rely on the trace consistency checking routine. This will produce a set of consistent trace fits in most cases. If a particular order is beyond recovery and you do not wish to extract it at all, then it may be disabled by clipping away all of its trace samples with this routine.
The figure above shows an example of the deviations plot after automatic clipping has been performed on an order.
If you set TRC_INTERACT=YES then a multi-option menu will be displayed. The options are:
Clips the sample nearest to the cursor when the key is pressed.
Clips all samples with deviations which are more negative than the current Y-position of the cursor.
Clips all samples with deviations which are more positive than the current Y-position of the cursor.
Clips all points with absolute deviations greater than the current Y-position of the cursor.
Allows the clipping of a set of samples denoted by a range of values along the X-axis of the trace. This will generally be used when the order is only partially present, or perhaps to remove the contributions of a swath of bad columns. The starting point for the range to be clipped is the current cursor X-position, and the end point is selected by moving the cursor and hitting any key.
Like option R but allows you to specify the corners of a box in which all samples will be clipped. Any two corners which define the area to be clipped can be used. The first corner of the box to be clipped is the current cursor X-position; the second (opposite) corner is selected by moving the cursor and hitting any key.
Selects automatic clipping in which points will be iteratively clipped and the trace re-fitted. The number of points to be clipped is set by TUNE_MXCLP. If this is zero, points are clipped until the absolute deviation of the worst sample has fallen below the threshold set by TUNE_CLPMAXDEV.
Used to switch from interactive clipping to entirely automatic mode. Thus after manually clipping a couple of orders it may be observed that the orders are well traced and that few points need be clipped, this can be left safely to auto-clipping. The Go option selects auto-clipping for the current, and any subsequent orders.
Used when it is clear that the traced samples do not follow an order at all and you wish to prevent any subsequent processing of the order. Orders may be automatically disabled if a small enough fraction of samples remain after auto-clipping has been done.
Toggles plotting of the fits; normally a replot occurs for every key hit.
Rotates the type of fit used. Currently available types are polynomial and spline.
The graph used for clipping shows the deviations of each sampled trace point. The View option shows the actual coordinates of the trace samples, providing an easy reference as to the agreement with the order path as expected from visual examination of the raw data. Note that View mode is mutually exclusive of all other operations and must be exited (type any key) before clipping can be resumed.
Leaves the trace fitting for this order without saving the trace polynomial in the reduction database. It is therefore lost.
Leave trace fitting for the current order and save the latest trace polynomial in the reduction database.
Leaves the trace fitting for this order and all subsequent orders.
Increments the degree of polynomial used to fit the trace samples. It may be increased up to the maximum specified by TUNE_MAXPOLY.
Decrements the degree of polynomial used to fit trace samples.
Reduction File Objects: