I've encountered a problem with scipy's peak finding algorithm that I can't seem to solve. This answer demonstrates very nicely how one can use scipy.signal.find_peaks to determine the position of a plateau in a given dataset.
I would like to apply this to a dataset that is a bit noisy, i.e.
see for example this picture. This is clearly a plateau, but it is not a perfect one, i.e. one would need to define a threshold which decides if two points are "equal" or not. I have no idea if this can be done with find_peaks, but it seems that all the parameters listed in the documentation are only for specifying peaks, not plateaus...
I'm open to other functions, algos, etc. that solve the problem, but so far, only find_peaks seems to provide this functionality. I have also seen this post, which suggests a solution, but this doesn't not seem to work if your dataset has exactly the prescribed form.