A vector of positions recorded over time. Positions are taken to be measured
upward, i.e. a higher value corresponds to a higher probe position further
from the sample. Units are unspecified.
window
Minimum number of previous descending points before a bottom point is accepted. This
allows positional wobbles at the bottom and top of a hop to be ignored.
box.size
Width (in samples) of a simple box filter to apply in order to smooth the signal
before searching for minima.
clip.ends
Whether to omit bottom points discovered within window points from the end
of the signal. This avoids mis-identifying a de facto minimum at the
end of the signal as being an actual bottom point. TRUE by default.
Value
A logical vector the same length as the input vector x, with the bottom points
set to TRUE and all others FALSE.
# use a simple sine wave as an example signalt <- 1:1000hops <- sin(t * pi/100)
# find the bottom pointsbots <- find.bottom(hops)
# plot the resultplot(hops, type="l")
abline(v=t[bots], col=2)