eventMaxima function

Event identification (using local maxima as a basis)