How to merge transitions?
One of many possible algorithms to provide such edge sensitive information to its users are classified under change-detectors. The one that best fits to your kind of data uses thresholds, accumulators, memory, leakage and smoothing factors as well as variance and mean normalizers to decide on which changes belong to meaningful edges and which are just local variations.