I am trying to detect level shifts in signals automatically by detecting peaks in the difference between two rolling windows.
I basically want to detect peaks which are "sharp" and don't have a wide plateau.
I want to detect the peaks in the following signals
But not the "wide" peak in the following image
I know of the functions such as find_peaks from scipy.signals but without specifying any parameter it also picks up the wide peaks in my signals.
So are there any of its parameters one should tune to only pick up "sharp" peaks? Or could I do some specific preprocessing step to the data first to make it easier to pick?
Appreciate any input!

