I have a .CSV file (a list) that contains 43142 rows and 2 columns.
When plotting the list's values x vs y:
import numpy as np import matplotlib.pyplot as plt filename=np.genfromtxt(list.CSV,delimiter=',') plt.plot(filename[:,0],filename[:,1])
I get a graph which has multiple maxima values and looks like this: x vs y values of list.CSV
What i want to do is, given an aproximate interval in the x values in which the peaks are positioned, find the maximum values and the corresponding indices on the list.
e.g if there's a maximum y value in the interval x=(2720,2730) (refer to figure 2), i want to find the exact index in which the value is maximum.