Finding positive peaks of a function
📁 python, ии, работа
It is required to programmatically find the number and location of positive peaks on the graph.
It is known that the number of peaks is odd. Usually 3, 5 or 7. In this case, 3. It is also known that each positive peak is followed by a negative one.
What is the best way to solve this problem in Python? Preferably without coefficient tuning
Addition: The data always starts with a positive peak and ends with a negative one.
The data is a vertical projection of an image processed by the function np.gradient(projection)/projection. That is, the ratio of the second derivative of the function to its height.
s = "1a2b3c"for _ in range(len(s)): print(s) s = s[1:] + s[0]1a2b3ca2b3c12b3c1ab3c1a23c1a2bc1a2b3 Log in to leave an answer