Tuning the penalty term in ridge extraction
masterThe penalty parameter in extract_ridges is critical for controlling the stability of the extracted ridges. A low or zero penalty allows the ridge to jump frequently between different frequency components, which can lead to unstable results. Increasing the penalty term helps deter these frequency jumps, forcing the algorithm to find more continuous and physically plausible paths through the time-frequency plane.
If your extracted ridges show erratic jumps in frequency, consider increasing the penalty value.