amps: A helper function to find the amplitudes by finding the
peaks and antimodes of a data vector.
Description
This function finds the peaks and antimodes by way of
distribution density estimation. It may be convenient to think
of this function as finding the global and local maxima and
the local minima of a data vector. Note that the global minimum
is asymptotically zero ("0")from based on distribution theory;
for practical purposes, double checking the global minimum is
good practice. Just run ("min(x))")