% Rejection heuristics
%\documentclass[twoside]{revtex4}
\documentclass[twoside]{article}
\flushbottom
\pagestyle{headings}
\setlength{\topmargin}{0.0in}
\setlength{\textwidth}{5.5in}
\setlength{\oddsidemargin}{.5in}
\setlength{\evensidemargin}{.5in}
\setlength{\textheight}{8in}
\addtolength{\parskip}{2pt}
\begin{document}
\title{Heuristics for Fitting and Rejection of BPM Measurements}
\author{M. Fischler}
\maketitle
\tableofcontents
\section{Overview}
The problem at hand is the following: We have a set of
BPM measurements, purported to represent beam positions.
These can be explained as the results of two effects.
The first is the physics of distortions of a cirular orbit
due to dipole fields.
The fundamental equation that describes the effect of a
dipole field distortion at position $j$ on the beam location
at position $i$ is
\begin{equation}
\label{basic}
a_{ij} = \frac{\sqrt{\beta_i \beta_j}}{2 \sin(\pi Q)}
\cdot \cos(|\mu_i - \mu_j| - \pi Q)
\end{equation}
\noindent
where $\beta_i$ ($\beta_j$) is the $\beta$-function and
$\mu_i$ ($\mu_j$) is the betatron phase at position $i$ ($j$).
For this document, it is always most convenient to divide out the
square root of the $\beta$-function at the BPM measurement points;
then the effect of a distortion is a simple cusped-cosine curve:
\begin{equation}
\label{key}
A \cos(|\mu_i - \mu_j| - \pi Q)
\end{equation}
\noindent
where $Q$ is the beam tune.
We shall work in this document only with these ``$beta$-function normalized''
BPM measurements.
The only way the physical (non-normalized) BPM measurements will come into
consideration is that the assumed random variance of the reading of a
properly working BPM is some physical distance (like .15 mm), so the
variance of the normalized measurements we used will have to be this
constant multiplied by $\sqrt{\beta_i}$.
The second effect is that some BPM measurements may be suspect, due to
an improperly functioning BPM. If you try to correct for the fictitious
position distortion at such a point, then the DFG setings you will compute
will actually do a poor job of beam smoothing.
The objective is to get a good set of BPM's by identifying and discarding
bad readings, while retaining all the meaningful readings.
A side objective
will be to produce some sort of explanatory fit of the readings, in terms
of a finite set of point-like and/or spatially spread distortions (each
of which contributes fluctuations according to equation \ref{basic}).
Aside from the benefits of studying the evolution of such distortions, this
fit can potentially be used to supply (at lesser weighting) assumed values
for the missing BPM measurements.
Naively, one might guess that these assumed values
contain no new information (beyond useless information related to the fitting
method) but this is not the case. The value of the assumed measurements is
that they constrain the DFG settings to avoid any radical distortion at the
otherwise wissing points.
That is, if you completely discard a measurement at
position $i$, one can imagine a DFG settings solution which corrects to very
near zero at other positions, but contains a huge bump near $i$; absent
any penalty for this bump, one can easily imaging this might be viewed as
an optimal solution.
The document on Bumps justifies the use of the following formm to fit
the beam position in areas where any overall distorting field is of the
form of a slowly varying field distributed in (betatron phase) space:
\begin{equation}
\label{fitform}
y = A \cos (x + \phi) + k
\end{equation}
\noindent
This is the form we shall use to fit measurements for the purpose of
rejection of outliers.
Of course, one must modify the fitting to allow for the possibility of
discrete distortions--fields localized in space which contribute to
th position according to equation (\ref{key}).
In the remainder of this document we discuss various heuristics which use
this type of fit to detect suspect BPM measurements. Each specifies a
prescription for deciding whehther to reject a point, and if a point is
rejected, a value estimate which could be substituted for that measurement.
\section{Naive Pure-cosine Windowing Fit Heuristics}
The following heuristics for rejecting BPM measurements express some of the
concepts in later good heuristics, but are too naive to be useful:
\begin{enumerate}
\item
Select a window of $N$ consecutive points (normalized BPM measurements)
centered on the point being considered.
\item
Fit the points in that window to $y = A \cos (x + \phi) + k$.
\item
Reject the BPM measurement if the discrepancy between the measurement and the
predicted value exceeds $z$ times the random variance assumed for that
measurement. A plausible value of $z$ would be, say, 3.5, since $3.5 \sigma$
statistical fluctuations occur less frequently than once per the 4,200
BPM measurements for a ramp and squeeze.
\item
If the measurement is rejected, supply as the estimate the value of $y$ in
the fit curve.
\end{enumerate}
This algorithm would be terrible: if there is any discrete distortion in the
range of the window, then the single unified cosine fit cannot work, and the
fit found will be off by an amount proportional to the distortion.
The algorithm would thus discard all BPM measurements which try to measure
the very distortions we will try to correct!
One can do better by allowing the goodness-of-fit of the fit curve to
influence the rejection criterion:
\begin{enumerate}
\item
Select a window of $N$ consecutive points (normalized BPM measurements),
centered on the point P to be considered.
\item
Fit the points in that window to $y = A \cos (x + \phi) + k$.
\item
Estimate the error on each measurement by the errors of the points actually
measured relative to the predictions of the fit.
\item
Reject the BPM measurement if the discrepancy between the measurement and the
predicted value exceeds $z$ times the random variance assumed for that
measurement.
\end{enumerate}
This algorithm would also be almost useless:
if there is any discrete distortion
in the range of the window, then the single unified cosine fit cannot work well,
and the apparent fluctuations in measurement values will be large.
Thus one would frequently fail to reject measurements which should be
rejected, because one would have an exaggerated idea of the fluctuaions of
BPM measurements in general.
However, the idea of allowing the goodness-of-fit of the fit curve to influence
the rejection criterion is a sound one, and is key to the first possibly useful
heuristic.
\section{The Pure-cosine Windowing Fit Heuristics}
The idea here is to assume that, although there may be one significant
distortion in the window-ed range, the data on at least one side of the
considered point would be accurate. So if the point fits with either
the data on the left or the data on the right, it is acceptable.
Again one allows the goodness-of-fit of the fit curve to
influence the rejection criterion.
\begin{enumerate}
\item
Select a window of $N$ consecutive points centered on P,
and divide these into $M$ points on the left of P, and $M$ on the right.
\item
Fit the points in each of those sets to $y = A \cos (x + \phi) + k$.
\item
For each fit, estimate the error on each measurement by the errors of the
points actually
measured relative to the predictions of the fit.
\item
Reject the BPM measurement at P if
{\em for each of the left and right sub-windows}
the discrepancy between the measurement
and the predicted value exceeds $z$ times the random variance assumed for that
measurement.
\item
If the measurement is rejected, supply as the estimated actual value at P
the weighted average of
the values of $y$ in the left and right side fits (weighted by the reciprocal
of the error estimates on each side).
\end{enumerate}
If the point P fits well with measurements on either side, it is accepted.
This heuristic will ``fail,'' in the sense of possibly accepting
some measurements which should have been rejected,
in the case where there are actually one distortion in the window on each side
of P.
An alternative heuristic follows the same prescription but
uses the assumed random variance in place of the
errors estimated based on fit data.
This alternative is equivalent to the one above,
except in cases where there
are distortions in the window on each side of P.
In such cases, the alternative will often
reject a BPM measurement that probably was valid.
This alternative is inferior because in that case it makes the worse
kind of error, and more frequently.
\section{The Rejection-Aware Cosine Windowing Fit Heuristic}
The above heuristics do poorly when there are windows with either distortions
or bad BPM's on both half-window sides of the key center point. A simple
modification can help eliminate misleading information from other bad BPM's
when deciding whether to reject the center BPM.
The strategy is to remember any BPM's (which would be in the left half of the
window) which have already been rejected, and ignore those when fitting the
left sub-window. By improving the quality of the fit on the left, this
heuristic can be more stringent, rejecting BPM's that the above heuristics
would have accepted. In cases of difference, the rejection-aware answer
would generally be superior.
Aside from this increased rejection sensitivity,
there are three key differences between this method and the pure-cosine
heuristic:
\begin{enumerate}
\item
The latter was logically a parallel algorithm, in the sense that all windows
could be done simultaneuosly and independant of the results of other windows.
\item
Leaving aside issues of actually exploiting thei parallelism (which would
probably not be done anyway), this distinction still is important, because
one has to decide which window to use as a starting point. Answers can
(in rare cases) depend on that choice.
\item
Similarly, while the pure-cosine heuristic is ``mirror-symmetric'', this
method can be sensitive to whether one lides the window to the left or to
the right. Equivalently, for a fixed sliding direction, this method can
potentially get a different answer for a lattice and for its mirror image.
\end{enumerate}
However, these differences crop up in rare and contrived cases and are
not likely to be important.
The behavior of this algorithm is markedly different than that of the
pure-cosine method in situations where there are frequent measurements
which fluctuate more than would be expected.
In such a situation, the rejection-aware algorithm can potentially start
accepting those measurements which lie on one good cosine curve, while
rejecting quite a few others. It might be better to simply say that one
has no basis for rejecting any BPM in such cases. The way to handle this
si to put a limit on the number of BPM's one is willing to ignore in
comuting the fit--one orr two might be the right limit.
This opens the possiblity of a BPM which was never validly considered for
rejection because its right-side measurements would say to reject, but too
many of its left-side neighbors were already rejected to attempt to fit
from the left.
Such BPM's can't be rejected, and probably should not be ignored in the
fits for the next window.
\section{Single-Distortion Sliding Window Fit Heuristic}
Both the above cosine windowing fit heuristics have two shortcomings:
\begin{itemize}
\item
They do not make full use of relevant data in the case where there is a
distortion on one side to the point P. If the distortion is at $x$
some distance to the right of P, all the points between P and $x$ could
profitable have been used in the left-side fit, but were not.
\item
The estimated actual value at P (in the case of rejection) is not as good
as it could be.
\end{itemize}
Instead, one can use the idea that the window may contain one distortion,
and fit to an overall single-distortion shape. This utilizes all the data
that can be used, both for deciding on rejection and for estimating the
value to substitute.
It at first looks more difficult to do the fit, but in these heuristics we
will make things easy by not actually fitting the position and strength of
the distortion.
Consider the following
reasoning: The distortion is either to the left of P or to the right of P
(or precisely at P). Thus either all points to the left of P or all
points to the right of P must be uninfluenced by the distortion.
The prescription is then:
\begin{enumerate}
\item
Select a window of $N$ consecutive points centered on P,
and divide these into $M$ points on the left of P, and $M$ on the right.
\item
Fit the points in each of those sets to $y = A \cos (x + \phi) + k$.
Note the goodness-of-fit for each of these.
\item
Assuming either the left or right side fit (but not both) is ``good'' in
the sense that the goodness of fit is consistent with the assumed random
variance of the measurements, continue the extrapolation on the other side
of P until you encounter a point which is not a good fit. (For this purpose,
using a tighter criterion, say $2 \sigma$, is sensible).
\item
Having found the set of points which fit the curve (which probably spans P),
re-fit to refine $A$, $\phi$ and $k$.
\item
Base the rejection and value estimate for P on this refined fit:
Reject the BPM measurement at P if the
the discrepancy between the measurement
and the predicted value exceeds $z$ times the error estimate for the
refined fit.
\end{enumerate}
If both of the one-side fits are ``good,'' and they are in ``good'' agreement
at P, then refine the fit by combinining all points except P, and use the
value and error estimate at P from that refined fit to accept or reject P.
If both of the one-side fits are ``good,'' but their predictions at P
disagree by more than a couple of times their error estimates, this
indicates a distortion near (but not right at) P. In this situation,
if the distortion is actually to the left of P, then the fit from the
right should be accurate, and vice-versa. If P is a valid point,
you can tell the two cases apart; if not, they are equally plausible.
So,
\begin{itemize}
\item
Assuming both the left and right side fit are ``good''
continue the extrapolation of each to P. If
these extrapolations disagree, and P is not in agreement within $z$ sigma
of either one, then reject P.
\item
If P is rejected in this case, supply as the estimated value the average of
the left- and righ-side values.
\end{itemize}
The last case comes when neither of the one-side fits are ``good.''
This will happen if there are distortions on each side of P.
Rather than giving up and using a fairly large sigma (which will mean
accepting in many rejectable cases), we could try to find out something
about where the distortions are:
\begin{enumerate}
\item
Find the largest interval straddling P which exhibits a ``good'' fit, by
starting with M points on each side of P and moving one boundary
halfway toward the outside (inside) if is ``good'' (bad). Alternate left
and right for the boundary to move.
\item
If this interval contains enough points for a sensible fit, use it to
accept or reject P, and to estimate value if rejecting.
\item
If this interval does not contain enough points for a sensible fit, then
there are distortions near to P on both sides.
In such a case, revert to the pure cosine on either side fit heuristic.
\end{enumerate}
\section{Heuristics Fitting Refined by Single Distortions}
The above heuristic does not use all available information, in the case where
there really is a single discrete distortion. \
The point is that the data on
the other side of the distortion can (in principle)
add further information.
Say, for example, that you find a ``good'' fit in some sub-window, then
find a ``good'' fit in the remainder of the window.
The combination of the two fits determines the position and amplitude of
a single distortion (near the boundary of between the sub-window and the
remainder). Now, using as a starting point the form of curves with that
distortion and those forms one either side, one can re-fit all the data
to a 5 parameter fit (underlying $A \cos (x + \delta) + k$, plus
distortion $D \cos (|x -\mu_D| - \pi Q)$). As compared with the fits
to find the cosine curves in the first place, this fit has two non-trivial
parameters ($\delta$ and $\mu_D$) instead of one.
It is really not clear how much benefit will be derived from this refinement.
The point is that in the first ``good'' subregion, you already have an
excellent fit to a cosine curve. This fit will be made somewhat worse
based on the presnce of points in the remainder of the window which are
mildly inconsistent with that cosine curve to one side of distortion.
While the modified fit should be better, as lond as there really is a single
distrotion and the fit in the remainder region is also good, the change
is likely to be tiny.
At any rate, the prescription would be:
\begin{enumerate}
\item
Select a window of $N$ consecutive points centered on P,
and divide these into $M$ points on the left of P, and $M$ on the right.
\item
Fit the points in each of those sets to $y = A \cos (x + \phi) + k$.
Note the goodness-of-fit for each of these.
\item
Assuming either the left or right side fit (but not both) is ``good'' in
the sense that the goodness of fit is consistent with the assumed random
variance of the measurements, continue the extrapolation on the other side
of P until you encounter a point which is not a good fit.
\item
Having found the set of points on this side of P which fit the curve
now fit the remaining points to another curve (the reaminder curve).
\item
Assuming that the remainder curve is a ``good'' fit, and that the value of $k$
for the remainder curve agrees sufficiently well with the value of $k$ for
the first curve,
analytically combine the two curves to find a single underlying curve plus
distortion.
\item
Using those analytically determined parameters as a starting point, fit the
entire window (except P) to the 5-parameter form of cosine plus one-bump.
Inevitably this will also be a good fit.
\item
Base the rejection and value estimate for P on this refined fit:
Reject the BPM measurement at P if the
the discrepancy between the measurement
and the predicted value exceeds $z$ times the error estimate for the
refined fit.
\end{enumerate}
The data can invalidate this basic prescription in the following ways:
\begin{itemize}
\item
If in forming a first and a remaining sub-region one finds the fit to
be ``good'' so deep into the region that the remainder sub-region
is too small to fit, then merely use the curve in the first sub-region.
\item
If the points on neither side of P can be fit to a cosine curve, this
indicates at least a distrtion on each side of P. Resolve this problem as per
the last cast of the Single-Distortion Sliding Window Fit Heuristic.
\item
If both sides of P admit ``good'' fits, whether or not
these fits agree with one another, analytically find the single-distortion
curve which produces both those fits. (If they agree with one another,
then the strength of the distortion will be tiny.)
Then use that as a starting point
to refine a one-bump fit with all the data at once.
Assuming that this is now a ``good'' fit to the full data set, use this fit.
\item
The only way the refined one-bump-fit can not be a ``good'' fit is for
the $k$ values on either side of P to differ significantly.
\item
If either the refined one-bump-fit based on two ``good'' fits on either
side of P is itself not a good fits, or
the first fit and the remainder fit significantly disagree in value of k,
this indicates some sort of spatially distributed distortion field which
differs in the two sub-regions. Short of sub-dividing each of the
sub-regions into two peices and doing four fits, the best we can do is to
refine the fit with another parameter, substituting $m x + k$ for $k$.
\end{itemize}
\section{Multi-Distortion Sliding Window Heuristics}
It is in principle possible to allow for the presence of two (or more)
distortions in a given window. To a very minor extent, the
Single-Distortion Sliding Window Fit Heuristic does this when fits on neither
side of P are ``good'' but a good fit can be found straddling P. One could
refine the fit, in this case, by computing fits on the left and the right
of that straddling region, and (if they are ``good'' fits) analytically
calculating the parameters for each distortion and the central curve.
Then a re-fit of the entire data to 7 parameters, using the calculated
parameters as a starting point, will incorporate the extra information.
One can also incorporate additional data points to refine the fit in cases
where one side or the other of P contains two distortions. However, except in
cases where the nature of a distortion is known a priori (because of
calculations on other windows), the likelihood of the additional information
being at all useful and meaningful is small; not worth the extra work.
In general, the only concession we should make to multiple distortions in a
window is to take into account distortions already found by looking at other
windows.
\section{Heuristics involving Non-local Distortions}
At this point, the main concession we make to the possibility of
non-local distortions is in the incorporation of the constant term
$k$ in our equation (\ref{key}) fits.
This is justified because a slowly varying distorting field does contribute
only by changing the values of amplitude and phase, plus by introducing a
$k$ term.
If values of $k$ disagree in curves which otherwise should match, then we
take this as an indication of a non-constant distributed distortion field
and make the assumption that the field varies linearly.
Any attempt to deal with non-local distortions beyond this would have too
many degrees of freedom; our fits would become worthless for the purpose
of rejecting RPM measurement outliers.
\section{Utilizing Fits From Earlier Windows}
As hinted in the above section, by fitting one window independant of
all others you would be sacrificing significant useful information:
the locations of distortions and/or forms of fits deduced from other
windows which overlap the current one. These can be used at the least
to deliver excellent starting points for the fit searches. But a more
important use is to be able to cope with multiple distortions in one window
in many cases (though not every case).
This is a similar desire to being able to cope with multiple rejectable
BPM's in a window, which was discussed above in rejection-aware heuristics.
Of course, at some point one must start with a window for which no
``previous-window'' information is available.
The idea is to find a window where the fitting is as clean as possible.
The key is to start by finding some segment (either a whole window or a
slightly shorter length) which can be fit well by a single cosine curve,
then if that does not comprise an entire window, to extend by fitting with one
distortion. If there are no available windows with fewer than two
distortions, it is probably hopeless to try to fit things using that window
length.
In all the fits implied in every previous prescription, the fit is first
to be done omitting the key center point P of the window. The idea is to
use this fit to potentially reject P..
However, if P is not to be rejected, and if the results for this window's fit
will be used for subsequent windows, then it probably pays to refine the fit
by including P.
Once some fit is found, it may well extend in a ``good'' way only to a very few
points from the end of the window. In such cases, it is unreasonable to
try to further fit those few remaining points by adding another distortion;
the accuracy would be inadequate. Instead, it is reasonable to accept
that this window will be slightly shortened; as the window slides, the
region containing those few remaining points will eventually become large
enough to do sensible fitting.
We will not present a prescription in this section, because we are now
close enough to the ultimate ``best heuristic'' that we will leave it
to that section.
\section{What if Two BPM's in One Window Are Bad?}
By walking the window around the ring and utilizing fits from prior windows,
you can handle every situation in which distortions are at least half a window
apart, and many in which they are more prevalent than that. And you can
discover (and reject) any single or isolated bad BPM measurement. But when
two bad BPM measurements happen to lie very near one another, it is possible
that measurement A can ruin the fitting that would have determinied that B was
bad, and measurement B can do the same to prevent rejection of A.
This case will look, to the previously described prescriptions, as if there
were two distortions within the window (neither of which had been fit by
previous window information). However, unless the bad BPM's are touching,
or there happens to be a true distortion between them,
there is a saving feature: Points between the two BPM's will look as if they
fit on the curve fit to regions with one BPM excised. For example, in a
window with the key center point at location 7, if
BPM's 7 and 10 are bad, then 8 and 9 will fit well with a curve fit to
1 - 6, and also with a curve fit to {8, 9, 11, 12, 13}.
The case of two consecutive bad BPM's is perhaps more subtle to detect.
However, if curves cannot be fit omitting one or non-touching pairs of BPM's,
then it is reasonable to test the hypothesis that a pair of BPM's are bad, by
fitting skipping both of those. One has to be careful not to over-analyze:
If the fit so determined is not very good, it may not be justifiable to
omit the consecutive BPM's.
\section{The Heuristic Thought To Be Best}
Combining the concepts in the previous sections, we come up with the following
prescription for identifying bad BPM measurements, and optionally supplying a
value for replacement of a bad measurement and a relative weight or
uncertainty to assign to that value.
\subsection{Find and fit a good starting window}
might speed things up by starting with prior-breakpoint good window.
\subsubsection{Starting window with all good BPM's}
The best heuristic might well might speed things up by sliding the window
by more than one point at a time (and perhaps retreating to one point at a
in peculiar circumstances).
If that is doint, instead of one key midpoint P in a window, there is a
subsection of key points {\bf P} ranging from the end of the prior {\bf P} to
the midpoint of the new window.
\subsubsection{Starting window with one suspect BPM}
TODO
\subsection{States available for the fit of a (previous) window}
The most general state of information about a window would be two sorts of
information:
\begin{itemize}
\item
A list of suspect measurements.
\begin{enumerate}
\item
In the first half of the window there may be identified bad measurements.
\item
At and past the midpoint, there may be points which have previously
been ignored in a fit because they were suspect, but which have not
yet officially been rejected.
\item
Near the end of the window, there may be multiple points which would
be suspect relative to the last region fit, but we can't really have
say whether these are suspect measurements or whether we think chaotic
behavior in a small region may be the cause.
\end{enumerate}
\item
A list of ranges coverning the entire window (except perhaps for some or all
of the bad measurements). Each range has one of the following attributes:
\begin{enumerate}
\item
Good fit (to $A \cos (x + \phi) + k$), in which case $A$, $\phi$, and $k$
are given.
\item
Unexplained--fits were attempted and do not apply, yet points in the range
cannot confidently be rejected either.
\item
NotYetExplained--enough points were there to have attempted a fit,
but no fit was found yet.
This can happen only at the end of a window. Ultimately these points may
be rejected, found chaotic, or points at the end may be part of a good
fit.
\item
Insufficient points to have attempted a fit. This can happen only at the
end of a window.
\end{enumerate}
\end{itemize}
\subsection{Adding a new point when fit inforamtion is available}
When adding a new point, it may be the case that there is a fit region ending
at the rightmost point of the previous window. In that case, there is an
obvous algorithm for adding the new point: If the point agrees with the fit
extrapolation (to some $n \sigma$ based on the fint $\sigma$), then add it to
the fit region. This $n$ should be smaller than the criterion used to
reject a measurement, since failing to extend a fit is not a disaster.
Probably a value of $1.5 \sigma$ is appropriate.
In principle, one can immediately refine the fit including
the new point. In practice, since the fit will eventually be refined later,
one would only refine (the existing fit) immediately if the new point does
not match the extrapolated value.
\subsubsection{Extending fits skipping bad points}
Whenever there is a bad BPM measurement, that has the potential for
disrupting what would otherwise be a longer a fit region. If the fit
regions tend to be long anyway (that is, in the case of very sparse bad
measurements) this is fine. But to better be able to cope with the
more difficult case, one would like to incorporate a strategy of ingoring
a single suspect BPM.
The consequence of this would be that a given fit can have three states for
its endpoint:
\begin{description}
\item[Valid]
The point at the very end is
\end{description}
If two points in a row need to be rejected, then the fit goes into the
``closed'' status.
Let's refine this to say that if two out of three consecutive points need to
be rejected, then one should not extend to the middle of those two points
for the purpose of finding fits (though when deciding whehter to reject
the middle point, the fits on either side can be used).
\subsubsection{Splitting a fit--distinguishing new distortions}
It will often be the case that there is a
K + fixed number of sigma...
concept of open-ended fit regions with suspect points at end.
\subsubsection{Add a point algorithm}
\subsection{Sliding the window}
Sliding a window consists of adding one point to the right side of the
window, and dropping that same number of points from the left side.
For initial clarity, we will first discuss matters assuming we slide the
window by one point. Then the new window has a single key point, which is
in its center location and which is one point to the right of the old key
point.
The computation needed to be done when the window slides is surprisingly
light: You have to extend fits (or make new fits) based on including the new
point, and make the accept/reject decision for the key center point.
The extending of fits should be done first.
\subsubsection{Extending fits}
\subsubsection{Rejecting or accepting key point}
\subsubsection{Splitting a fit}
only have to do at the key point, because each point will in turn be key.
\subsection{Slide the window by one point at a time}
\subsection{Slide the window by several points}
Sliding a window consists of adding one or more points to the right side of the
window, and dropping that same number of points from the left side.
But not needed because...
\end{document}