eventMinima function

Event identification (using local minima as a basis)